diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 057096411a6c..863c46f0514b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -7,6 +7,7 @@ dependencies: '@rush-temp/ai-metrics-advisor': file:projects/ai-metrics-advisor.tgz '@rush-temp/ai-text-analytics': file:projects/ai-text-analytics.tgz '@rush-temp/app-configuration': file:projects/app-configuration.tgz + '@rush-temp/arm-compute': file:projects/arm-compute.tgz '@rush-temp/arm-features': file:projects/arm-features.tgz '@rush-temp/arm-links': file:projects/arm-links.tgz '@rush-temp/arm-locks': file:projects/arm-locks.tgz @@ -8501,6 +8502,26 @@ packages: integrity: sha512-ZalbO4/h/8f18obNws6h9Qju+P5EJIMnv3QhqesAvVmFqlmBtbIZ/+utm2ytKiYraa1UziGIVa1rijUoVZX8TQ== tarball: file:projects/app-configuration.tgz version: 0.0.0 + file:projects/arm-compute.tgz: + dependencies: + '@microsoft/api-extractor': 7.7.11 + '@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 + mkdirp: 1.0.4 + rollup: 1.32.1 + rollup-plugin-node-resolve: 3.4.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.0 + typescript: 4.2.4 + uglify-js: 3.13.10 + dev: false + name: '@rush-temp/arm-compute' + resolution: + integrity: sha512-AFfYvORs6aoKWsklgNm3gOmLMF5RcP9kAduYwrJW7EO06vkdTvXu5mHoF6Sa7+AGxx0LI8596NcBtyVY+TvD9A== + tarball: file:projects/arm-compute.tgz + version: 0.0.0 file:projects/arm-features.tgz: dependencies: '@microsoft/api-extractor': 7.7.11 @@ -12199,6 +12220,7 @@ specifiers: '@rush-temp/ai-metrics-advisor': file:./projects/ai-metrics-advisor.tgz '@rush-temp/ai-text-analytics': file:./projects/ai-text-analytics.tgz '@rush-temp/app-configuration': file:./projects/app-configuration.tgz + '@rush-temp/arm-compute': file:./projects/arm-compute.tgz '@rush-temp/arm-features': file:./projects/arm-features.tgz '@rush-temp/arm-links': file:./projects/arm-links.tgz '@rush-temp/arm-locks': file:./projects/arm-locks.tgz diff --git a/rush.json b/rush.json index c77043f5e13e..66fbbc2989c7 100644 --- a/rush.json +++ b/rush.json @@ -794,6 +794,11 @@ "projectFolder": "sdk/remoterendering/mixed-reality-remote-rendering", "versionPolicyName": "client" }, + { + "packageName": "@azure/arm-compute", + "projectFolder": "sdk/compute/arm-compute", + "versionPolicyName": "management" + }, { "packageName": "@azure/arm-storage", "projectFolder": "sdk/storage/arm-storage", diff --git a/sdk/compute/arm-compute/CHANGELOG.md b/sdk/compute/arm-compute/CHANGELOG.md new file mode 100644 index 000000000000..83f9233f4022 --- /dev/null +++ b/sdk/compute/arm-compute/CHANGELOG.md @@ -0,0 +1,14 @@ +## 30.0.0-beta.1 (2021-07-15) + +This is the first preview for the new version of the `@azure/arm-compute` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services. + +While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/). + +Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies. + +**Noteworthy changes and features** +- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice. +- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead. +- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page. +- Long running operations i.e. the methods whose names started with `begin` now return a poller object that gives you a better control over the operation. To get the final result like before use the corresponding method that will have the suffix `AndWait`. +- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6. diff --git a/sdk/compute/arm-compute/LICENSE.txt b/sdk/compute/arm-compute/LICENSE similarity index 99% rename from sdk/compute/arm-compute/LICENSE.txt rename to sdk/compute/arm-compute/LICENSE index 2d3163745319..ccb63b166732 100644 --- a/sdk/compute/arm-compute/LICENSE.txt +++ b/sdk/compute/arm-compute/LICENSE @@ -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/compute/arm-compute/README.md b/sdk/compute/arm-compute/README.md index f80ecb561018..1b2146ed5bb2 100644 --- a/sdk/compute/arm-compute/README.md +++ b/sdk/compute/arm-compute/README.md @@ -1,116 +1,91 @@ -## Azure ComputeManagementClient SDK for JavaScript +# Azure ComputeManagement client library for JavaScript -This package contains an isomorphic SDK (runs both in node.js and in browsers) for ComputeManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ComputeManagement client. + +Compute Client + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/compute/arm-compute) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-compute) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-compute) | +[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-compute` package -To use this SDK in your project, you will need to install two packages. - -- `@azure/arm-compute` that contains the client. -- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. - -Install both packages using the below command: +Install the Azure ComputeManagement client library for JavaScript with `npm`: ```bash -npm install --save @azure/arm-compute @azure/identity +npm install @azure/arm-compute ``` -> **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 `ComputeManagementClient` -### How to use +To create a client object to access the Azure ComputeManagement API, you will need the `endpoint` of your Azure ComputeManagement resource and a `credential`. The Azure ComputeManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure ComputeManagement 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. +#### Using an Azure Active Directory Credential -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. +You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: -#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. +```bash +npm install @azure/identity +``` -##### Sample code +You will also need to register a new AAD application and grant access to Azure ComputeManagement 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`. ```javascript -const { DefaultAzureCredential } = require("@azure/identity"); const { ComputeManagementClient } = require("@azure/arm-compute"); -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 ComputeManagementClient(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 client = new ComputeManagementClient("", new DefaultAzureCredential()); ``` -#### 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-compute sample - - - - - - - +## Key concepts + +### ComputeManagementClient + +`ComputeManagementClient` is the primary interface for developers using the Azure ComputeManagement client library. Explore the methods on this client object to understand the different features of the Azure ComputeManagement 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 +import { setLogLevel } from "@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/master/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/master/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) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcompute%2Farm-compute%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/compute/arm-compute/README.png) +[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/master/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential diff --git a/sdk/compute/arm-compute/_meta.json b/sdk/compute/arm-compute/_meta.json new file mode 100644 index 000000000000..1cdb27d8afc7 --- /dev/null +++ b/sdk/compute/arm-compute/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "dc6782abab8ad67fdd04c94ef916727d208f7d2a", + "readme": "specification/compute/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 --typescript-sdks-folder=E:\\projects\\azure-sdk-for-js ../azure-rest-api-specs/specification/compute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.7", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-beta.7" +} \ No newline at end of file diff --git a/sdk/compute/arm-compute/api-extractor.json b/sdk/compute/arm-compute/api-extractor.json new file mode 100644 index 000000000000..5fb5b21b56f2 --- /dev/null +++ b/sdk/compute/arm-compute/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./esm/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./esm/index.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/compute/arm-compute/package.json b/sdk/compute/arm-compute/package.json index cb382df80381..28bc10139f6a 100644 --- a/sdk/compute/arm-compute/package.json +++ b/sdk/compute/arm-compute/package.json @@ -1,13 +1,20 @@ { "name": "@azure/arm-compute", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "ComputeManagementClient Library with typescript type definitions for node.js and browser.", - "version": "16.2.0", + "description": "A generated SDK for ComputeManagementClient.", + "version": "30.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-lro": "^2.0.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.1.1", + "@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", @@ -17,15 +24,21 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/arm-compute.js", - "module": "./esm/computeManagementClient.js", - "types": "./esm/computeManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./esm/index.js", + "types": "./esm/index.d.ts", "devDependencies": { - "typescript": "^3.6.0", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", + "@microsoft/api-extractor": "7.7.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" + "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute", "repository": { @@ -46,14 +59,40 @@ "esm/**/*.d.ts.map", "src/**/*.ts", "README.md", + "LICENSE", "rollup.config.js", - "tsconfig.json" + "tsconfig.json", + "review/*", + "CHANGELOG.md" ], "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-compute.js.map'\" -o ./dist/arm-compute.min.js ./dist/arm-compute.js", - "prepack": "npm install && npm run build" + "build": "tsc && rollup -c rollup.config.js && 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": "mkdirp ./review && api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "echo skipped", + "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": "echo skipped", + "prebuild": "echo skipped", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "echo skipped", + "unit-test:node": "echo skipped", + "unit-test:browser": "echo skipped", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "integration-test": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/compute/arm-compute/review/arm-compute.api.md b/sdk/compute/arm-compute/review/arm-compute.api.md new file mode 100644 index 000000000000..9b5d51e22483 --- /dev/null +++ b/sdk/compute/arm-compute/review/arm-compute.api.md @@ -0,0 +1,7234 @@ +## API Report File for "@azure/arm-compute" + +> 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'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export type AccessLevel = string; + +// @public +export interface AccessUri { + readonly accessSAS?: string; +} + +// @public +export interface AdditionalCapabilities { + ultraSSDEnabled?: boolean; +} + +// @public +export interface AdditionalUnattendContent { + componentName?: "Microsoft-Windows-Shell-Setup"; + content?: string; + passName?: "OobeSystem"; + settingName?: SettingNames; +} + +// @public +export type AggregatedReplicationState = string; + +// @public +export interface ApiEntityReference { + id?: string; +} + +// @public +export interface ApiError { + code?: string; + details?: ApiErrorBase[]; + innererror?: InnerError; + message?: string; + target?: string; +} + +// @public +export interface ApiErrorBase { + code?: string; + message?: string; + target?: string; +} + +// @public +export interface AutomaticOSUpgradePolicy { + disableAutomaticRollback?: boolean; + enableAutomaticOSUpgrade?: boolean; +} + +// @public +export interface AutomaticOSUpgradeProperties { + automaticOSUpgradeSupported: boolean; +} + +// @public +export interface AutomaticRepairsPolicy { + enabled?: boolean; + gracePeriod?: string; +} + +// @public +export type AvailabilitySet = Resource & { + sku?: Sku; + platformUpdateDomainCount?: number; + platformFaultDomainCount?: number; + virtualMachines?: SubResource[]; + proximityPlacementGroup?: SubResource; + readonly statuses?: InstanceViewStatus[]; +}; + +// @public +export interface AvailabilitySetListResult { + nextLink?: string; + value: AvailabilitySet[]; +} + +// @public +export interface AvailabilitySets { + createOrUpdate(resourceGroupName: string, availabilitySetName: string, parameters: AvailabilitySet, options?: AvailabilitySetsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, availabilitySetName: string, options?: AvailabilitySetsDeleteOptionalParams): Promise; + get(resourceGroupName: string, availabilitySetName: string, options?: AvailabilitySetsGetOptionalParams): Promise; + list(resourceGroupName: string, options?: AvailabilitySetsListOptionalParams): PagedAsyncIterableIterator; + listAvailableSizes(resourceGroupName: string, availabilitySetName: string, options?: AvailabilitySetsListAvailableSizesOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AvailabilitySetsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, availabilitySetName: string, parameters: AvailabilitySetUpdate, options?: AvailabilitySetsUpdateOptionalParams): Promise; +} + +// @public +export interface AvailabilitySetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; + +// @public +export interface AvailabilitySetsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AvailabilitySetsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailabilitySetsGetResponse = AvailabilitySet; + +// @public +export type AvailabilitySetSkuTypes = string; + +// @public +export interface AvailabilitySetsListAvailableSizesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailabilitySetsListAvailableSizesResponse = VirtualMachineSizeListResult; + +// @public +export interface AvailabilitySetsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type AvailabilitySetsListBySubscriptionNextResponse = AvailabilitySetListResult; + +// @public +export interface AvailabilitySetsListBySubscriptionOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult; + +// @public +export interface AvailabilitySetsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailabilitySetsListNextResponse = AvailabilitySetListResult; + +// @public +export interface AvailabilitySetsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailabilitySetsListResponse = AvailabilitySetListResult; + +// @public +export interface AvailabilitySetsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailabilitySetsUpdateResponse = AvailabilitySet; + +// @public +export type AvailabilitySetUpdate = UpdateResource & { + sku?: Sku; + platformUpdateDomainCount?: number; + platformFaultDomainCount?: number; + virtualMachines?: SubResource[]; + proximityPlacementGroup?: SubResource; + readonly statuses?: InstanceViewStatus[]; +}; + +// @public +export interface AvailablePatchSummary { + readonly assessmentActivityId?: string; + readonly criticalAndSecurityPatchCount?: number; + readonly error?: ApiError; + readonly lastModifiedTime?: Date; + readonly otherPatchCount?: number; + readonly rebootPending?: boolean; + readonly startTime?: Date; + readonly status?: PatchOperationStatus; +} + +// @public +export interface BillingProfile { + maxPrice?: number; +} + +// @public +export interface BootDiagnostics { + enabled?: boolean; + storageUri?: string; +} + +// @public +export interface BootDiagnosticsInstanceView { + readonly consoleScreenshotBlobUri?: string; + readonly serialConsoleLogBlobUri?: string; + readonly status?: InstanceViewStatus; +} + +// @public +export type CachingTypes = "None" | "ReadOnly" | "ReadWrite"; + +// @public +export interface CloudError { + error?: ApiError; +} + +// @public +export interface CloudService { + readonly id?: string; + location: string; + readonly name?: string; + properties?: CloudServiceProperties; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface CloudServiceExtensionProfile { + extensions?: Extension[]; +} + +// @public +export interface CloudServiceExtensionProperties { + autoUpgradeMinorVersion?: boolean; + forceUpdateTag?: string; + protectedSettings?: string; + // (undocumented) + protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; + readonly provisioningState?: string; + publisher?: string; + rolesAppliedTo?: string[]; + settings?: string; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export interface CloudServiceInstanceView { + readonly privateIds?: string[]; + roleInstance?: InstanceViewStatusesSummary; + readonly sdkVersion?: string; + readonly statuses?: ResourceInstanceViewStatus[]; +} + +// @public (undocumented) +export interface CloudServiceListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value: CloudService[]; +} + +// @public +export interface CloudServiceNetworkProfile { + loadBalancerConfigurations?: LoadBalancerConfiguration[]; + swappableCloudService?: SubResource; +} + +// @public +export interface CloudServiceOperatingSystems { + getOSFamily(location: string, osFamilyName: string, options?: CloudServiceOperatingSystemsGetOSFamilyOptionalParams): Promise; + getOSVersion(location: string, osVersionName: string, options?: CloudServiceOperatingSystemsGetOSVersionOptionalParams): Promise; + listOSFamilies(location: string, options?: CloudServiceOperatingSystemsListOSFamiliesOptionalParams): PagedAsyncIterableIterator; + listOSVersions(location: string, options?: CloudServiceOperatingSystemsListOSVersionsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CloudServiceOperatingSystemsGetOSFamilyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceOperatingSystemsGetOSFamilyResponse = OSFamily; + +// @public +export interface CloudServiceOperatingSystemsGetOSVersionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceOperatingSystemsGetOSVersionResponse = OSVersion; + +// @public +export interface CloudServiceOperatingSystemsListOSFamiliesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceOperatingSystemsListOSFamiliesNextResponse = OSFamilyListResult; + +// @public +export interface CloudServiceOperatingSystemsListOSFamiliesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceOperatingSystemsListOSFamiliesResponse = OSFamilyListResult; + +// @public +export interface CloudServiceOperatingSystemsListOSVersionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceOperatingSystemsListOSVersionsNextResponse = OSVersionListResult; + +// @public +export interface CloudServiceOperatingSystemsListOSVersionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceOperatingSystemsListOSVersionsResponse = OSVersionListResult; + +// @public +export interface CloudServiceOsProfile { + secrets?: CloudServiceVaultSecretGroup[]; +} + +// @public +export interface CloudServiceProperties { + allowModelOverride?: boolean; + configuration?: string; + configurationUrl?: string; + extensionProfile?: CloudServiceExtensionProfile; + networkProfile?: CloudServiceNetworkProfile; + osProfile?: CloudServiceOsProfile; + packageUrl?: string; + readonly provisioningState?: string; + roleProfile?: CloudServiceRoleProfile; + startCloudService?: boolean; + readonly uniqueId?: string; + upgradeMode?: CloudServiceUpgradeMode; +} + +// @public +export interface CloudServiceRole { + readonly id?: string; + readonly location?: string; + readonly name?: string; + // (undocumented) + properties?: CloudServiceRoleProperties; + sku?: CloudServiceRoleSku; + readonly type?: string; +} + +// @public +export interface CloudServiceRoleInstances { + beginDelete(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesDeleteOptionalParams): Promise; + beginRebuild(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams): Promise, void>>; + beginRebuildAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRebuildOptionalParams): Promise; + beginReimage(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams): Promise, void>>; + beginReimageAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesReimageOptionalParams): Promise; + beginRestart(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams): Promise, void>>; + beginRestartAndWait(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesRestartOptionalParams): Promise; + get(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesGetOptionalParams): Promise; + getInstanceView(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesGetInstanceViewOptionalParams): Promise; + getRemoteDesktopFile(roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams): Promise; + list(resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRoleInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CloudServiceRoleInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServiceRoleInstancesGetInstanceViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceRoleInstancesGetInstanceViewResponse = RoleInstanceView; + +// @public +export interface CloudServiceRoleInstancesGetOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export interface CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceRoleInstancesGetRemoteDesktopFileResponse = { + blobBody?: Promise; + readableStreamBody?: NodeJS.ReadableStream; +}; + +// @public +export type CloudServiceRoleInstancesGetResponse = RoleInstance; + +// @public +export interface CloudServiceRoleInstancesListNextOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type CloudServiceRoleInstancesListNextResponse = RoleInstanceListResult; + +// @public +export interface CloudServiceRoleInstancesListOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type CloudServiceRoleInstancesListResponse = RoleInstanceListResult; + +// @public +export interface CloudServiceRoleInstancesRebuildOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServiceRoleInstancesReimageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServiceRoleInstancesRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public (undocumented) +export interface CloudServiceRoleListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value: CloudServiceRole[]; +} + +// @public +export interface CloudServiceRoleProfile { + roles?: CloudServiceRoleProfileProperties[]; +} + +// @public +export interface CloudServiceRoleProfileProperties { + name?: string; + sku?: CloudServiceRoleSku; +} + +// @public (undocumented) +export interface CloudServiceRoleProperties { + readonly uniqueId?: string; +} + +// @public +export interface CloudServiceRoles { + get(roleName: string, resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRolesGetOptionalParams): Promise; + list(resourceGroupName: string, cloudServiceName: string, options?: CloudServiceRolesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CloudServiceRolesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceRolesGetResponse = CloudServiceRole; + +// @public +export interface CloudServiceRoleSku { + capacity?: number; + name?: string; + tier?: string; +} + +// @public +export interface CloudServiceRolesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceRolesListNextResponse = CloudServiceRoleListResult; + +// @public +export interface CloudServiceRolesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServiceRolesListResponse = CloudServiceRoleListResult; + +// @public +export interface CloudServices { + beginCreateOrUpdate(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams): Promise, CloudServicesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteOptionalParams): Promise; + beginDeleteInstances(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams): Promise, void>>; + beginDeleteInstancesAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesDeleteInstancesOptionalParams): Promise; + beginPowerOff(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams): Promise, void>>; + beginPowerOffAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesPowerOffOptionalParams): Promise; + beginRebuild(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams): Promise, void>>; + beginRebuildAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRebuildOptionalParams): Promise; + beginReimage(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams): Promise, void>>; + beginReimageAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesReimageOptionalParams): Promise; + beginRestart(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams): Promise, void>>; + beginRestartAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesRestartOptionalParams): Promise; + beginStart(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesStartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateOptionalParams): Promise, CloudServicesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateOptionalParams): Promise; + get(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesGetOptionalParams): Promise; + getInstanceView(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesGetInstanceViewOptionalParams): Promise; + list(resourceGroupName: string, options?: CloudServicesListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: CloudServicesListAllOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CloudServicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + parameters?: CloudService; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CloudServicesCreateOrUpdateResponse = CloudService; + +// @public +export interface CloudServicesDeleteInstancesOptionalParams extends coreClient.OperationOptions { + parameters?: RoleInstances; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesGetInstanceViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesGetInstanceViewResponse = CloudServiceInstanceView; + +// @public +export interface CloudServicesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesGetResponse = CloudService; + +// @public +export interface CloudServicesListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesListAllNextResponse = CloudServiceListResult; + +// @public +export interface CloudServicesListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesListAllResponse = CloudServiceListResult; + +// @public +export interface CloudServicesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesListNextResponse = CloudServiceListResult; + +// @public +export interface CloudServicesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesListResponse = CloudServiceListResult; + +// @public +export interface CloudServicesPowerOffOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesRebuildOptionalParams extends coreClient.OperationOptions { + parameters?: RoleInstances; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesReimageOptionalParams extends coreClient.OperationOptions { + parameters?: RoleInstances; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesRestartOptionalParams extends coreClient.OperationOptions { + parameters?: RoleInstances; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesUpdateDomain { + beginWalkUpdateDomain(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams): Promise, void>>; + beginWalkUpdateDomainAndWait(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams): Promise; + getUpdateDomain(resourceGroupName: string, cloudServiceName: string, updateDomain: number, options?: CloudServicesUpdateDomainGetUpdateDomainOptionalParams): Promise; + listUpdateDomains(resourceGroupName: string, cloudServiceName: string, options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CloudServicesUpdateDomainGetUpdateDomainOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesUpdateDomainGetUpdateDomainResponse = UpdateDomain; + +// @public +export interface CloudServicesUpdateDomainListUpdateDomainsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesUpdateDomainListUpdateDomainsNextResponse = UpdateDomainListResult; + +// @public +export interface CloudServicesUpdateDomainListUpdateDomainsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudServicesUpdateDomainListUpdateDomainsResponse = UpdateDomainListResult; + +// @public +export interface CloudServicesUpdateDomainWalkUpdateDomainOptionalParams extends coreClient.OperationOptions { + parameters?: UpdateDomain; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CloudServicesUpdateOptionalParams extends coreClient.OperationOptions { + parameters?: CloudServiceUpdate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CloudServicesUpdateResponse = CloudService; + +// @public (undocumented) +export interface CloudServiceUpdate { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type CloudServiceUpgradeMode = string; + +// @public (undocumented) +export interface CloudServiceVaultAndSecretReference { + // (undocumented) + secretUrl?: string; + // (undocumented) + sourceVault?: SubResource; +} + +// @public +export interface CloudServiceVaultCertificate { + certificateUrl?: string; +} + +// @public +export interface CloudServiceVaultSecretGroup { + sourceVault?: SubResource; + vaultCertificates?: CloudServiceVaultCertificate[]; +} + +// @public (undocumented) +export class ComputeManagementClient extends ComputeManagementClientContext { + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ComputeManagementClientOptionalParams); + // (undocumented) + availabilitySets: AvailabilitySets; + // (undocumented) + cloudServiceOperatingSystems: CloudServiceOperatingSystems; + // (undocumented) + cloudServiceRoleInstances: CloudServiceRoleInstances; + // (undocumented) + cloudServiceRoles: CloudServiceRoles; + // (undocumented) + cloudServices: CloudServices; + // (undocumented) + cloudServicesUpdateDomain: CloudServicesUpdateDomain; + // (undocumented) + dedicatedHostGroups: DedicatedHostGroups; + // (undocumented) + dedicatedHosts: DedicatedHosts; + // (undocumented) + diskAccesses: DiskAccesses; + // (undocumented) + diskEncryptionSets: DiskEncryptionSets; + // (undocumented) + diskRestorePointOperations: DiskRestorePointOperations; + // (undocumented) + disks: Disks; + // (undocumented) + galleries: Galleries; + // (undocumented) + galleryApplications: GalleryApplications; + // (undocumented) + galleryApplicationVersions: GalleryApplicationVersions; + // (undocumented) + galleryImages: GalleryImages; + // (undocumented) + galleryImageVersions: GalleryImageVersions; + // (undocumented) + gallerySharingProfile: GallerySharingProfile; + // (undocumented) + images: Images; + // (undocumented) + logAnalytics: LogAnalytics; + // (undocumented) + operations: Operations; + // (undocumented) + proximityPlacementGroups: ProximityPlacementGroups; + // (undocumented) + resourceSkus: ResourceSkus; + // (undocumented) + restorePointCollections: RestorePointCollections; + // (undocumented) + restorePoints: RestorePoints; + // (undocumented) + sharedGalleries: SharedGalleries; + // (undocumented) + sharedGalleryImages: SharedGalleryImages; + // (undocumented) + sharedGalleryImageVersions: SharedGalleryImageVersions; + // (undocumented) + snapshots: Snapshots; + // (undocumented) + sshPublicKeys: SshPublicKeys; + // (undocumented) + usageOperations: UsageOperations; + // (undocumented) + virtualMachineExtensionImages: VirtualMachineExtensionImages; + // (undocumented) + virtualMachineExtensions: VirtualMachineExtensions; + // (undocumented) + virtualMachineImages: VirtualMachineImages; + // (undocumented) + virtualMachineImagesEdgeZone: VirtualMachineImagesEdgeZone; + // (undocumented) + virtualMachineRunCommands: VirtualMachineRunCommands; + // (undocumented) + virtualMachines: VirtualMachines; + // (undocumented) + virtualMachineScaleSetExtensions: VirtualMachineScaleSetExtensions; + // (undocumented) + virtualMachineScaleSetRollingUpgrades: VirtualMachineScaleSetRollingUpgrades; + // (undocumented) + virtualMachineScaleSets: VirtualMachineScaleSets; + // (undocumented) + virtualMachineScaleSetVMExtensions: VirtualMachineScaleSetVMExtensions; + // (undocumented) + virtualMachineScaleSetVMRunCommands: VirtualMachineScaleSetVMRunCommands; + // (undocumented) + virtualMachineScaleSetVMs: VirtualMachineScaleSetVMs; + // (undocumented) + virtualMachineSizes: VirtualMachineSizes; +} + +// @public (undocumented) +export class ComputeManagementClientContext extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ComputeManagementClientOptionalParams); + // (undocumented) + subscriptionId: string; +} + +// @public +export interface ComputeManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + endpoint?: string; +} + +// @public +export interface ComputeOperationListResult { + readonly value?: ComputeOperationValue[]; +} + +// @public +export interface ComputeOperationValue { + readonly description?: string; + readonly name?: string; + readonly operation?: string; + readonly origin?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export type ConsistencyModeTypes = string; + +// @public +export interface CreationData { + createOption: DiskCreateOption; + galleryImageReference?: ImageDiskReference; + imageReference?: ImageDiskReference; + logicalSectorSize?: number; + sourceResourceId?: string; + readonly sourceUniqueId?: string; + sourceUri?: string; + storageAccountId?: string; + uploadSizeBytes?: number; +} + +// @public +export interface DataDisk { + caching?: CachingTypes; + createOption: DiskCreateOptionTypes; + deleteOption?: DiskDeleteOptionTypes; + detachOption?: DiskDetachOptionTypes; + readonly diskIopsReadWrite?: number; + readonly diskMBpsReadWrite?: number; + diskSizeGB?: number; + image?: VirtualHardDisk; + lun: number; + managedDisk?: ManagedDiskParameters; + name?: string; + toBeDetached?: boolean; + vhd?: VirtualHardDisk; + writeAcceleratorEnabled?: boolean; +} + +// @public +export interface DataDiskImage { + readonly lun?: number; +} + +// @public +export type DataDiskImageEncryption = DiskImageEncryption & { + lun: number; +}; + +// @public +export type DedicatedHost = Resource & { + sku: Sku; + platformFaultDomain?: number; + autoReplaceOnFailure?: boolean; + readonly hostId?: string; + readonly virtualMachines?: SubResourceReadOnly[]; + licenseType?: DedicatedHostLicenseTypes; + readonly provisioningTime?: Date; + readonly provisioningState?: string; + readonly instanceView?: DedicatedHostInstanceView; +}; + +// @public +export interface DedicatedHostAllocatableVM { + count?: number; + vmSize?: string; +} + +// @public +export interface DedicatedHostAvailableCapacity { + allocatableVMs?: DedicatedHostAllocatableVM[]; +} + +// @public +export type DedicatedHostGroup = Resource & { + zones?: string[]; + platformFaultDomainCount?: number; + readonly hosts?: SubResourceReadOnly[]; + readonly instanceView?: DedicatedHostGroupInstanceView; + supportAutomaticPlacement?: boolean; +}; + +// @public (undocumented) +export interface DedicatedHostGroupInstanceView { + hosts?: DedicatedHostInstanceViewWithName[]; +} + +// @public +export interface DedicatedHostGroupListResult { + nextLink?: string; + value: DedicatedHostGroup[]; +} + +// @public +export interface DedicatedHostGroups { + createOrUpdate(resourceGroupName: string, hostGroupName: string, parameters: DedicatedHostGroup, options?: DedicatedHostGroupsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, hostGroupName: string, options?: DedicatedHostGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, hostGroupName: string, options?: DedicatedHostGroupsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: DedicatedHostGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: DedicatedHostGroupsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, hostGroupName: string, parameters: DedicatedHostGroupUpdate, options?: DedicatedHostGroupsUpdateOptionalParams): Promise; +} + +// @public +export interface DedicatedHostGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostGroupsCreateOrUpdateResponse = DedicatedHostGroup; + +// @public +export interface DedicatedHostGroupsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DedicatedHostGroupsGetOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type DedicatedHostGroupsGetResponse = DedicatedHostGroup; + +// @public +export interface DedicatedHostGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostGroupsListByResourceGroupNextResponse = DedicatedHostGroupListResult; + +// @public +export interface DedicatedHostGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostGroupsListByResourceGroupResponse = DedicatedHostGroupListResult; + +// @public +export interface DedicatedHostGroupsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostGroupsListBySubscriptionNextResponse = DedicatedHostGroupListResult; + +// @public +export interface DedicatedHostGroupsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostGroupsListBySubscriptionResponse = DedicatedHostGroupListResult; + +// @public +export interface DedicatedHostGroupsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostGroupsUpdateResponse = DedicatedHostGroup; + +// @public +export type DedicatedHostGroupUpdate = UpdateResource & { + zones?: string[]; + platformFaultDomainCount?: number; + readonly hosts?: SubResourceReadOnly[]; + readonly instanceView?: DedicatedHostGroupInstanceView; + supportAutomaticPlacement?: boolean; +}; + +// @public +export interface DedicatedHostInstanceView { + readonly assetId?: string; + availableCapacity?: DedicatedHostAvailableCapacity; + statuses?: InstanceViewStatus[]; +} + +// @public +export type DedicatedHostInstanceViewWithName = DedicatedHostInstanceView & { + readonly name?: string; +}; + +// @public +export type DedicatedHostLicenseTypes = "None" | "Windows_Server_Hybrid" | "Windows_Server_Perpetual"; + +// @public +export interface DedicatedHostListResult { + nextLink?: string; + value: DedicatedHost[]; +} + +// @public +export interface DedicatedHosts { + beginCreateOrUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams): Promise, DedicatedHostsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHost, options?: DedicatedHostsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams): Promise, DedicatedHostsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: DedicatedHostUpdate, options?: DedicatedHostsUpdateOptionalParams): Promise; + get(resourceGroupName: string, hostGroupName: string, hostName: string, options?: DedicatedHostsGetOptionalParams): Promise; + listByHostGroup(resourceGroupName: string, hostGroupName: string, options?: DedicatedHostsListByHostGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DedicatedHostsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DedicatedHostsCreateOrUpdateResponse = DedicatedHost; + +// @public +export interface DedicatedHostsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DedicatedHostsGetOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type DedicatedHostsGetResponse = DedicatedHost; + +// @public +export interface DedicatedHostsListByHostGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostsListByHostGroupNextResponse = DedicatedHostListResult; + +// @public +export interface DedicatedHostsListByHostGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DedicatedHostsListByHostGroupResponse = DedicatedHostListResult; + +// @public +export interface DedicatedHostsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DedicatedHostsUpdateResponse = DedicatedHost; + +// @public +export type DedicatedHostUpdate = UpdateResource & { + platformFaultDomain?: number; + autoReplaceOnFailure?: boolean; + readonly hostId?: string; + readonly virtualMachines?: SubResourceReadOnly[]; + licenseType?: DedicatedHostLicenseTypes; + readonly provisioningTime?: Date; + readonly provisioningState?: string; + readonly instanceView?: DedicatedHostInstanceView; +}; + +// @public +export type DeleteOptions = string; + +// @public +export interface DiagnosticsProfile { + bootDiagnostics?: BootDiagnostics; +} + +// @public +export type DiffDiskOptions = string; + +// @public +export type DiffDiskPlacement = string; + +// @public +export interface DiffDiskSettings { + option?: DiffDiskOptions; + placement?: DiffDiskPlacement; +} + +// @public +export interface Disallowed { + diskTypes?: string[]; +} + +// @public +export interface DisallowedConfiguration { + vmDiskType?: VmDiskTypes; +} + +// @public +export type Disk = Resource & { + readonly managedBy?: string; + readonly managedByExtended?: string[]; + sku?: DiskSku; + zones?: string[]; + extendedLocation?: ExtendedLocation; + readonly timeCreated?: Date; + osType?: OperatingSystemTypes; + hyperVGeneration?: HyperVGeneration; + purchasePlan?: PurchasePlanAutoGenerated; + creationData?: CreationData; + diskSizeGB?: number; + readonly diskSizeBytes?: number; + readonly uniqueId?: string; + encryptionSettingsCollection?: EncryptionSettingsCollection; + readonly provisioningState?: string; + diskIopsReadWrite?: number; + diskMBpsReadWrite?: number; + diskIopsReadOnly?: number; + diskMBpsReadOnly?: number; + readonly diskState?: DiskState; + encryption?: Encryption; + maxShares?: number; + readonly shareInfo?: ShareInfoElement[]; + networkAccessPolicy?: NetworkAccessPolicy; + diskAccessId?: string; + tier?: string; + burstingEnabled?: boolean; + readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; + supportsHibernation?: boolean; + securityProfile?: DiskSecurityProfile; +}; + +// @public +export type DiskAccess = Resource & { + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: string; + readonly timeCreated?: Date; +}; + +// @public +export interface DiskAccesses { + beginCreateOrUpdate(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams): Promise, DiskAccessesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccess, options?: DiskAccessesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesDeleteOptionalParams): Promise; + beginDeleteAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams): Promise, void>>; + beginDeleteAPrivateEndpointConnectionAndWait(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams): Promise; + beginUpdate(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams): Promise, DiskAccessesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, diskAccessName: string, diskAccess: DiskAccessUpdate, options?: DiskAccessesUpdateOptionalParams): Promise; + beginUpdateAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams): Promise, DiskAccessesUpdateAPrivateEndpointConnectionResponse>>; + beginUpdateAPrivateEndpointConnectionAndWait(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams): Promise; + get(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesGetOptionalParams): Promise; + getAPrivateEndpointConnection(resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, options?: DiskAccessesGetAPrivateEndpointConnectionOptionalParams): Promise; + getPrivateLinkResources(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesGetPrivateLinkResourcesOptionalParams): Promise; + list(options?: DiskAccessesListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: DiskAccessesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listPrivateEndpointConnections(resourceGroupName: string, diskAccessName: string, options?: DiskAccessesListPrivateEndpointConnectionsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DiskAccessesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskAccessesCreateOrUpdateResponse = DiskAccess; + +// @public +export interface DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskAccessesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskAccessesGetAPrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesGetAPrivateEndpointConnectionResponse = PrivateEndpointConnection; + +// @public +export interface DiskAccessesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DiskAccessesGetPrivateLinkResourcesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesGetPrivateLinkResourcesResponse = PrivateLinkResourceListResult; + +// @public +export type DiskAccessesGetResponse = DiskAccess; + +// @public +export interface DiskAccessesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesListByResourceGroupNextResponse = DiskAccessList; + +// @public +export interface DiskAccessesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesListByResourceGroupResponse = DiskAccessList; + +// @public +export interface DiskAccessesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesListNextResponse = DiskAccessList; + +// @public +export interface DiskAccessesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DiskAccessesListPrivateEndpointConnectionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesListPrivateEndpointConnectionsNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface DiskAccessesListPrivateEndpointConnectionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskAccessesListPrivateEndpointConnectionsResponse = PrivateEndpointConnectionListResult; + +// @public +export type DiskAccessesListResponse = DiskAccessList; + +// @public +export interface DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskAccessesUpdateAPrivateEndpointConnectionResponse = PrivateEndpointConnection; + +// @public +export interface DiskAccessesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskAccessesUpdateResponse = DiskAccess; + +// @public +export interface DiskAccessList { + nextLink?: string; + value: DiskAccess[]; +} + +// @public +export interface DiskAccessUpdate { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type DiskCreateOption = string; + +// @public +export type DiskCreateOptionTypes = string; + +// @public +export type DiskDeleteOptionTypes = string; + +// @public +export type DiskDetachOptionTypes = string; + +// @public +export type DiskEncryptionSet = Resource & { + identity?: EncryptionSetIdentity; + encryptionType?: DiskEncryptionSetType; + activeKey?: KeyForDiskEncryptionSet; + readonly previousKeys?: KeyForDiskEncryptionSet[]; + readonly provisioningState?: string; + rotationToLatestKeyVersionEnabled?: boolean; + readonly lastKeyRotationTimestamp?: Date; +}; + +// @public +export type DiskEncryptionSetIdentityType = string; + +// @public +export interface DiskEncryptionSetList { + nextLink?: string; + value: DiskEncryptionSet[]; +} + +// @public +export type DiskEncryptionSetParameters = SubResource & {}; + +// @public +export interface DiskEncryptionSets { + beginCreateOrUpdate(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams): Promise, DiskEncryptionSetsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSet, options?: DiskEncryptionSetsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams): Promise, DiskEncryptionSetsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, diskEncryptionSetName: string, diskEncryptionSet: DiskEncryptionSetUpdate, options?: DiskEncryptionSetsUpdateOptionalParams): Promise; + get(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsGetOptionalParams): Promise; + list(options?: DiskEncryptionSetsListOptionalParams): PagedAsyncIterableIterator; + listAssociatedResources(resourceGroupName: string, diskEncryptionSetName: string, options?: DiskEncryptionSetsListAssociatedResourcesOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: DiskEncryptionSetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DiskEncryptionSetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskEncryptionSetsCreateOrUpdateResponse = DiskEncryptionSet; + +// @public +export interface DiskEncryptionSetsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskEncryptionSetsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsGetResponse = DiskEncryptionSet; + +// @public +export interface DiskEncryptionSetsListAssociatedResourcesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsListAssociatedResourcesNextResponse = ResourceUriList; + +// @public +export interface DiskEncryptionSetsListAssociatedResourcesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsListAssociatedResourcesResponse = ResourceUriList; + +// @public +export interface DiskEncryptionSetsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsListByResourceGroupNextResponse = DiskEncryptionSetList; + +// @public +export interface DiskEncryptionSetsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsListByResourceGroupResponse = DiskEncryptionSetList; + +// @public +export interface DiskEncryptionSetsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsListNextResponse = DiskEncryptionSetList; + +// @public +export interface DiskEncryptionSetsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskEncryptionSetsListResponse = DiskEncryptionSetList; + +// @public +export interface DiskEncryptionSetsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskEncryptionSetsUpdateResponse = DiskEncryptionSet; + +// @public +export interface DiskEncryptionSettings { + diskEncryptionKey?: KeyVaultSecretReference; + enabled?: boolean; + keyEncryptionKey?: KeyVaultKeyReference; +} + +// @public +export type DiskEncryptionSetType = string; + +// @public +export interface DiskEncryptionSetUpdate { + activeKey?: KeyForDiskEncryptionSet; + encryptionType?: DiskEncryptionSetType; + identity?: EncryptionSetIdentity; + rotationToLatestKeyVersionEnabled?: boolean; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface DiskImageEncryption { + diskEncryptionSetId?: string; +} + +// @public +export interface DiskInstanceView { + encryptionSettings?: DiskEncryptionSettings[]; + name?: string; + statuses?: InstanceViewStatus[]; +} + +// @public +export interface DiskList { + nextLink?: string; + value: Disk[]; +} + +// @public +export type DiskRestorePoint = ProxyOnlyResource & { + readonly timeCreated?: Date; + readonly sourceResourceId?: string; + readonly osType?: OperatingSystemTypes; + hyperVGeneration?: HyperVGeneration; + purchasePlan?: PurchasePlanAutoGenerated; + readonly familyId?: string; + readonly sourceUniqueId?: string; + readonly encryption?: Encryption; + supportsHibernation?: boolean; +}; + +// @public +export interface DiskRestorePointList { + nextLink?: string; + value: DiskRestorePoint[]; +} + +// @public +export interface DiskRestorePointOperations { + beginGrantAccess(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, grantAccessData: GrantAccessData, options?: DiskRestorePointOperationsGrantAccessOptionalParams): Promise, DiskRestorePointOperationsGrantAccessResponse>>; + beginGrantAccessAndWait(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, grantAccessData: GrantAccessData, options?: DiskRestorePointOperationsGrantAccessOptionalParams): Promise; + beginRevokeAccess(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointOperationsRevokeAccessOptionalParams): Promise, void>>; + beginRevokeAccessAndWait(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointOperationsRevokeAccessOptionalParams): Promise; + get(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, options?: DiskRestorePointOperationsGetOptionalParams): Promise; + listByRestorePoint(resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, options?: DiskRestorePointOperationsListByRestorePointOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DiskRestorePointOperationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskRestorePointOperationsGetResponse = DiskRestorePoint; + +// @public +export interface DiskRestorePointOperationsGrantAccessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskRestorePointOperationsGrantAccessResponse = AccessUri; + +// @public +export interface DiskRestorePointOperationsListByRestorePointNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskRestorePointOperationsListByRestorePointNextResponse = DiskRestorePointList; + +// @public +export interface DiskRestorePointOperationsListByRestorePointOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiskRestorePointOperationsListByRestorePointResponse = DiskRestorePointList; + +// @public +export interface DiskRestorePointOperationsRevokeAccessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface Disks { + beginCreateOrUpdate(resourceGroupName: string, diskName: string, disk: Disk, options?: DisksCreateOrUpdateOptionalParams): Promise, DisksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, diskName: string, disk: Disk, options?: DisksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, diskName: string, options?: DisksDeleteOptionalParams): Promise; + beginGrantAccess(resourceGroupName: string, diskName: string, grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams): Promise, DisksGrantAccessResponse>>; + beginGrantAccessAndWait(resourceGroupName: string, diskName: string, grantAccessData: GrantAccessData, options?: DisksGrantAccessOptionalParams): Promise; + beginRevokeAccess(resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams): Promise, void>>; + beginRevokeAccessAndWait(resourceGroupName: string, diskName: string, options?: DisksRevokeAccessOptionalParams): Promise; + beginUpdate(resourceGroupName: string, diskName: string, disk: DiskUpdate, options?: DisksUpdateOptionalParams): Promise, DisksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, diskName: string, disk: DiskUpdate, options?: DisksUpdateOptionalParams): Promise; + get(resourceGroupName: string, diskName: string, options?: DisksGetOptionalParams): Promise; + list(options?: DisksListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: DisksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DisksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DisksCreateOrUpdateResponse = Disk; + +// @public +export interface DisksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DiskSecurityProfile { + securityType?: DiskSecurityTypes; +} + +// @public +export type DiskSecurityTypes = string; + +// @public +export interface DisksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DisksGetResponse = Disk; + +// @public +export interface DisksGrantAccessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DisksGrantAccessResponse = AccessUri; + +// @public +export interface DiskSku { + name?: DiskStorageAccountTypes; + readonly tier?: string; +} + +// @public +export interface DisksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DisksListByResourceGroupNextResponse = DiskList; + +// @public +export interface DisksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DisksListByResourceGroupResponse = DiskList; + +// @public +export interface DisksListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DisksListNextResponse = DiskList; + +// @public +export interface DisksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DisksListResponse = DiskList; + +// @public +export interface DisksRevokeAccessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiskState = string; + +// @public +export type DiskStorageAccountTypes = string; + +// @public +export interface DisksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DisksUpdateResponse = Disk; + +// @public +export interface DiskUpdate { + burstingEnabled?: boolean; + diskAccessId?: string; + diskIopsReadOnly?: number; + diskIopsReadWrite?: number; + diskMBpsReadOnly?: number; + diskMBpsReadWrite?: number; + diskSizeGB?: number; + encryption?: Encryption; + encryptionSettingsCollection?: EncryptionSettingsCollection; + maxShares?: number; + networkAccessPolicy?: NetworkAccessPolicy; + osType?: OperatingSystemTypes; + readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; + purchasePlan?: PurchasePlanAutoGenerated; + sku?: DiskSku; + supportsHibernation?: boolean; + tags?: { + [propertyName: string]: string; + }; + tier?: string; +} + +// @public +export interface Encryption { + diskEncryptionSetId?: string; + type?: EncryptionType; +} + +// @public +export interface EncryptionImages { + dataDiskImages?: DataDiskImageEncryption[]; + osDiskImage?: OSDiskImageEncryption; +} + +// @public +export interface EncryptionSetIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: DiskEncryptionSetIdentityType; +} + +// @public +export interface EncryptionSettingsCollection { + enabled: boolean; + encryptionSettings?: EncryptionSettingsElement[]; + encryptionSettingsVersion?: string; +} + +// @public +export interface EncryptionSettingsElement { + diskEncryptionKey?: KeyVaultAndSecretReference; + keyEncryptionKey?: KeyVaultAndKeyReference; +} + +// @public +export type EncryptionType = string; + +// @public +export type ExecutionState = string; + +// @public +export type ExpandTypesForGetVMScaleSets = string; + +// @public +export interface ExtendedLocation { + name?: string; + type?: ExtendedLocationTypes; +} + +// @public +export type ExtendedLocationTypes = string; + +// @public +export interface Extension { + name?: string; + properties?: CloudServiceExtensionProperties; +} + +// @public +export interface Galleries { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise, GalleriesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, gallery: Gallery, options?: GalleriesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, options?: GalleriesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams): Promise, GalleriesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, gallery: GalleryUpdate, options?: GalleriesUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, options?: GalleriesGetOptionalParams): Promise; + list(options?: GalleriesListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: GalleriesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleriesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleriesCreateOrUpdateResponse = Gallery; + +// @public +export interface GalleriesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GalleriesGetOptionalParams extends coreClient.OperationOptions { + select?: SelectPermissions; +} + +// @public +export type GalleriesGetResponse = Gallery; + +// @public +export interface GalleriesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleriesListByResourceGroupNextResponse = GalleryList; + +// @public +export interface GalleriesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleriesListByResourceGroupResponse = GalleryList; + +// @public +export interface GalleriesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleriesListNextResponse = GalleryList; + +// @public +export interface GalleriesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleriesListResponse = GalleryList; + +// @public +export interface GalleriesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleriesUpdateResponse = Gallery; + +// @public +export type Gallery = Resource & { + description?: string; + identifier?: GalleryIdentifier; + readonly provisioningState?: GalleryPropertiesProvisioningState; + sharingProfile?: SharingProfile; +}; + +// @public +export type GalleryApplication = Resource & { + description?: string; + eula?: string; + privacyStatementUri?: string; + releaseNoteUri?: string; + endOfLifeDate?: Date; + supportedOSType?: OperatingSystemTypes; +}; + +// @public +export interface GalleryApplicationList { + nextLink?: string; + value: GalleryApplication[]; +} + +// @public +export interface GalleryApplications { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams): Promise, GalleryApplicationsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplication, options?: GalleryApplicationsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams): Promise, GalleryApplicationsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplication: GalleryApplicationUpdate, options?: GalleryApplicationsUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationsGetOptionalParams): Promise; + listByGallery(resourceGroupName: string, galleryName: string, options?: GalleryApplicationsListByGalleryOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryApplicationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryApplicationsCreateOrUpdateResponse = GalleryApplication; + +// @public +export interface GalleryApplicationsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GalleryApplicationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryApplicationsGetResponse = GalleryApplication; + +// @public +export interface GalleryApplicationsListByGalleryNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryApplicationsListByGalleryNextResponse = GalleryApplicationList; + +// @public +export interface GalleryApplicationsListByGalleryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryApplicationsListByGalleryResponse = GalleryApplicationList; + +// @public +export interface GalleryApplicationsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryApplicationsUpdateResponse = GalleryApplication; + +// @public +export type GalleryApplicationUpdate = UpdateResourceDefinition & { + description?: string; + eula?: string; + privacyStatementUri?: string; + releaseNoteUri?: string; + endOfLifeDate?: Date; + supportedOSType?: OperatingSystemTypes; +}; + +// @public +export type GalleryApplicationVersion = Resource & { + publishingProfile?: GalleryApplicationVersionPublishingProfile; + readonly provisioningState?: GalleryApplicationVersionPropertiesProvisioningState; + readonly replicationStatus?: ReplicationStatus; +}; + +// @public +export interface GalleryApplicationVersionList { + nextLink?: string; + value: GalleryApplicationVersion[]; +} + +// @public +export type GalleryApplicationVersionPropertiesProvisioningState = string; + +// @public +export type GalleryApplicationVersionPublishingProfile = GalleryArtifactPublishingProfileBase & { + source: UserArtifactSource; + manageActions?: UserArtifactManage; + enableHealthCheck?: boolean; +}; + +// @public +export interface GalleryApplicationVersions { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams): Promise, GalleryApplicationVersionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersion, options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams): Promise, GalleryApplicationVersionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, galleryApplicationVersion: GalleryApplicationVersionUpdate, options?: GalleryApplicationVersionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, options?: GalleryApplicationVersionsGetOptionalParams): Promise; + listByGalleryApplication(resourceGroupName: string, galleryName: string, galleryApplicationName: string, options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryApplicationVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryApplicationVersionsCreateOrUpdateResponse = GalleryApplicationVersion; + +// @public +export interface GalleryApplicationVersionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GalleryApplicationVersionsGetOptionalParams extends coreClient.OperationOptions { + expand?: ReplicationStatusTypes; +} + +// @public +export type GalleryApplicationVersionsGetResponse = GalleryApplicationVersion; + +// @public +export interface GalleryApplicationVersionsListByGalleryApplicationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryApplicationVersionsListByGalleryApplicationNextResponse = GalleryApplicationVersionList; + +// @public +export interface GalleryApplicationVersionsListByGalleryApplicationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryApplicationVersionsListByGalleryApplicationResponse = GalleryApplicationVersionList; + +// @public +export interface GalleryApplicationVersionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryApplicationVersionsUpdateResponse = GalleryApplicationVersion; + +// @public +export type GalleryApplicationVersionUpdate = UpdateResourceDefinition & { + publishingProfile?: GalleryApplicationVersionPublishingProfile; + readonly provisioningState?: GalleryApplicationVersionPropertiesProvisioningState; + readonly replicationStatus?: ReplicationStatus; +}; + +// @public +export interface GalleryArtifactPublishingProfileBase { + endOfLifeDate?: Date; + excludeFromLatest?: boolean; + readonly publishedDate?: Date; + replicaCount?: number; + storageAccountType?: StorageAccountType; + targetRegions?: TargetRegion[]; +} + +// @public +export interface GalleryArtifactSource { + managedImage: ManagedArtifact; +} + +// @public +export interface GalleryArtifactVersionSource { + id?: string; + uri?: string; +} + +// @public +export type GalleryDataDiskImage = GalleryDiskImage & { + lun: number; +}; + +// @public +export interface GalleryDiskImage { + hostCaching?: HostCaching; + readonly sizeInGB?: number; + source?: GalleryArtifactVersionSource; +} + +// @public +export interface GalleryIdentifier { + readonly uniqueName?: string; +} + +// @public +export type GalleryImage = Resource & { + description?: string; + eula?: string; + privacyStatementUri?: string; + releaseNoteUri?: string; + osType?: OperatingSystemTypes; + osState?: OperatingSystemStateTypes; + hyperVGeneration?: HyperVGeneration; + endOfLifeDate?: Date; + identifier?: GalleryImageIdentifier; + recommended?: RecommendedMachineConfiguration; + disallowed?: Disallowed; + purchasePlan?: ImagePurchasePlan; + readonly provisioningState?: GalleryImagePropertiesProvisioningState; + features?: GalleryImageFeature[]; +}; + +// @public +export interface GalleryImageFeature { + name?: string; + value?: string; +} + +// @public +export interface GalleryImageIdentifier { + offer: string; + publisher: string; + sku: string; +} + +// @public +export interface GalleryImageList { + nextLink?: string; + value: GalleryImage[]; +} + +// @public +export type GalleryImagePropertiesProvisioningState = string; + +// @public +export interface GalleryImages { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise, GalleryImagesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImage, options?: GalleryImagesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams): Promise, GalleryImagesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImage: GalleryImageUpdate, options?: GalleryImagesUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImagesGetOptionalParams): Promise; + listByGallery(resourceGroupName: string, galleryName: string, options?: GalleryImagesListByGalleryOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryImagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryImagesCreateOrUpdateResponse = GalleryImage; + +// @public +export interface GalleryImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GalleryImagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryImagesGetResponse = GalleryImage; + +// @public +export interface GalleryImagesListByGalleryNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryImagesListByGalleryNextResponse = GalleryImageList; + +// @public +export interface GalleryImagesListByGalleryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryImagesListByGalleryResponse = GalleryImageList; + +// @public +export interface GalleryImagesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryImagesUpdateResponse = GalleryImage; + +// @public +export type GalleryImageUpdate = UpdateResourceDefinition & { + description?: string; + eula?: string; + privacyStatementUri?: string; + releaseNoteUri?: string; + osType?: OperatingSystemTypes; + osState?: OperatingSystemStateTypes; + hyperVGeneration?: HyperVGeneration; + endOfLifeDate?: Date; + identifier?: GalleryImageIdentifier; + recommended?: RecommendedMachineConfiguration; + disallowed?: Disallowed; + purchasePlan?: ImagePurchasePlan; + readonly provisioningState?: GalleryImagePropertiesProvisioningState; + features?: GalleryImageFeature[]; +}; + +// @public +export type GalleryImageVersion = Resource & { + publishingProfile?: GalleryImageVersionPublishingProfile; + readonly provisioningState?: GalleryImageVersionPropertiesProvisioningState; + storageProfile?: GalleryImageVersionStorageProfile; + readonly replicationStatus?: ReplicationStatus; +}; + +// @public +export interface GalleryImageVersionList { + nextLink?: string; + value: GalleryImageVersion[]; +} + +// @public +export type GalleryImageVersionPropertiesProvisioningState = string; + +// @public +export type GalleryImageVersionPublishingProfile = GalleryArtifactPublishingProfileBase & {}; + +// @public +export interface GalleryImageVersions { + beginCreateOrUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams): Promise, GalleryImageVersionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersion, options?: GalleryImageVersionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams): Promise, GalleryImageVersionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, galleryImageVersion: GalleryImageVersionUpdate, options?: GalleryImageVersionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, options?: GalleryImageVersionsGetOptionalParams): Promise; + listByGalleryImage(resourceGroupName: string, galleryName: string, galleryImageName: string, options?: GalleryImageVersionsListByGalleryImageOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GalleryImageVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryImageVersionsCreateOrUpdateResponse = GalleryImageVersion; + +// @public +export interface GalleryImageVersionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GalleryImageVersionsGetOptionalParams extends coreClient.OperationOptions { + expand?: ReplicationStatusTypes; +} + +// @public +export type GalleryImageVersionsGetResponse = GalleryImageVersion; + +// @public +export interface GalleryImageVersionsListByGalleryImageNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryImageVersionsListByGalleryImageNextResponse = GalleryImageVersionList; + +// @public +export interface GalleryImageVersionsListByGalleryImageOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GalleryImageVersionsListByGalleryImageResponse = GalleryImageVersionList; + +// @public +export interface GalleryImageVersionStorageProfile { + dataDiskImages?: GalleryDataDiskImage[]; + osDiskImage?: GalleryOSDiskImage; + source?: GalleryArtifactVersionSource; +} + +// @public +export interface GalleryImageVersionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GalleryImageVersionsUpdateResponse = GalleryImageVersion; + +// @public +export type GalleryImageVersionUpdate = UpdateResourceDefinition & { + publishingProfile?: GalleryImageVersionPublishingProfile; + readonly provisioningState?: GalleryImageVersionPropertiesProvisioningState; + storageProfile?: GalleryImageVersionStorageProfile; + readonly replicationStatus?: ReplicationStatus; +}; + +// @public +export interface GalleryList { + nextLink?: string; + value: Gallery[]; +} + +// @public +export type GalleryOSDiskImage = GalleryDiskImage & {}; + +// @public +export type GalleryPropertiesProvisioningState = string; + +// @public +export type GallerySharingPermissionTypes = string; + +// @public +export interface GallerySharingProfile { + beginUpdate(resourceGroupName: string, galleryName: string, sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams): Promise, GallerySharingProfileUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, galleryName: string, sharingUpdate: SharingUpdate, options?: GallerySharingProfileUpdateOptionalParams): Promise; +} + +// @public +export interface GallerySharingProfileUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GallerySharingProfileUpdateResponse = SharingUpdate; + +// @public +export type GalleryUpdate = UpdateResourceDefinition & { + description?: string; + identifier?: GalleryIdentifier; + readonly provisioningState?: GalleryPropertiesProvisioningState; + sharingProfile?: SharingProfile; +}; + +// @public +export interface GrantAccessData { + // (undocumented) + access: AccessLevel; + durationInSeconds: number; +} + +// @public +export interface HardwareProfile { + vmSize?: VirtualMachineSizeTypes; +} + +// @public +export type HostCaching = "None" | "ReadOnly" | "ReadWrite"; + +// @public +export type HyperVGeneration = string; + +// @public +export type HyperVGenerationType = string; + +// @public +export type HyperVGenerationTypes = string; + +// @public +export type Image = Resource & { + extendedLocation?: ExtendedLocation; + sourceVirtualMachine?: SubResource; + storageProfile?: ImageStorageProfile; + readonly provisioningState?: string; + hyperVGeneration?: HyperVGenerationTypes; +}; + +// @public +export type ImageDataDisk = ImageDisk & { + lun: number; +}; + +// @public +export interface ImageDisk { + blobUri?: string; + caching?: CachingTypes; + diskEncryptionSet?: DiskEncryptionSetParameters; + diskSizeGB?: number; + managedDisk?: SubResource; + snapshot?: SubResource; + storageAccountType?: StorageAccountTypes; +} + +// @public +export interface ImageDiskReference { + id: string; + lun?: number; +} + +// @public +export interface ImageListResult { + nextLink?: string; + value: Image[]; +} + +// @public +export type ImageOSDisk = ImageDisk & { + osType: OperatingSystemTypes; + osState: OperatingSystemStateTypes; +}; + +// @public +export interface ImagePurchasePlan { + name?: string; + product?: string; + publisher?: string; +} + +// @public +export type ImageReference = SubResource & { + publisher?: string; + offer?: string; + sku?: string; + version?: string; + readonly exactVersion?: string; +}; + +// @public +export interface Images { + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: Image, options?: ImagesCreateOrUpdateOptionalParams): Promise, ImagesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, imageName: string, parameters: Image, options?: ImagesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, imageName: string, options?: ImagesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, imageName: string, parameters: ImageUpdate, options?: ImagesUpdateOptionalParams): Promise, ImagesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, imageName: string, parameters: ImageUpdate, options?: ImagesUpdateOptionalParams): Promise; + get(resourceGroupName: string, imageName: string, options?: ImagesGetOptionalParams): Promise; + list(options?: ImagesListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ImagesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ImagesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ImagesCreateOrUpdateResponse = Image; + +// @public +export interface ImagesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ImagesGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type ImagesGetResponse = Image; + +// @public +export interface ImagesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImagesListByResourceGroupNextResponse = ImageListResult; + +// @public +export interface ImagesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImagesListByResourceGroupResponse = ImageListResult; + +// @public +export interface ImagesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImagesListNextResponse = ImageListResult; + +// @public +export interface ImagesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImagesListResponse = ImageListResult; + +// @public +export interface ImageStorageProfile { + dataDisks?: ImageDataDisk[]; + osDisk?: ImageOSDisk; + zoneResilient?: boolean; +} + +// @public +export interface ImagesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ImagesUpdateResponse = Image; + +// @public +export type ImageUpdate = UpdateResource & { + sourceVirtualMachine?: SubResource; + storageProfile?: ImageStorageProfile; + readonly provisioningState?: string; + hyperVGeneration?: HyperVGenerationTypes; +}; + +// @public +export interface InnerError { + errordetail?: string; + exceptiontype?: string; +} + +// @public (undocumented) +export interface InstanceSku { + readonly name?: string; + readonly tier?: string; +} + +// @public +export interface InstanceViewStatus { + code?: string; + displayStatus?: string; + level?: StatusLevelTypes; + message?: string; + time?: Date; +} + +// @public +export interface InstanceViewStatusesSummary { + readonly statusesSummary?: StatusCodeCount[]; +} + +// @public +export type InstanceViewTypes = "instanceView" | "userData"; + +// @public +export type IntervalInMins = "ThreeMins" | "FiveMins" | "ThirtyMins" | "SixtyMins"; + +// @public +export type IPVersion = string; + +// @public +export type IPVersions = string; + +// @public +export interface KeyForDiskEncryptionSet { + keyUrl: string; + sourceVault?: SourceVault; +} + +// @public +export interface KeyVaultAndKeyReference { + keyUrl: string; + sourceVault: SourceVault; +} + +// @public +export interface KeyVaultAndSecretReference { + secretUrl: string; + sourceVault: SourceVault; +} + +// @public +export interface KeyVaultKeyReference { + keyUrl: string; + sourceVault: SubResource; +} + +// @public +export interface KeyVaultSecretReference { + secretUrl: string; + sourceVault: SubResource; +} + +// @public +export enum KnownAccessLevel { + // (undocumented) + None = "None", + // (undocumented) + Read = "Read", + // (undocumented) + Write = "Write" +} + +// @public +export enum KnownAggregatedReplicationState { + // (undocumented) + Completed = "Completed", + // (undocumented) + Failed = "Failed", + // (undocumented) + InProgress = "InProgress", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownAvailabilitySetSkuTypes { + // (undocumented) + Aligned = "Aligned", + // (undocumented) + Classic = "Classic" +} + +// @public +export enum KnownCloudServiceUpgradeMode { + // (undocumented) + Auto = "Auto", + // (undocumented) + Manual = "Manual", + // (undocumented) + Simultaneous = "Simultaneous" +} + +// @public +export enum KnownConsistencyModeTypes { + // (undocumented) + ApplicationConsistent = "ApplicationConsistent", + // (undocumented) + CrashConsistent = "CrashConsistent", + // (undocumented) + FileSystemConsistent = "FileSystemConsistent" +} + +// @public +export enum KnownDeleteOptions { + // (undocumented) + Delete = "Delete", + // (undocumented) + Detach = "Detach" +} + +// @public +export enum KnownDiffDiskOptions { + // (undocumented) + Local = "Local" +} + +// @public +export enum KnownDiffDiskPlacement { + // (undocumented) + CacheDisk = "CacheDisk", + // (undocumented) + ResourceDisk = "ResourceDisk" +} + +// @public +export enum KnownDiskCreateOption { + Attach = "Attach", + Copy = "Copy", + Empty = "Empty", + FromImage = "FromImage", + Import = "Import", + Restore = "Restore", + Upload = "Upload" +} + +// @public +export enum KnownDiskCreateOptionTypes { + // (undocumented) + Attach = "Attach", + // (undocumented) + Empty = "Empty", + // (undocumented) + FromImage = "FromImage" +} + +// @public +export enum KnownDiskDeleteOptionTypes { + // (undocumented) + Delete = "Delete", + // (undocumented) + Detach = "Detach" +} + +// @public +export enum KnownDiskDetachOptionTypes { + // (undocumented) + ForceDetach = "ForceDetach" +} + +// @public +export enum KnownDiskEncryptionSetIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned" +} + +// @public +export enum KnownDiskEncryptionSetType { + EncryptionAtRestWithCustomerKey = "EncryptionAtRestWithCustomerKey", + EncryptionAtRestWithPlatformAndCustomerKeys = "EncryptionAtRestWithPlatformAndCustomerKeys" +} + +// @public +export enum KnownDiskSecurityTypes { + TrustedLaunch = "TrustedLaunch" +} + +// @public +export enum KnownDiskState { + ActiveSAS = "ActiveSAS", + ActiveUpload = "ActiveUpload", + Attached = "Attached", + ReadyToUpload = "ReadyToUpload", + Reserved = "Reserved", + Unattached = "Unattached" +} + +// @public +export enum KnownDiskStorageAccountTypes { + PremiumLRS = "Premium_LRS", + PremiumZRS = "Premium_ZRS", + StandardLRS = "Standard_LRS", + StandardSSDLRS = "StandardSSD_LRS", + StandardSSDZRS = "StandardSSD_ZRS", + UltraSSDLRS = "UltraSSD_LRS" +} + +// @public +export enum KnownEncryptionType { + EncryptionAtRestWithCustomerKey = "EncryptionAtRestWithCustomerKey", + EncryptionAtRestWithPlatformAndCustomerKeys = "EncryptionAtRestWithPlatformAndCustomerKeys", + EncryptionAtRestWithPlatformKey = "EncryptionAtRestWithPlatformKey" +} + +// @public +export enum KnownExecutionState { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + Pending = "Pending", + // (undocumented) + Running = "Running", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + TimedOut = "TimedOut", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownExpandTypesForGetVMScaleSets { + // (undocumented) + UserData = "userData" +} + +// @public +export enum KnownExtendedLocationTypes { + // (undocumented) + EdgeZone = "EdgeZone" +} + +// @public +export enum KnownGalleryApplicationVersionPropertiesProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Migrating = "Migrating", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownGalleryImagePropertiesProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Migrating = "Migrating", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownGalleryImageVersionPropertiesProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Migrating = "Migrating", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownGalleryPropertiesProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Migrating = "Migrating", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownGallerySharingPermissionTypes { + // (undocumented) + Groups = "Groups", + // (undocumented) + Private = "Private" +} + +// @public +export enum KnownHyperVGeneration { + // (undocumented) + V1 = "V1", + // (undocumented) + V2 = "V2" +} + +// @public +export enum KnownHyperVGenerationType { + // (undocumented) + V1 = "V1", + // (undocumented) + V2 = "V2" +} + +// @public +export enum KnownHyperVGenerationTypes { + // (undocumented) + V1 = "V1", + // (undocumented) + V2 = "V2" +} + +// @public +export enum KnownIPVersion { + // (undocumented) + IPv4 = "IPv4", + // (undocumented) + IPv6 = "IPv6" +} + +// @public +export enum KnownIPVersions { + // (undocumented) + IPv4 = "IPv4", + // (undocumented) + IPv6 = "IPv6" +} + +// @public +export enum KnownLinuxPatchAssessmentMode { + // (undocumented) + AutomaticByPlatform = "AutomaticByPlatform", + // (undocumented) + ImageDefault = "ImageDefault" +} + +// @public +export enum KnownLinuxVMGuestPatchMode { + // (undocumented) + AutomaticByPlatform = "AutomaticByPlatform", + // (undocumented) + ImageDefault = "ImageDefault" +} + +// @public +export enum KnownNetworkAccessPolicy { + AllowAll = "AllowAll", + AllowPrivate = "AllowPrivate", + DenyAll = "DenyAll" +} + +// @public +export enum KnownNetworkApiVersion { + // (undocumented) + TwoThousandTwenty1101 = "2020-11-01" +} + +// @public +export enum KnownOperatingSystemType { + // (undocumented) + Linux = "Linux", + // (undocumented) + Windows = "Windows" +} + +// @public +export enum KnownOrchestrationMode { + // (undocumented) + Flexible = "Flexible", + // (undocumented) + Uniform = "Uniform" +} + +// @public +export enum KnownOrchestrationServiceNames { + // (undocumented) + AutomaticRepairs = "AutomaticRepairs", + // (undocumented) + DummyOrchestrationServiceName = "DummyOrchestrationServiceName" +} + +// @public +export enum KnownOrchestrationServiceState { + // (undocumented) + NotRunning = "NotRunning", + // (undocumented) + Running = "Running", + // (undocumented) + Suspended = "Suspended" +} + +// @public +export enum KnownOrchestrationServiceStateAction { + // (undocumented) + Resume = "Resume", + // (undocumented) + Suspend = "Suspend" +} + +// @public +export enum KnownPatchAssessmentState { + // (undocumented) + Available = "Available", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownPatchInstallationState { + // (undocumented) + Excluded = "Excluded", + // (undocumented) + Failed = "Failed", + // (undocumented) + Installed = "Installed", + // (undocumented) + NotSelected = "NotSelected", + // (undocumented) + Pending = "Pending", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownPatchOperationStatus { + // (undocumented) + CompletedWithWarnings = "CompletedWithWarnings", + // (undocumented) + Failed = "Failed", + // (undocumented) + InProgress = "InProgress", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownPrivateEndpointConnectionProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownPrivateEndpointServiceConnectionStatus { + // (undocumented) + Approved = "Approved", + // (undocumented) + Pending = "Pending", + // (undocumented) + Rejected = "Rejected" +} + +// @public +export enum KnownProximityPlacementGroupType { + // (undocumented) + Standard = "Standard", + // (undocumented) + Ultra = "Ultra" +} + +// @public +export enum KnownPublicIPAddressSkuName { + // (undocumented) + Basic = "Basic", + // (undocumented) + Standard = "Standard" +} + +// @public +export enum KnownPublicIPAddressSkuTier { + // (undocumented) + Global = "Global", + // (undocumented) + Regional = "Regional" +} + +// @public +export enum KnownPublicIPAllocationMethod { + // (undocumented) + Dynamic = "Dynamic", + // (undocumented) + Static = "Static" +} + +// @public +export enum KnownReplicationState { + // (undocumented) + Completed = "Completed", + // (undocumented) + Failed = "Failed", + // (undocumented) + Replicating = "Replicating", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownReplicationStatusTypes { + // (undocumented) + ReplicationStatus = "ReplicationStatus" +} + +// @public +export enum KnownRestorePointCollectionExpandOptions { + // (undocumented) + RestorePoints = "restorePoints" +} + +// @public +export enum KnownSecurityTypes { + // (undocumented) + TrustedLaunch = "TrustedLaunch" +} + +// @public +export enum KnownSelectPermissions { + // (undocumented) + Permissions = "Permissions" +} + +// @public +export enum KnownSharedToValues { + // (undocumented) + Tenant = "tenant" +} + +// @public +export enum KnownSharingProfileGroupTypes { + // (undocumented) + AADTenants = "AADTenants", + // (undocumented) + Subscriptions = "Subscriptions" +} + +// @public +export enum KnownSharingUpdateOperationTypes { + // (undocumented) + Add = "Add", + // (undocumented) + Remove = "Remove", + // (undocumented) + Reset = "Reset" +} + +// @public +export enum KnownSnapshotStorageAccountTypes { + PremiumLRS = "Premium_LRS", + StandardLRS = "Standard_LRS", + StandardZRS = "Standard_ZRS" +} + +// @public +export enum KnownStorageAccountType { + // (undocumented) + PremiumLRS = "Premium_LRS", + // (undocumented) + StandardLRS = "Standard_LRS", + // (undocumented) + StandardZRS = "Standard_ZRS" +} + +// @public +export enum KnownStorageAccountTypes { + // (undocumented) + PremiumLRS = "Premium_LRS", + // (undocumented) + PremiumZRS = "Premium_ZRS", + // (undocumented) + StandardLRS = "Standard_LRS", + // (undocumented) + StandardSSDLRS = "StandardSSD_LRS", + // (undocumented) + StandardSSDZRS = "StandardSSD_ZRS", + // (undocumented) + UltraSSDLRS = "UltraSSD_LRS" +} + +// @public +export enum KnownVirtualMachineEvictionPolicyTypes { + // (undocumented) + Deallocate = "Deallocate", + // (undocumented) + Delete = "Delete" +} + +// @public +export enum KnownVirtualMachinePriorityTypes { + // (undocumented) + Low = "Low", + // (undocumented) + Regular = "Regular", + // (undocumented) + Spot = "Spot" +} + +// @public +export enum KnownVirtualMachineScaleSetScaleInRules { + // (undocumented) + Default = "Default", + // (undocumented) + NewestVM = "NewestVM", + // (undocumented) + OldestVM = "OldestVM" +} + +// @public +export enum KnownVirtualMachineSizeTypes { + // (undocumented) + BasicA0 = "Basic_A0", + // (undocumented) + BasicA1 = "Basic_A1", + // (undocumented) + BasicA2 = "Basic_A2", + // (undocumented) + BasicA3 = "Basic_A3", + // (undocumented) + BasicA4 = "Basic_A4", + // (undocumented) + StandardA0 = "Standard_A0", + // (undocumented) + StandardA1 = "Standard_A1", + // (undocumented) + StandardA10 = "Standard_A10", + // (undocumented) + StandardA11 = "Standard_A11", + // (undocumented) + StandardA1V2 = "Standard_A1_v2", + // (undocumented) + StandardA2 = "Standard_A2", + // (undocumented) + StandardA2MV2 = "Standard_A2m_v2", + // (undocumented) + StandardA2V2 = "Standard_A2_v2", + // (undocumented) + StandardA3 = "Standard_A3", + // (undocumented) + StandardA4 = "Standard_A4", + // (undocumented) + StandardA4MV2 = "Standard_A4m_v2", + // (undocumented) + StandardA4V2 = "Standard_A4_v2", + // (undocumented) + StandardA5 = "Standard_A5", + // (undocumented) + StandardA6 = "Standard_A6", + // (undocumented) + StandardA7 = "Standard_A7", + // (undocumented) + StandardA8 = "Standard_A8", + // (undocumented) + StandardA8MV2 = "Standard_A8m_v2", + // (undocumented) + StandardA8V2 = "Standard_A8_v2", + // (undocumented) + StandardA9 = "Standard_A9", + // (undocumented) + StandardB1Ms = "Standard_B1ms", + // (undocumented) + StandardB1S = "Standard_B1s", + // (undocumented) + StandardB2Ms = "Standard_B2ms", + // (undocumented) + StandardB2S = "Standard_B2s", + // (undocumented) + StandardB4Ms = "Standard_B4ms", + // (undocumented) + StandardB8Ms = "Standard_B8ms", + // (undocumented) + StandardD1 = "Standard_D1", + // (undocumented) + StandardD11 = "Standard_D11", + // (undocumented) + StandardD11V2 = "Standard_D11_v2", + // (undocumented) + StandardD12 = "Standard_D12", + // (undocumented) + StandardD12V2 = "Standard_D12_v2", + // (undocumented) + StandardD13 = "Standard_D13", + // (undocumented) + StandardD13V2 = "Standard_D13_v2", + // (undocumented) + StandardD14 = "Standard_D14", + // (undocumented) + StandardD14V2 = "Standard_D14_v2", + // (undocumented) + StandardD15V2 = "Standard_D15_v2", + // (undocumented) + StandardD16SV3 = "Standard_D16s_v3", + // (undocumented) + StandardD16V3 = "Standard_D16_v3", + // (undocumented) + StandardD1V2 = "Standard_D1_v2", + // (undocumented) + StandardD2 = "Standard_D2", + // (undocumented) + StandardD2SV3 = "Standard_D2s_v3", + // (undocumented) + StandardD2V2 = "Standard_D2_v2", + // (undocumented) + StandardD2V3 = "Standard_D2_v3", + // (undocumented) + StandardD3 = "Standard_D3", + // (undocumented) + StandardD32SV3 = "Standard_D32s_v3", + // (undocumented) + StandardD32V3 = "Standard_D32_v3", + // (undocumented) + StandardD3V2 = "Standard_D3_v2", + // (undocumented) + StandardD4 = "Standard_D4", + // (undocumented) + StandardD4SV3 = "Standard_D4s_v3", + // (undocumented) + StandardD4V2 = "Standard_D4_v2", + // (undocumented) + StandardD4V3 = "Standard_D4_v3", + // (undocumented) + StandardD5V2 = "Standard_D5_v2", + // (undocumented) + StandardD64SV3 = "Standard_D64s_v3", + // (undocumented) + StandardD64V3 = "Standard_D64_v3", + // (undocumented) + StandardD8SV3 = "Standard_D8s_v3", + // (undocumented) + StandardD8V3 = "Standard_D8_v3", + // (undocumented) + StandardDS1 = "Standard_DS1", + // (undocumented) + StandardDS11 = "Standard_DS11", + // (undocumented) + StandardDS11V2 = "Standard_DS11_v2", + // (undocumented) + StandardDS12 = "Standard_DS12", + // (undocumented) + StandardDS12V2 = "Standard_DS12_v2", + // (undocumented) + StandardDS13 = "Standard_DS13", + // (undocumented) + StandardDS132V2 = "Standard_DS13-2_v2", + // (undocumented) + StandardDS134V2 = "Standard_DS13-4_v2", + // (undocumented) + StandardDS13V2 = "Standard_DS13_v2", + // (undocumented) + StandardDS14 = "Standard_DS14", + // (undocumented) + StandardDS144V2 = "Standard_DS14-4_v2", + // (undocumented) + StandardDS148V2 = "Standard_DS14-8_v2", + // (undocumented) + StandardDS14V2 = "Standard_DS14_v2", + // (undocumented) + StandardDS15V2 = "Standard_DS15_v2", + // (undocumented) + StandardDS1V2 = "Standard_DS1_v2", + // (undocumented) + StandardDS2 = "Standard_DS2", + // (undocumented) + StandardDS2V2 = "Standard_DS2_v2", + // (undocumented) + StandardDS3 = "Standard_DS3", + // (undocumented) + StandardDS3V2 = "Standard_DS3_v2", + // (undocumented) + StandardDS4 = "Standard_DS4", + // (undocumented) + StandardDS4V2 = "Standard_DS4_v2", + // (undocumented) + StandardDS5V2 = "Standard_DS5_v2", + // (undocumented) + StandardE16SV3 = "Standard_E16s_v3", + // (undocumented) + StandardE16V3 = "Standard_E16_v3", + // (undocumented) + StandardE2SV3 = "Standard_E2s_v3", + // (undocumented) + StandardE2V3 = "Standard_E2_v3", + // (undocumented) + StandardE3216V3 = "Standard_E32-16_v3", + // (undocumented) + StandardE328SV3 = "Standard_E32-8s_v3", + // (undocumented) + StandardE32SV3 = "Standard_E32s_v3", + // (undocumented) + StandardE32V3 = "Standard_E32_v3", + // (undocumented) + StandardE4SV3 = "Standard_E4s_v3", + // (undocumented) + StandardE4V3 = "Standard_E4_v3", + // (undocumented) + StandardE6416SV3 = "Standard_E64-16s_v3", + // (undocumented) + StandardE6432SV3 = "Standard_E64-32s_v3", + // (undocumented) + StandardE64SV3 = "Standard_E64s_v3", + // (undocumented) + StandardE64V3 = "Standard_E64_v3", + // (undocumented) + StandardE8SV3 = "Standard_E8s_v3", + // (undocumented) + StandardE8V3 = "Standard_E8_v3", + // (undocumented) + StandardF1 = "Standard_F1", + // (undocumented) + StandardF16 = "Standard_F16", + // (undocumented) + StandardF16S = "Standard_F16s", + // (undocumented) + StandardF16SV2 = "Standard_F16s_v2", + // (undocumented) + StandardF1S = "Standard_F1s", + // (undocumented) + StandardF2 = "Standard_F2", + // (undocumented) + StandardF2S = "Standard_F2s", + // (undocumented) + StandardF2SV2 = "Standard_F2s_v2", + // (undocumented) + StandardF32SV2 = "Standard_F32s_v2", + // (undocumented) + StandardF4 = "Standard_F4", + // (undocumented) + StandardF4S = "Standard_F4s", + // (undocumented) + StandardF4SV2 = "Standard_F4s_v2", + // (undocumented) + StandardF64SV2 = "Standard_F64s_v2", + // (undocumented) + StandardF72SV2 = "Standard_F72s_v2", + // (undocumented) + StandardF8 = "Standard_F8", + // (undocumented) + StandardF8S = "Standard_F8s", + // (undocumented) + StandardF8SV2 = "Standard_F8s_v2", + // (undocumented) + StandardG1 = "Standard_G1", + // (undocumented) + StandardG2 = "Standard_G2", + // (undocumented) + StandardG3 = "Standard_G3", + // (undocumented) + StandardG4 = "Standard_G4", + // (undocumented) + StandardG5 = "Standard_G5", + // (undocumented) + StandardGS1 = "Standard_GS1", + // (undocumented) + StandardGS2 = "Standard_GS2", + // (undocumented) + StandardGS3 = "Standard_GS3", + // (undocumented) + StandardGS4 = "Standard_GS4", + // (undocumented) + StandardGS44 = "Standard_GS4-4", + // (undocumented) + StandardGS48 = "Standard_GS4-8", + // (undocumented) + StandardGS5 = "Standard_GS5", + // (undocumented) + StandardGS516 = "Standard_GS5-16", + // (undocumented) + StandardGS58 = "Standard_GS5-8", + // (undocumented) + StandardH16 = "Standard_H16", + // (undocumented) + StandardH16M = "Standard_H16m", + // (undocumented) + StandardH16Mr = "Standard_H16mr", + // (undocumented) + StandardH16R = "Standard_H16r", + // (undocumented) + StandardH8 = "Standard_H8", + // (undocumented) + StandardH8M = "Standard_H8m", + // (undocumented) + StandardL16S = "Standard_L16s", + // (undocumented) + StandardL32S = "Standard_L32s", + // (undocumented) + StandardL4S = "Standard_L4s", + // (undocumented) + StandardL8S = "Standard_L8s", + // (undocumented) + StandardM12832Ms = "Standard_M128-32ms", + // (undocumented) + StandardM12864Ms = "Standard_M128-64ms", + // (undocumented) + StandardM128Ms = "Standard_M128ms", + // (undocumented) + StandardM128S = "Standard_M128s", + // (undocumented) + StandardM6416Ms = "Standard_M64-16ms", + // (undocumented) + StandardM6432Ms = "Standard_M64-32ms", + // (undocumented) + StandardM64Ms = "Standard_M64ms", + // (undocumented) + StandardM64S = "Standard_M64s", + // (undocumented) + StandardNC12 = "Standard_NC12", + // (undocumented) + StandardNC12SV2 = "Standard_NC12s_v2", + // (undocumented) + StandardNC12SV3 = "Standard_NC12s_v3", + // (undocumented) + StandardNC24 = "Standard_NC24", + // (undocumented) + StandardNC24R = "Standard_NC24r", + // (undocumented) + StandardNC24RsV2 = "Standard_NC24rs_v2", + // (undocumented) + StandardNC24RsV3 = "Standard_NC24rs_v3", + // (undocumented) + StandardNC24SV2 = "Standard_NC24s_v2", + // (undocumented) + StandardNC24SV3 = "Standard_NC24s_v3", + // (undocumented) + StandardNC6 = "Standard_NC6", + // (undocumented) + StandardNC6SV2 = "Standard_NC6s_v2", + // (undocumented) + StandardNC6SV3 = "Standard_NC6s_v3", + // (undocumented) + StandardND12S = "Standard_ND12s", + // (undocumented) + StandardND24Rs = "Standard_ND24rs", + // (undocumented) + StandardND24S = "Standard_ND24s", + // (undocumented) + StandardND6S = "Standard_ND6s", + // (undocumented) + StandardNV12 = "Standard_NV12", + // (undocumented) + StandardNV24 = "Standard_NV24", + // (undocumented) + StandardNV6 = "Standard_NV6" +} + +// @public +export enum KnownVmDiskTypes { + // (undocumented) + None = "None", + // (undocumented) + Unmanaged = "Unmanaged" +} + +// @public +export enum KnownVMGuestPatchClassificationLinux { + // (undocumented) + Critical = "Critical", + // (undocumented) + Other = "Other", + // (undocumented) + Security = "Security" +} + +// @public +export enum KnownVMGuestPatchClassificationWindows { + // (undocumented) + Critical = "Critical", + // (undocumented) + Definition = "Definition", + // (undocumented) + FeaturePack = "FeaturePack", + // (undocumented) + Security = "Security", + // (undocumented) + ServicePack = "ServicePack", + // (undocumented) + Tools = "Tools", + // (undocumented) + UpdateRollUp = "UpdateRollUp", + // (undocumented) + Updates = "Updates" +} + +// @public +export enum KnownVMGuestPatchRebootBehavior { + // (undocumented) + AlwaysRequiresReboot = "AlwaysRequiresReboot", + // (undocumented) + CanRequestReboot = "CanRequestReboot", + // (undocumented) + NeverReboots = "NeverReboots", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownVMGuestPatchRebootSetting { + // (undocumented) + Always = "Always", + // (undocumented) + IfRequired = "IfRequired", + // (undocumented) + Never = "Never" +} + +// @public +export enum KnownVMGuestPatchRebootStatus { + // (undocumented) + Completed = "Completed", + // (undocumented) + Failed = "Failed", + // (undocumented) + NotNeeded = "NotNeeded", + // (undocumented) + Required = "Required", + // (undocumented) + Started = "Started", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownWindowsPatchAssessmentMode { + // (undocumented) + AutomaticByPlatform = "AutomaticByPlatform", + // (undocumented) + ImageDefault = "ImageDefault" +} + +// @public +export enum KnownWindowsVMGuestPatchMode { + // (undocumented) + AutomaticByOS = "AutomaticByOS", + // (undocumented) + AutomaticByPlatform = "AutomaticByPlatform", + // (undocumented) + Manual = "Manual" +} + +// @public +export interface LastPatchInstallationSummary { + readonly error?: ApiError; + readonly excludedPatchCount?: number; + readonly failedPatchCount?: number; + readonly installationActivityId?: string; + readonly installedPatchCount?: number; + readonly lastModifiedTime?: Date; + readonly maintenanceWindowExceeded?: boolean; + readonly notSelectedPatchCount?: number; + readonly pendingPatchCount?: number; + readonly startTime?: Date; + readonly status?: PatchOperationStatus; +} + +// @public +export interface LinuxConfiguration { + disablePasswordAuthentication?: boolean; + patchSettings?: LinuxPatchSettings; + provisionVMAgent?: boolean; + ssh?: SshConfiguration; +} + +// @public +export interface LinuxParameters { + classificationsToInclude?: VMGuestPatchClassificationLinux[]; + maintenanceRunId?: string; + packageNameMasksToExclude?: string[]; + packageNameMasksToInclude?: string[]; +} + +// @public +export type LinuxPatchAssessmentMode = string; + +// @public +export interface LinuxPatchSettings { + assessmentMode?: LinuxPatchAssessmentMode; + patchMode?: LinuxVMGuestPatchMode; +} + +// @public +export type LinuxVMGuestPatchMode = string; + +// @public +export interface ListUsagesResult { + nextLink?: string; + value: Usage[]; +} + +// @public +export interface LoadBalancerConfiguration { + id?: string; + name: string; + properties: LoadBalancerConfigurationProperties; +} + +// @public (undocumented) +export interface LoadBalancerConfigurationProperties { + frontendIPConfigurations: LoadBalancerFrontendIPConfiguration[]; +} + +// @public (undocumented) +export interface LoadBalancerFrontendIPConfiguration { + name: string; + properties: LoadBalancerFrontendIPConfigurationProperties; +} + +// @public +export interface LoadBalancerFrontendIPConfigurationProperties { + privateIPAddress?: string; + publicIPAddress?: SubResource; + subnet?: SubResource; +} + +// @public +export interface LogAnalytics { + beginExportRequestRateByInterval(location: string, parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams): Promise, LogAnalyticsExportRequestRateByIntervalResponse>>; + beginExportRequestRateByIntervalAndWait(location: string, parameters: RequestRateByIntervalInput, options?: LogAnalyticsExportRequestRateByIntervalOptionalParams): Promise; + beginExportThrottledRequests(location: string, parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams): Promise, LogAnalyticsExportThrottledRequestsResponse>>; + beginExportThrottledRequestsAndWait(location: string, parameters: ThrottledRequestsInput, options?: LogAnalyticsExportThrottledRequestsOptionalParams): Promise; +} + +// @public +export interface LogAnalyticsExportRequestRateByIntervalOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LogAnalyticsExportRequestRateByIntervalResponse = LogAnalyticsOperationResult; + +// @public +export interface LogAnalyticsExportThrottledRequestsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LogAnalyticsExportThrottledRequestsResponse = LogAnalyticsOperationResult; + +// @public +export interface LogAnalyticsInputBase { + blobContainerSasUri: string; + fromTime: Date; + groupByClientApplicationId?: boolean; + groupByOperationName?: boolean; + groupByResourceName?: boolean; + groupByThrottlePolicy?: boolean; + groupByUserAgent?: boolean; + toTime: Date; +} + +// @public +export interface LogAnalyticsOperationResult { + readonly properties?: LogAnalyticsOutput; +} + +// @public +export interface LogAnalyticsOutput { + readonly output?: string; +} + +// @public +export type MaintenanceOperationResultCodeTypes = "None" | "RetryLater" | "MaintenanceAborted" | "MaintenanceCompleted"; + +// @public +export interface MaintenanceRedeployStatus { + isCustomerInitiatedMaintenanceAllowed?: boolean; + lastOperationMessage?: string; + lastOperationResultCode?: MaintenanceOperationResultCodeTypes; + maintenanceWindowEndTime?: Date; + maintenanceWindowStartTime?: Date; + preMaintenanceWindowEndTime?: Date; + preMaintenanceWindowStartTime?: Date; +} + +// @public +export interface ManagedArtifact { + id: string; +} + +// @public +export type ManagedDiskParameters = SubResource & { + storageAccountType?: StorageAccountTypes; + diskEncryptionSet?: DiskEncryptionSetParameters; +}; + +// @public +export type NetworkAccessPolicy = string; + +// @public +export type NetworkApiVersion = string; + +// @public +export type NetworkInterfaceReference = SubResource & { + primary?: boolean; + deleteOption?: DeleteOptions; +}; + +// @public +export interface NetworkProfile { + networkApiVersion?: NetworkApiVersion; + networkInterfaceConfigurations?: VirtualMachineNetworkInterfaceConfiguration[]; + networkInterfaces?: NetworkInterfaceReference[]; +} + +// @public +export type OperatingSystemStateTypes = "Generalized" | "Specialized"; + +// @public +export type OperatingSystemType = string; + +// @public +export type OperatingSystemTypes = "Windows" | "Linux"; + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = ComputeOperationListResult; + +// @public +export type OrchestrationMode = string; + +// @public +export type OrchestrationServiceNames = string; + +// @public +export type OrchestrationServiceState = string; + +// @public +export type OrchestrationServiceStateAction = string; + +// @public +export interface OrchestrationServiceStateInput { + action: OrchestrationServiceStateAction; + serviceName: OrchestrationServiceNames; +} + +// @public +export interface OrchestrationServiceSummary { + readonly serviceName?: OrchestrationServiceNames; + readonly serviceState?: OrchestrationServiceState; +} + +// @public +export interface OSDisk { + caching?: CachingTypes; + createOption: DiskCreateOptionTypes; + deleteOption?: DiskDeleteOptionTypes; + diffDiskSettings?: DiffDiskSettings; + diskSizeGB?: number; + encryptionSettings?: DiskEncryptionSettings; + image?: VirtualHardDisk; + managedDisk?: ManagedDiskParameters; + name?: string; + osType?: OperatingSystemTypes; + vhd?: VirtualHardDisk; + writeAcceleratorEnabled?: boolean; +} + +// @public +export interface OSDiskImage { + operatingSystem: OperatingSystemTypes; +} + +// @public +export type OSDiskImageEncryption = DiskImageEncryption & {}; + +// @public +export interface OSFamily { + readonly id?: string; + readonly location?: string; + readonly name?: string; + properties?: OSFamilyProperties; + readonly type?: string; +} + +// @public (undocumented) +export interface OSFamilyListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value: OSFamily[]; +} + +// @public +export interface OSFamilyProperties { + readonly label?: string; + readonly name?: string; + readonly versions?: OSVersionPropertiesBase[]; +} + +// @public +export interface OSProfile { + adminPassword?: string; + adminUsername?: string; + allowExtensionOperations?: boolean; + computerName?: string; + customData?: string; + linuxConfiguration?: LinuxConfiguration; + requireGuestProvisionSignal?: boolean; + secrets?: VaultSecretGroup[]; + windowsConfiguration?: WindowsConfiguration; +} + +// @public +export interface OSVersion { + readonly id?: string; + readonly location?: string; + readonly name?: string; + properties?: OSVersionProperties; + readonly type?: string; +} + +// @public (undocumented) +export interface OSVersionListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value: OSVersion[]; +} + +// @public +export interface OSVersionProperties { + readonly family?: string; + readonly familyLabel?: string; + readonly isActive?: boolean; + readonly isDefault?: boolean; + readonly label?: string; + readonly version?: string; +} + +// @public +export interface OSVersionPropertiesBase { + readonly isActive?: boolean; + readonly isDefault?: boolean; + readonly label?: string; + readonly version?: string; +} + +// @public +export type PatchAssessmentState = string; + +// @public +export interface PatchInstallationDetail { + readonly classifications?: string[]; + readonly installationState?: PatchInstallationState; + readonly kbId?: string; + readonly name?: string; + readonly patchId?: string; + readonly version?: string; +} + +// @public +export type PatchInstallationState = string; + +// @public +export type PatchOperationStatus = string; + +// @public +export interface PatchSettings { + assessmentMode?: WindowsPatchAssessmentMode; + enableHotpatching?: boolean; + patchMode?: WindowsVMGuestPatchMode; +} + +// @public +export interface PirResource { + readonly location?: string; + readonly name?: string; +} + +// @public +export type PirSharedGalleryResource = PirResource & { + uniqueId?: string; +}; + +// @public +export interface Plan { + name?: string; + product?: string; + promotionCode?: string; + publisher?: string; +} + +// @public +export interface PrivateEndpoint { + readonly id?: string; +} + +// @public +export interface PrivateEndpointConnection { + readonly id?: string; + readonly name?: string; + readonly privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; + readonly type?: string; +} + +// @public +export interface PrivateEndpointConnectionListResult { + nextLink?: string; + value?: PrivateEndpointConnection[]; +} + +// @public +export type PrivateEndpointConnectionProvisioningState = string; + +// @public +export type PrivateEndpointServiceConnectionStatus = string; + +// @public +export interface PrivateLinkResource { + readonly groupId?: string; + readonly id?: string; + readonly name?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; + readonly type?: string; +} + +// @public +export interface PrivateLinkResourceListResult { + value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} + +// @public +export interface PropertyUpdatesInProgress { + targetTier?: string; +} + +// @public +export type ProtocolTypes = "Http" | "Https"; + +// @public +export type ProximityPlacementGroup = Resource & { + proximityPlacementGroupType?: ProximityPlacementGroupType; + readonly virtualMachines?: SubResourceWithColocationStatus[]; + readonly virtualMachineScaleSets?: SubResourceWithColocationStatus[]; + readonly availabilitySets?: SubResourceWithColocationStatus[]; + colocationStatus?: InstanceViewStatus; +}; + +// @public +export interface ProximityPlacementGroupListResult { + nextLink?: string; + value: ProximityPlacementGroup[]; +} + +// @public +export interface ProximityPlacementGroups { + createOrUpdate(resourceGroupName: string, proximityPlacementGroupName: string, parameters: ProximityPlacementGroup, options?: ProximityPlacementGroupsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, proximityPlacementGroupName: string, options?: ProximityPlacementGroupsDeleteOptionalParams): Promise; + get(resourceGroupName: string, proximityPlacementGroupName: string, options?: ProximityPlacementGroupsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ProximityPlacementGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ProximityPlacementGroupsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, proximityPlacementGroupName: string, parameters: ProximityPlacementGroupUpdate, options?: ProximityPlacementGroupsUpdateOptionalParams): Promise; +} + +// @public +export interface ProximityPlacementGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProximityPlacementGroupsCreateOrUpdateResponse = ProximityPlacementGroup; + +// @public +export interface ProximityPlacementGroupsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ProximityPlacementGroupsGetOptionalParams extends coreClient.OperationOptions { + includeColocationStatus?: string; +} + +// @public +export type ProximityPlacementGroupsGetResponse = ProximityPlacementGroup; + +// @public +export interface ProximityPlacementGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProximityPlacementGroupsListByResourceGroupNextResponse = ProximityPlacementGroupListResult; + +// @public +export interface ProximityPlacementGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProximityPlacementGroupsListByResourceGroupResponse = ProximityPlacementGroupListResult; + +// @public +export interface ProximityPlacementGroupsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProximityPlacementGroupsListBySubscriptionNextResponse = ProximityPlacementGroupListResult; + +// @public +export interface ProximityPlacementGroupsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProximityPlacementGroupsListBySubscriptionResponse = ProximityPlacementGroupListResult; + +// @public +export interface ProximityPlacementGroupsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProximityPlacementGroupsUpdateResponse = ProximityPlacementGroup; + +// @public +export type ProximityPlacementGroupType = string; + +// @public +export type ProximityPlacementGroupUpdate = UpdateResource & {}; + +// @public +export interface ProxyOnlyResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface ProxyResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface PublicIPAddressSku { + name?: PublicIPAddressSkuName; + tier?: PublicIPAddressSkuTier; +} + +// @public +export type PublicIPAddressSkuName = string; + +// @public +export type PublicIPAddressSkuTier = string; + +// @public +export type PublicIPAllocationMethod = string; + +// @public +export interface PurchasePlan { + name: string; + product: string; + publisher: string; +} + +// @public +export interface PurchasePlanAutoGenerated { + name: string; + product: string; + promotionCode?: string; + publisher: string; +} + +// @public +export interface RecommendedMachineConfiguration { + memory?: ResourceRange; + vCPUs?: ResourceRange; +} + +// @public +export interface RecoveryWalkResponse { + readonly nextPlatformUpdateDomain?: number; + readonly walkPerformed?: boolean; +} + +// @public +export interface RegionalReplicationStatus { + readonly details?: string; + readonly progress?: number; + readonly region?: string; + readonly state?: ReplicationState; +} + +// @public +export type ReplicationState = string; + +// @public +export interface ReplicationStatus { + readonly aggregatedState?: AggregatedReplicationState; + readonly summary?: RegionalReplicationStatus[]; +} + +// @public +export type ReplicationStatusTypes = string; + +// @public +export type RequestRateByIntervalInput = LogAnalyticsInputBase & { + intervalLength: IntervalInMins; +}; + +// @public +export interface Resource { + readonly id?: string; + location: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; + +// @public +export interface ResourceInstanceViewStatus { + readonly code?: string; + readonly displayStatus?: string; + level?: StatusLevelTypes; + readonly message?: string; + readonly time?: Date; +} + +// @public +export interface ResourceRange { + max?: number; + min?: number; +} + +// @public +export interface ResourceSku { + readonly apiVersions?: string[]; + readonly capabilities?: ResourceSkuCapabilities[]; + readonly capacity?: ResourceSkuCapacity; + readonly costs?: ResourceSkuCosts[]; + readonly family?: string; + readonly kind?: string; + readonly locationInfo?: ResourceSkuLocationInfo[]; + readonly locations?: string[]; + readonly name?: string; + readonly resourceType?: string; + readonly restrictions?: ResourceSkuRestrictions[]; + readonly size?: string; + readonly tier?: string; +} + +// @public +export interface ResourceSkuCapabilities { + readonly name?: string; + readonly value?: string; +} + +// @public +export interface ResourceSkuCapacity { + readonly default?: number; + readonly maximum?: number; + readonly minimum?: number; + readonly scaleType?: ResourceSkuCapacityScaleType; +} + +// @public +export type ResourceSkuCapacityScaleType = "Automatic" | "Manual" | "None"; + +// @public +export interface ResourceSkuCosts { + readonly extendedUnit?: string; + readonly meterID?: string; + readonly quantity?: number; +} + +// @public (undocumented) +export interface ResourceSkuLocationInfo { + readonly location?: string; + readonly zoneDetails?: ResourceSkuZoneDetails[]; + readonly zones?: string[]; +} + +// @public (undocumented) +export interface ResourceSkuRestrictionInfo { + readonly locations?: string[]; + readonly zones?: string[]; +} + +// @public +export interface ResourceSkuRestrictions { + readonly reasonCode?: ResourceSkuRestrictionsReasonCode; + readonly restrictionInfo?: ResourceSkuRestrictionInfo; + readonly type?: ResourceSkuRestrictionsType; + readonly values?: string[]; +} + +// @public +export type ResourceSkuRestrictionsReasonCode = "QuotaId" | "NotAvailableForSubscription"; + +// @public +export type ResourceSkuRestrictionsType = "Location" | "Zone"; + +// @public +export interface ResourceSkus { + list(options?: ResourceSkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ResourceSkusListNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ResourceSkusListNextResponse = ResourceSkusResult; + +// @public +export interface ResourceSkusListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ResourceSkusListResponse = ResourceSkusResult; + +// @public +export interface ResourceSkusResult { + nextLink?: string; + value: ResourceSku[]; +} + +// @public +export interface ResourceSkuZoneDetails { + readonly capabilities?: ResourceSkuCapabilities[]; + readonly name?: string[]; +} + +// @public +export interface ResourceUriList { + nextLink?: string; + value: string[]; +} + +// @public +export type RestorePoint = ProxyResource & { + excludeDisks?: ApiEntityReference[]; + readonly sourceMetadata?: RestorePointSourceMetadata; + readonly provisioningState?: string; + readonly consistencyMode?: ConsistencyModeTypes; + readonly provisioningDetails?: RestorePointProvisioningDetails; +}; + +// @public +export type RestorePointCollection = Resource & { + source?: RestorePointCollectionSourceProperties; + readonly provisioningState?: string; + readonly restorePointCollectionId?: string; + readonly restorePoints?: RestorePoint[]; +}; + +// @public +export type RestorePointCollectionExpandOptions = string; + +// @public +export interface RestorePointCollectionListResult { + nextLink?: string; + value?: RestorePointCollection[]; +} + +// @public +export interface RestorePointCollections { + beginDelete(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsDeleteOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, restorePointCollectionName: string, parameters: RestorePointCollection, options?: RestorePointCollectionsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, restorePointCollectionName: string, options?: RestorePointCollectionsGetOptionalParams): Promise; + list(resourceGroupName: string, options?: RestorePointCollectionsListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: RestorePointCollectionsListAllOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, restorePointCollectionName: string, parameters: RestorePointCollectionUpdate, options?: RestorePointCollectionsUpdateOptionalParams): Promise; +} + +// @public +export interface RestorePointCollectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointCollectionsCreateOrUpdateResponse = RestorePointCollection; + +// @public +export interface RestorePointCollectionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RestorePointCollectionsGetOptionalParams extends coreClient.OperationOptions { + expand?: RestorePointCollectionExpandOptions; +} + +// @public +export type RestorePointCollectionsGetResponse = RestorePointCollection; + +// @public +export interface RestorePointCollectionsListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointCollectionsListAllNextResponse = RestorePointCollectionListResult; + +// @public +export interface RestorePointCollectionsListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointCollectionsListAllResponse = RestorePointCollectionListResult; + +// @public +export interface RestorePointCollectionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointCollectionsListNextResponse = RestorePointCollectionListResult; + +// @public +export interface RestorePointCollectionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointCollectionsListResponse = RestorePointCollectionListResult; + +// @public +export interface RestorePointCollectionSourceProperties { + id?: string; + readonly location?: string; +} + +// @public +export interface RestorePointCollectionsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointCollectionsUpdateResponse = RestorePointCollection; + +// @public +export type RestorePointCollectionUpdate = UpdateResource & { + source?: RestorePointCollectionSourceProperties; + readonly provisioningState?: string; + readonly restorePointCollectionId?: string; + readonly restorePoints?: RestorePoint[]; +}; + +// @public +export interface RestorePointProvisioningDetails { + creationTime?: Date; + statusCode?: number; + statusMessage?: string; + totalUsedSizeInBytes?: number; +} + +// @public +export interface RestorePoints { + beginCreate(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, parameters: RestorePoint, options?: RestorePointsCreateOptionalParams): Promise, RestorePointsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, parameters: RestorePoint, options?: RestorePointsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsDeleteOptionalParams): Promise; + get(resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, options?: RestorePointsGetOptionalParams): Promise; +} + +// @public +export interface RestorePointsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RestorePointsCreateResponse = RestorePoint; + +// @public +export interface RestorePointsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RestorePointsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorePointsGetResponse = RestorePoint; + +// @public +export interface RestorePointSourceMetadata { + diagnosticsProfile?: DiagnosticsProfile; + hardwareProfile?: HardwareProfile; + licenseType?: string; + location?: string; + osProfile?: OSProfile; + securityProfile?: SecurityProfile; + storageProfile?: RestorePointSourceVMStorageProfile; + vmId?: string; +} + +// @public +export interface RestorePointSourceVMDataDisk { + caching?: CachingTypes; + diskRestorePoint?: ApiEntityReference; + diskSizeGB?: number; + lun?: number; + managedDisk?: ManagedDiskParameters; + name?: string; +} + +// @public +export interface RestorePointSourceVmosDisk { + caching?: CachingTypes; + diskRestorePoint?: ApiEntityReference; + diskSizeGB?: number; + encryptionSettings?: DiskEncryptionSettings; + managedDisk?: ManagedDiskParameters; + name?: string; + osType?: OperatingSystemType; +} + +// @public +export interface RestorePointSourceVMStorageProfile { + dataDisks?: RestorePointSourceVMDataDisk[]; + osDisk?: RestorePointSourceVmosDisk; +} + +// @public +export interface RetrieveBootDiagnosticsDataResult { + readonly consoleScreenshotBlobUri?: string; + readonly serialConsoleLogBlobUri?: string; +} + +// @public (undocumented) +export interface RoleInstance { + readonly id?: string; + readonly location?: string; + readonly name?: string; + // (undocumented) + properties?: RoleInstanceProperties; + // (undocumented) + sku?: InstanceSku; + readonly tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public (undocumented) +export interface RoleInstanceListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value: RoleInstance[]; +} + +// @public +export interface RoleInstanceNetworkProfile { + readonly networkInterfaces?: SubResource[]; +} + +// @public (undocumented) +export interface RoleInstanceProperties { + instanceView?: RoleInstanceView; + networkProfile?: RoleInstanceNetworkProfile; +} + +// @public +export interface RoleInstances { + roleInstances: string[]; +} + +// @public +export interface RoleInstanceView { + readonly platformFaultDomain?: number; + readonly platformUpdateDomain?: number; + readonly privateId?: string; + readonly statuses?: ResourceInstanceViewStatus[]; +} + +// @public +export interface RollbackStatusInfo { + readonly failedRolledbackInstanceCount?: number; + readonly rollbackError?: ApiError; + readonly successfullyRolledbackInstanceCount?: number; +} + +// @public +export type RollingUpgradeActionType = "Start" | "Cancel"; + +// @public +export interface RollingUpgradePolicy { + enableCrossZoneUpgrade?: boolean; + maxBatchInstancePercent?: number; + maxUnhealthyInstancePercent?: number; + maxUnhealthyUpgradedInstancePercent?: number; + pauseTimeBetweenBatches?: string; + prioritizeUnhealthyInstances?: boolean; +} + +// @public +export interface RollingUpgradeProgressInfo { + readonly failedInstanceCount?: number; + readonly inProgressInstanceCount?: number; + readonly pendingInstanceCount?: number; + readonly successfulInstanceCount?: number; +} + +// @public +export interface RollingUpgradeRunningStatus { + readonly code?: RollingUpgradeStatusCode; + readonly lastAction?: RollingUpgradeActionType; + readonly lastActionTime?: Date; + readonly startTime?: Date; +} + +// @public +export type RollingUpgradeStatusCode = "RollingForward" | "Cancelled" | "Completed" | "Faulted"; + +// @public +export type RollingUpgradeStatusInfo = Resource & { + readonly policy?: RollingUpgradePolicy; + readonly runningStatus?: RollingUpgradeRunningStatus; + readonly progress?: RollingUpgradeProgressInfo; + readonly error?: ApiError; +}; + +// @public +export type RunCommandDocument = RunCommandDocumentBase & { + script: string[]; + parameters?: RunCommandParameterDefinition[]; +}; + +// @public +export interface RunCommandDocumentBase { + description: string; + id: string; + label: string; + osType: OperatingSystemTypes; + schema: string; +} + +// @public +export interface RunCommandInput { + commandId: string; + parameters?: RunCommandInputParameter[]; + script?: string[]; +} + +// @public +export interface RunCommandInputParameter { + name: string; + value: string; +} + +// @public +export interface RunCommandListResult { + nextLink?: string; + value: RunCommandDocumentBase[]; +} + +// @public +export interface RunCommandParameterDefinition { + defaultValue?: string; + name: string; + required?: boolean; + type: string; +} + +// @public (undocumented) +export interface RunCommandResult { + value?: InstanceViewStatus[]; +} + +// @public +export interface ScaleInPolicy { + rules?: VirtualMachineScaleSetScaleInRules[]; +} + +// @public (undocumented) +export interface ScheduledEventsProfile { + terminateNotificationProfile?: TerminateNotificationProfile; +} + +// @public +export interface SecurityProfile { + encryptionAtHost?: boolean; + securityType?: SecurityTypes; + uefiSettings?: UefiSettings; +} + +// @public +export type SecurityTypes = string; + +// @public +export type SelectPermissions = string; + +// @public +export type SettingNames = "AutoLogon" | "FirstLogonCommands"; + +// @public +export interface SharedGalleries { + get(location: string, galleryUniqueName: string, options?: SharedGalleriesGetOptionalParams): Promise; + list(location: string, options?: SharedGalleriesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SharedGalleriesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SharedGalleriesGetResponse = SharedGallery; + +// @public +export interface SharedGalleriesListNextOptionalParams extends coreClient.OperationOptions { + sharedTo?: SharedToValues; +} + +// @public +export type SharedGalleriesListNextResponse = SharedGalleryList; + +// @public +export interface SharedGalleriesListOptionalParams extends coreClient.OperationOptions { + sharedTo?: SharedToValues; +} + +// @public +export type SharedGalleriesListResponse = SharedGalleryList; + +// @public +export type SharedGallery = PirSharedGalleryResource & {}; + +// @public +export type SharedGalleryImage = PirSharedGalleryResource & { + osType?: OperatingSystemTypes; + osState?: OperatingSystemStateTypes; + endOfLifeDate?: Date; + identifier?: GalleryImageIdentifier; + recommended?: RecommendedMachineConfiguration; + disallowed?: Disallowed; + hyperVGeneration?: HyperVGeneration; + features?: GalleryImageFeature[]; + purchasePlan?: ImagePurchasePlan; +}; + +// @public +export interface SharedGalleryImageList { + nextLink?: string; + value: SharedGalleryImage[]; +} + +// @public +export interface SharedGalleryImages { + get(location: string, galleryUniqueName: string, galleryImageName: string, options?: SharedGalleryImagesGetOptionalParams): Promise; + list(location: string, galleryUniqueName: string, options?: SharedGalleryImagesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SharedGalleryImagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SharedGalleryImagesGetResponse = SharedGalleryImage; + +// @public +export interface SharedGalleryImagesListNextOptionalParams extends coreClient.OperationOptions { + sharedTo?: SharedToValues; +} + +// @public +export type SharedGalleryImagesListNextResponse = SharedGalleryImageList; + +// @public +export interface SharedGalleryImagesListOptionalParams extends coreClient.OperationOptions { + sharedTo?: SharedToValues; +} + +// @public +export type SharedGalleryImagesListResponse = SharedGalleryImageList; + +// @public +export type SharedGalleryImageVersion = PirSharedGalleryResource & { + publishedDate?: Date; + endOfLifeDate?: Date; +}; + +// @public +export interface SharedGalleryImageVersionList { + nextLink?: string; + value: SharedGalleryImageVersion[]; +} + +// @public +export interface SharedGalleryImageVersions { + get(location: string, galleryUniqueName: string, galleryImageName: string, galleryImageVersionName: string, options?: SharedGalleryImageVersionsGetOptionalParams): Promise; + list(location: string, galleryUniqueName: string, galleryImageName: string, options?: SharedGalleryImageVersionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SharedGalleryImageVersionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SharedGalleryImageVersionsGetResponse = SharedGalleryImageVersion; + +// @public +export interface SharedGalleryImageVersionsListNextOptionalParams extends coreClient.OperationOptions { + sharedTo?: SharedToValues; +} + +// @public +export type SharedGalleryImageVersionsListNextResponse = SharedGalleryImageVersionList; + +// @public +export interface SharedGalleryImageVersionsListOptionalParams extends coreClient.OperationOptions { + sharedTo?: SharedToValues; +} + +// @public +export type SharedGalleryImageVersionsListResponse = SharedGalleryImageVersionList; + +// @public +export interface SharedGalleryList { + nextLink?: string; + value: SharedGallery[]; +} + +// @public +export type SharedToValues = string; + +// @public (undocumented) +export interface ShareInfoElement { + readonly vmUri?: string; +} + +// @public +export interface SharingProfile { + readonly groups?: SharingProfileGroup[]; + permissions?: GallerySharingPermissionTypes; +} + +// @public +export interface SharingProfileGroup { + ids?: string[]; + type?: SharingProfileGroupTypes; +} + +// @public +export type SharingProfileGroupTypes = string; + +// @public +export interface SharingUpdate { + groups?: SharingProfileGroup[]; + operationType: SharingUpdateOperationTypes; +} + +// @public +export type SharingUpdateOperationTypes = string; + +// @public +export interface Sku { + capacity?: number; + name?: string; + tier?: string; +} + +// @public +export type Snapshot = Resource & { + readonly managedBy?: string; + sku?: SnapshotSku; + extendedLocation?: ExtendedLocation; + readonly timeCreated?: Date; + osType?: OperatingSystemTypes; + hyperVGeneration?: HyperVGeneration; + purchasePlan?: PurchasePlanAutoGenerated; + creationData?: CreationData; + diskSizeGB?: number; + readonly diskSizeBytes?: number; + readonly diskState?: DiskState; + readonly uniqueId?: string; + encryptionSettingsCollection?: EncryptionSettingsCollection; + readonly provisioningState?: string; + incremental?: boolean; + encryption?: Encryption; + networkAccessPolicy?: NetworkAccessPolicy; + diskAccessId?: string; + supportsHibernation?: boolean; +}; + +// @public +export interface SnapshotList { + nextLink?: string; + value: Snapshot[]; +} + +// @public +export interface Snapshots { + beginCreateOrUpdate(resourceGroupName: string, snapshotName: string, snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams): Promise, SnapshotsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, snapshotName: string, snapshot: Snapshot, options?: SnapshotsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise; + beginGrantAccess(resourceGroupName: string, snapshotName: string, grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams): Promise, SnapshotsGrantAccessResponse>>; + beginGrantAccessAndWait(resourceGroupName: string, snapshotName: string, grantAccessData: GrantAccessData, options?: SnapshotsGrantAccessOptionalParams): Promise; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams): Promise, void>>; + beginRevokeAccessAndWait(resourceGroupName: string, snapshotName: string, options?: SnapshotsRevokeAccessOptionalParams): Promise; + beginUpdate(resourceGroupName: string, snapshotName: string, snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams): Promise, SnapshotsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, snapshotName: string, snapshot: SnapshotUpdate, options?: SnapshotsUpdateOptionalParams): Promise; + get(resourceGroupName: string, snapshotName: string, options?: SnapshotsGetOptionalParams): Promise; + list(options?: SnapshotsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: SnapshotsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SnapshotsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotsCreateOrUpdateResponse = Snapshot; + +// @public +export interface SnapshotsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SnapshotsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsGetResponse = Snapshot; + +// @public +export interface SnapshotsGrantAccessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotsGrantAccessResponse = AccessUri; + +// @public +export interface SnapshotSku { + name?: SnapshotStorageAccountTypes; + readonly tier?: string; +} + +// @public +export interface SnapshotsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsListByResourceGroupNextResponse = SnapshotList; + +// @public +export interface SnapshotsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsListByResourceGroupResponse = SnapshotList; + +// @public +export interface SnapshotsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsListNextResponse = SnapshotList; + +// @public +export interface SnapshotsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsListResponse = SnapshotList; + +// @public +export interface SnapshotsRevokeAccessOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotStorageAccountTypes = string; + +// @public +export interface SnapshotsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotsUpdateResponse = Snapshot; + +// @public +export interface SnapshotUpdate { + diskAccessId?: string; + diskSizeGB?: number; + encryption?: Encryption; + encryptionSettingsCollection?: EncryptionSettingsCollection; + networkAccessPolicy?: NetworkAccessPolicy; + osType?: OperatingSystemTypes; + sku?: SnapshotSku; + supportsHibernation?: boolean; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface SourceVault { + id?: string; +} + +// @public +export interface SshConfiguration { + publicKeys?: SshPublicKey[]; +} + +// @public +export interface SshPublicKey { + keyData?: string; + path?: string; +} + +// @public +export interface SshPublicKeyGenerateKeyPairResult { + id: string; + privateKey: string; + publicKey: string; +} + +// @public +export type SshPublicKeyResource = Resource & { + publicKey?: string; +}; + +// @public +export interface SshPublicKeys { + create(resourceGroupName: string, sshPublicKeyName: string, parameters: SshPublicKeyResource, options?: SshPublicKeysCreateOptionalParams): Promise; + delete(resourceGroupName: string, sshPublicKeyName: string, options?: SshPublicKeysDeleteOptionalParams): Promise; + generateKeyPair(resourceGroupName: string, sshPublicKeyName: string, options?: SshPublicKeysGenerateKeyPairOptionalParams): Promise; + get(resourceGroupName: string, sshPublicKeyName: string, options?: SshPublicKeysGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: SshPublicKeysListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: SshPublicKeysListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, sshPublicKeyName: string, parameters: SshPublicKeyUpdateResource, options?: SshPublicKeysUpdateOptionalParams): Promise; +} + +// @public +export interface SshPublicKeysCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysCreateResponse = SshPublicKeyResource; + +// @public +export interface SshPublicKeysDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SshPublicKeysGenerateKeyPairOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysGenerateKeyPairResponse = SshPublicKeyGenerateKeyPairResult; + +// @public +export interface SshPublicKeysGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysGetResponse = SshPublicKeyResource; + +// @public +export interface SshPublicKeysGroupListResult { + nextLink?: string; + value: SshPublicKeyResource[]; +} + +// @public +export interface SshPublicKeysListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysListByResourceGroupNextResponse = SshPublicKeysGroupListResult; + +// @public +export interface SshPublicKeysListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysListByResourceGroupResponse = SshPublicKeysGroupListResult; + +// @public +export interface SshPublicKeysListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysListBySubscriptionNextResponse = SshPublicKeysGroupListResult; + +// @public +export interface SshPublicKeysListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysListBySubscriptionResponse = SshPublicKeysGroupListResult; + +// @public +export interface SshPublicKeysUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SshPublicKeysUpdateResponse = SshPublicKeyResource; + +// @public +export type SshPublicKeyUpdateResource = UpdateResource & { + publicKey?: string; +}; + +// @public (undocumented) +export interface StatusCodeCount { + readonly code?: string; + readonly count?: number; +} + +// @public +export type StatusLevelTypes = "Info" | "Warning" | "Error"; + +// @public +export type StorageAccountType = string; + +// @public +export type StorageAccountTypes = string; + +// @public +export interface StorageProfile { + dataDisks?: DataDisk[]; + imageReference?: ImageReference; + osDisk?: OSDisk; +} + +// @public (undocumented) +export interface SubResource { + id?: string; +} + +// @public (undocumented) +export interface SubResourceReadOnly { + readonly id?: string; +} + +// @public (undocumented) +export type SubResourceWithColocationStatus = SubResource & { + colocationStatus?: InstanceViewStatus; +}; + +// @public +export interface TargetRegion { + encryption?: EncryptionImages; + name: string; + regionalReplicaCount?: number; + storageAccountType?: StorageAccountType; +} + +// @public (undocumented) +export interface TerminateNotificationProfile { + enable?: boolean; + notBeforeTimeout?: string; +} + +// @public +export type ThrottledRequestsInput = LogAnalyticsInputBase & {}; + +// @public +export interface UefiSettings { + secureBootEnabled?: boolean; + vTpmEnabled?: boolean; +} + +// @public +export interface UpdateDomain { + readonly id?: string; + readonly name?: string; +} + +// @public (undocumented) +export interface UpdateDomainListResult { + // (undocumented) + nextLink?: string; + // (undocumented) + value: UpdateDomain[]; +} + +// @public +export interface UpdateResource { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UpdateResourceDefinition { + readonly id?: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export type UpgradeMode = "Automatic" | "Manual" | "Rolling"; + +// @public +export interface UpgradeOperationHistoricalStatusInfo { + readonly location?: string; + readonly properties?: UpgradeOperationHistoricalStatusInfoProperties; + readonly type?: string; +} + +// @public +export interface UpgradeOperationHistoricalStatusInfoProperties { + readonly error?: ApiError; + readonly progress?: RollingUpgradeProgressInfo; + readonly rollbackInfo?: RollbackStatusInfo; + readonly runningStatus?: UpgradeOperationHistoryStatus; + readonly startedBy?: UpgradeOperationInvoker; + readonly targetImageReference?: ImageReference; +} + +// @public +export interface UpgradeOperationHistoryStatus { + readonly code?: UpgradeState; + readonly endTime?: Date; + readonly startTime?: Date; +} + +// @public +export type UpgradeOperationInvoker = "Unknown" | "User" | "Platform"; + +// @public +export interface UpgradePolicy { + automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy; + mode?: UpgradeMode; + rollingUpgradePolicy?: RollingUpgradePolicy; +} + +// @public +export type UpgradeState = "RollingForward" | "Cancelled" | "Completed" | "Faulted"; + +// @public +export interface Usage { + currentValue: number; + limit: number; + name: UsageName; + unit: "Count"; +} + +// @public +export interface UsageName { + localizedValue?: string; + value?: string; +} + +// @public +export interface UsageOperations { + list(location: string, options?: UsageOperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface UsageOperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UsageOperationsListNextResponse = ListUsagesResult; + +// @public +export interface UsageOperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UsageOperationsListResponse = ListUsagesResult; + +// @public (undocumented) +export interface UserArtifactManage { + install: string; + remove: string; + update?: string; +} + +// @public +export interface UserArtifactSource { + defaultConfigurationLink?: string; + mediaLink: string; +} + +// @public (undocumented) +export interface UserAssignedIdentitiesValue { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface VaultCertificate { + certificateStore?: string; + certificateUrl?: string; +} + +// @public +export interface VaultSecretGroup { + sourceVault?: SubResource; + vaultCertificates?: VaultCertificate[]; +} + +// @public +export interface VirtualHardDisk { + uri?: string; +} + +// @public +export type VirtualMachine = Resource & { + plan?: Plan; + readonly resources?: VirtualMachineExtension[]; + identity?: VirtualMachineIdentity; + zones?: string[]; + extendedLocation?: ExtendedLocation; + hardwareProfile?: HardwareProfile; + storageProfile?: StorageProfile; + additionalCapabilities?: AdditionalCapabilities; + osProfile?: OSProfile; + networkProfile?: NetworkProfile; + securityProfile?: SecurityProfile; + diagnosticsProfile?: DiagnosticsProfile; + availabilitySet?: SubResource; + virtualMachineScaleSet?: SubResource; + proximityPlacementGroup?: SubResource; + priority?: VirtualMachinePriorityTypes; + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + billingProfile?: BillingProfile; + host?: SubResource; + hostGroup?: SubResource; + readonly provisioningState?: string; + readonly instanceView?: VirtualMachineInstanceView; + licenseType?: string; + readonly vmId?: string; + extensionsTimeBudget?: string; + platformFaultDomain?: number; + scheduledEventsProfile?: ScheduledEventsProfile; + userData?: string; +}; + +// @public +export interface VirtualMachineAgentInstanceView { + extensionHandlers?: VirtualMachineExtensionHandlerInstanceView[]; + statuses?: InstanceViewStatus[]; + vmAgentVersion?: string; +} + +// @public +export interface VirtualMachineAssessPatchesResult { + readonly assessmentActivityId?: string; + readonly availablePatches?: VirtualMachineSoftwarePatchProperties[]; + readonly criticalAndSecurityPatchCount?: number; + readonly error?: ApiError; + readonly otherPatchCount?: number; + readonly rebootPending?: boolean; + readonly startDateTime?: Date; + readonly status?: PatchOperationStatus; +} + +// @public +export interface VirtualMachineCaptureParameters { + destinationContainerName: string; + overwriteVhds: boolean; + vhdPrefix: string; +} + +// @public +export type VirtualMachineCaptureResult = SubResource & { + readonly schema?: string; + readonly contentVersion?: string; + readonly parameters?: Record; + readonly resources?: Record[]; +}; + +// @public +export type VirtualMachineEvictionPolicyTypes = string; + +// @public +export type VirtualMachineExtension = Resource & { + forceUpdateTag?: string; + publisher?: string; + typePropertiesType?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + settings?: Record; + protectedSettings?: Record; + readonly provisioningState?: string; + instanceView?: VirtualMachineExtensionInstanceView; +}; + +// @public +export interface VirtualMachineExtensionHandlerInstanceView { + status?: InstanceViewStatus; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export type VirtualMachineExtensionImage = Resource & { + operatingSystem?: string; + computeRole?: string; + handlerSchema?: string; + vmScaleSetEnabled?: boolean; + supportsMultipleExtensions?: boolean; +}; + +// @public +export interface VirtualMachineExtensionImages { + get(location: string, publisherName: string, version: string, typeParam: string, options?: VirtualMachineExtensionImagesGetOptionalParams): Promise; + listTypes(location: string, publisherName: string, options?: VirtualMachineExtensionImagesListTypesOptionalParams): Promise; + listVersions(location: string, publisherName: string, typeParam: string, options?: VirtualMachineExtensionImagesListVersionsOptionalParams): Promise; +} + +// @public +export interface VirtualMachineExtensionImagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineExtensionImagesGetResponse = VirtualMachineExtensionImage; + +// @public +export interface VirtualMachineExtensionImagesListTypesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineExtensionImagesListTypesResponse = VirtualMachineExtensionImage[]; + +// @public +export interface VirtualMachineExtensionImagesListVersionsOptionalParams extends coreClient.OperationOptions { + filter?: string; + // (undocumented) + orderby?: string; + // (undocumented) + top?: number; +} + +// @public +export type VirtualMachineExtensionImagesListVersionsResponse = VirtualMachineExtensionImage[]; + +// @public +export interface VirtualMachineExtensionInstanceView { + name?: string; + statuses?: InstanceViewStatus[]; + substatuses?: InstanceViewStatus[]; + type?: string; + typeHandlerVersion?: string; +} + +// @public +export interface VirtualMachineExtensions { + beginCreateOrUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtension, options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams): Promise, VirtualMachineExtensionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: VirtualMachineExtensionUpdate, options?: VirtualMachineExtensionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: VirtualMachineExtensionsGetOptionalParams): Promise; + list(resourceGroupName: string, vmName: string, options?: VirtualMachineExtensionsListOptionalParams): Promise; +} + +// @public +export interface VirtualMachineExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineExtensionsCreateOrUpdateResponse = VirtualMachineExtension; + +// @public +export interface VirtualMachineExtensionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineExtensionsGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineExtensionsGetResponse = VirtualMachineExtension; + +// @public +export interface VirtualMachineExtensionsListOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineExtensionsListResponse = VirtualMachineExtensionsListResult; + +// @public +export interface VirtualMachineExtensionsListResult { + value?: VirtualMachineExtension[]; +} + +// @public +export interface VirtualMachineExtensionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineExtensionsUpdateResponse = VirtualMachineExtension; + +// @public +export type VirtualMachineExtensionUpdate = UpdateResource & { + forceUpdateTag?: string; + publisher?: string; + type?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + settings?: Record; + protectedSettings?: Record; +}; + +// @public +export interface VirtualMachineHealthStatus { + readonly status?: InstanceViewStatus; +} + +// @public +export interface VirtualMachineIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: ResourceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentitiesValue; + }; +} + +// @public +export type VirtualMachineImage = VirtualMachineImageResource & { + plan?: PurchasePlan; + osDiskImage?: OSDiskImage; + dataDiskImages?: DataDiskImage[]; + automaticOSUpgradeProperties?: AutomaticOSUpgradeProperties; + hyperVGeneration?: HyperVGenerationTypes; + disallowed?: DisallowedConfiguration; + features?: VirtualMachineImageFeature[]; +}; + +// @public +export interface VirtualMachineImageFeature { + name?: string; + value?: string; +} + +// @public +export type VirtualMachineImageResource = SubResource & { + name: string; + location: string; + tags?: { + [propertyName: string]: string; + }; + extendedLocation?: ExtendedLocation; +}; + +// @public +export interface VirtualMachineImages { + get(location: string, publisherName: string, offer: string, skus: string, version: string, options?: VirtualMachineImagesGetOptionalParams): Promise; + list(location: string, publisherName: string, offer: string, skus: string, options?: VirtualMachineImagesListOptionalParams): Promise; + listOffers(location: string, publisherName: string, options?: VirtualMachineImagesListOffersOptionalParams): Promise; + listPublishers(location: string, options?: VirtualMachineImagesListPublishersOptionalParams): Promise; + listSkus(location: string, publisherName: string, offer: string, options?: VirtualMachineImagesListSkusOptionalParams): Promise; +} + +// @public +export interface VirtualMachineImagesEdgeZone { + get(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, version: string, options?: VirtualMachineImagesEdgeZoneGetOptionalParams): Promise; + list(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, options?: VirtualMachineImagesEdgeZoneListOptionalParams): Promise; + listOffers(location: string, edgeZone: string, publisherName: string, options?: VirtualMachineImagesEdgeZoneListOffersOptionalParams): Promise; + listPublishers(location: string, edgeZone: string, options?: VirtualMachineImagesEdgeZoneListPublishersOptionalParams): Promise; + listSkus(location: string, edgeZone: string, publisherName: string, offer: string, options?: VirtualMachineImagesEdgeZoneListSkusOptionalParams): Promise; +} + +// @public +export interface VirtualMachineImagesEdgeZoneGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesEdgeZoneGetResponse = VirtualMachineImage; + +// @public +export interface VirtualMachineImagesEdgeZoneListOffersOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesEdgeZoneListOffersResponse = VirtualMachineImageResource[]; + +// @public +export interface VirtualMachineImagesEdgeZoneListOptionalParams extends coreClient.OperationOptions { + expand?: string; + orderby?: string; + top?: number; +} + +// @public +export interface VirtualMachineImagesEdgeZoneListPublishersOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesEdgeZoneListPublishersResponse = VirtualMachineImageResource[]; + +// @public +export type VirtualMachineImagesEdgeZoneListResponse = VirtualMachineImageResource[]; + +// @public +export interface VirtualMachineImagesEdgeZoneListSkusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesEdgeZoneListSkusResponse = VirtualMachineImageResource[]; + +// @public +export interface VirtualMachineImagesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesGetResponse = VirtualMachineImage; + +// @public +export interface VirtualMachineImagesListOffersOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesListOffersResponse = VirtualMachineImageResource[]; + +// @public +export interface VirtualMachineImagesListOptionalParams extends coreClient.OperationOptions { + expand?: string; + // (undocumented) + orderby?: string; + // (undocumented) + top?: number; +} + +// @public +export interface VirtualMachineImagesListPublishersOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesListPublishersResponse = VirtualMachineImageResource[]; + +// @public +export type VirtualMachineImagesListResponse = VirtualMachineImageResource[]; + +// @public +export interface VirtualMachineImagesListSkusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineImagesListSkusResponse = VirtualMachineImageResource[]; + +// @public +export interface VirtualMachineInstallPatchesParameters { + linuxParameters?: LinuxParameters; + maximumDuration: string; + rebootSetting: VMGuestPatchRebootSetting; + windowsParameters?: WindowsParameters; +} + +// @public +export interface VirtualMachineInstallPatchesResult { + readonly error?: ApiError; + readonly excludedPatchCount?: number; + readonly failedPatchCount?: number; + readonly installationActivityId?: string; + readonly installedPatchCount?: number; + readonly maintenanceWindowExceeded?: boolean; + readonly notSelectedPatchCount?: number; + readonly patches?: PatchInstallationDetail[]; + readonly pendingPatchCount?: number; + readonly rebootStatus?: VMGuestPatchRebootStatus; + readonly startDateTime?: Date; + readonly status?: PatchOperationStatus; +} + +// @public +export interface VirtualMachineInstanceView { + readonly assignedHost?: string; + bootDiagnostics?: BootDiagnosticsInstanceView; + computerName?: string; + disks?: DiskInstanceView[]; + extensions?: VirtualMachineExtensionInstanceView[]; + hyperVGeneration?: HyperVGenerationType; + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + osName?: string; + osVersion?: string; + patchStatus?: VirtualMachinePatchStatus; + platformFaultDomain?: number; + platformUpdateDomain?: number; + rdpThumbPrint?: string; + statuses?: InstanceViewStatus[]; + vmAgent?: VirtualMachineAgentInstanceView; + readonly vmHealth?: VirtualMachineHealthStatus; +} + +// @public +export interface VirtualMachineIpTag { + ipTagType?: string; + tag?: string; +} + +// @public +export interface VirtualMachineListResult { + nextLink?: string; + value: VirtualMachine[]; +} + +// @public +export interface VirtualMachineNetworkInterfaceConfiguration { + deleteOption?: DeleteOptions; + dnsSettings?: VirtualMachineNetworkInterfaceDnsSettingsConfiguration; + // (undocumented) + dscpConfiguration?: SubResource; + enableAcceleratedNetworking?: boolean; + enableFpga?: boolean; + enableIPForwarding?: boolean; + ipConfigurations?: VirtualMachineNetworkInterfaceIPConfiguration[]; + name: string; + networkSecurityGroup?: SubResource; + primary?: boolean; +} + +// @public +export interface VirtualMachineNetworkInterfaceDnsSettingsConfiguration { + dnsServers?: string[]; +} + +// @public +export interface VirtualMachineNetworkInterfaceIPConfiguration { + applicationGatewayBackendAddressPools?: SubResource[]; + applicationSecurityGroups?: SubResource[]; + loadBalancerBackendAddressPools?: SubResource[]; + name: string; + primary?: boolean; + privateIPAddressVersion?: IPVersions; + publicIPAddressConfiguration?: VirtualMachinePublicIPAddressConfiguration; + subnet?: SubResource; +} + +// @public +export interface VirtualMachinePatchStatus { + availablePatchSummary?: AvailablePatchSummary; + readonly configurationStatuses?: InstanceViewStatus[]; + lastPatchInstallationSummary?: LastPatchInstallationSummary; +} + +// @public +export type VirtualMachinePriorityTypes = string; + +// @public +export interface VirtualMachinePublicIPAddressConfiguration { + deleteOption?: DeleteOptions; + dnsSettings?: VirtualMachinePublicIPAddressDnsSettingsConfiguration; + idleTimeoutInMinutes?: number; + ipTags?: VirtualMachineIpTag[]; + name: string; + publicIPAddressVersion?: IPVersions; + publicIPAllocationMethod?: PublicIPAllocationMethod; + publicIPPrefix?: SubResource; + sku?: PublicIPAddressSku; +} + +// @public +export interface VirtualMachinePublicIPAddressDnsSettingsConfiguration { + domainNameLabel: string; +} + +// @public +export interface VirtualMachineReimageParameters { + tempDisk?: boolean; +} + +// @public +export type VirtualMachineRunCommand = Resource & { + source?: VirtualMachineRunCommandScriptSource; + parameters?: RunCommandInputParameter[]; + protectedParameters?: RunCommandInputParameter[]; + asyncExecution?: boolean; + runAsUser?: string; + runAsPassword?: string; + timeoutInSeconds?: number; + outputBlobUri?: string; + errorBlobUri?: string; + readonly provisioningState?: string; + readonly instanceView?: VirtualMachineRunCommandInstanceView; +}; + +// @public +export interface VirtualMachineRunCommandInstanceView { + endTime?: Date; + error?: string; + executionMessage?: string; + executionState?: ExecutionState; + exitCode?: number; + output?: string; + startTime?: Date; + statuses?: InstanceViewStatus[]; +} + +// @public +export interface VirtualMachineRunCommands { + beginCreateOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams): Promise, VirtualMachineRunCommandsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams): Promise, VirtualMachineRunCommandsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineRunCommandsUpdateOptionalParams): Promise; + get(location: string, commandId: string, options?: VirtualMachineRunCommandsGetOptionalParams): Promise; + getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options?: VirtualMachineRunCommandsGetByVirtualMachineOptionalParams): Promise; + list(location: string, options?: VirtualMachineRunCommandsListOptionalParams): PagedAsyncIterableIterator; + listByVirtualMachine(resourceGroupName: string, vmName: string, options?: VirtualMachineRunCommandsListByVirtualMachineOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualMachineRunCommandsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand; + +// @public +export interface VirtualMachineRunCommandScriptSource { + commandId?: string; + script?: string; + scriptUri?: string; +} + +// @public +export interface VirtualMachineRunCommandsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineRunCommandsGetByVirtualMachineOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineRunCommandsGetByVirtualMachineResponse = VirtualMachineRunCommand; + +// @public +export interface VirtualMachineRunCommandsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineRunCommandsGetResponse = RunCommandDocument; + +// @public +export interface VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineRunCommandsListByVirtualMachineNextResponse = VirtualMachineRunCommandsListResult; + +// @public +export interface VirtualMachineRunCommandsListByVirtualMachineOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineRunCommandsListByVirtualMachineResponse = VirtualMachineRunCommandsListResult; + +// @public +export interface VirtualMachineRunCommandsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineRunCommandsListNextResponse = RunCommandListResult; + +// @public +export interface VirtualMachineRunCommandsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineRunCommandsListResponse = RunCommandListResult; + +// @public +export interface VirtualMachineRunCommandsListResult { + nextLink?: string; + value: VirtualMachineRunCommand[]; +} + +// @public +export interface VirtualMachineRunCommandsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineRunCommandsUpdateResponse = VirtualMachineRunCommand; + +// @public +export type VirtualMachineRunCommandUpdate = UpdateResource & { + source?: VirtualMachineRunCommandScriptSource; + parameters?: RunCommandInputParameter[]; + protectedParameters?: RunCommandInputParameter[]; + asyncExecution?: boolean; + runAsUser?: string; + runAsPassword?: string; + timeoutInSeconds?: number; + outputBlobUri?: string; + errorBlobUri?: string; + readonly provisioningState?: string; + readonly instanceView?: VirtualMachineRunCommandInstanceView; +}; + +// @public +export interface VirtualMachines { + beginAssessPatches(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise, VirtualMachinesAssessPatchesResponse>>; + beginAssessPatchesAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise; + beginCapture(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise, VirtualMachinesCaptureResponse>>; + beginCaptureAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise, void>>; + beginConvertToManagedDisksAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise, VirtualMachinesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise; + beginDeallocate(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise, void>>; + beginDeallocateAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise; + beginInstallPatches(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise, VirtualMachinesInstallPatchesResponse>>; + beginInstallPatchesAndWait(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise, void>>; + beginPerformMaintenanceAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise; + beginPowerOff(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise, void>>; + beginPowerOffAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise; + beginReapply(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise, void>>; + beginReapplyAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise; + beginRedeploy(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise, void>>; + beginRedeployAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise; + beginReimage(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise, void>>; + beginReimageAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise; + beginRestart(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise, void>>; + beginRestartAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise, VirtualMachinesRunCommandResponse>>; + beginRunCommandAndWait(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise; + beginStart(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise, VirtualMachinesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise; + generalize(resourceGroupName: string, vmName: string, options?: VirtualMachinesGeneralizeOptionalParams): Promise; + get(resourceGroupName: string, vmName: string, options?: VirtualMachinesGetOptionalParams): Promise; + instanceView(resourceGroupName: string, vmName: string, options?: VirtualMachinesInstanceViewOptionalParams): Promise; + list(resourceGroupName: string, options?: VirtualMachinesListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: VirtualMachinesListAllOptionalParams): PagedAsyncIterableIterator; + listAvailableSizes(resourceGroupName: string, vmName: string, options?: VirtualMachinesListAvailableSizesOptionalParams): PagedAsyncIterableIterator; + listByLocation(location: string, options?: VirtualMachinesListByLocationOptionalParams): PagedAsyncIterableIterator; + retrieveBootDiagnosticsData(resourceGroupName: string, vmName: string, options?: VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams): Promise; + simulateEviction(resourceGroupName: string, vmName: string, options?: VirtualMachinesSimulateEvictionOptionalParams): Promise; +} + +// @public +export interface VirtualMachinesAssessPatchesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult; + +// @public +export type VirtualMachineScaleSet = Resource & { + sku?: Sku; + plan?: Plan; + identity?: VirtualMachineScaleSetIdentity; + zones?: string[]; + extendedLocation?: ExtendedLocation; + upgradePolicy?: UpgradePolicy; + automaticRepairsPolicy?: AutomaticRepairsPolicy; + virtualMachineProfile?: VirtualMachineScaleSetVMProfile; + readonly provisioningState?: string; + overprovision?: boolean; + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + readonly uniqueId?: string; + singlePlacementGroup?: boolean; + zoneBalance?: boolean; + platformFaultDomainCount?: number; + proximityPlacementGroup?: SubResource; + hostGroup?: SubResource; + additionalCapabilities?: AdditionalCapabilities; + scaleInPolicy?: ScaleInPolicy; + orchestrationMode?: OrchestrationMode; +}; + +// @public +export interface VirtualMachineScaleSetDataDisk { + caching?: CachingTypes; + createOption: DiskCreateOptionTypes; + diskIopsReadWrite?: number; + diskMBpsReadWrite?: number; + diskSizeGB?: number; + lun: number; + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + name?: string; + writeAcceleratorEnabled?: boolean; +} + +// @public +export type VirtualMachineScaleSetExtension = SubResourceReadOnly & { + name?: string; + readonly type?: string; + forceUpdateTag?: string; + publisher?: string; + typePropertiesType?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + settings?: Record; + protectedSettings?: Record; + readonly provisioningState?: string; + provisionAfterExtensions?: string[]; +}; + +// @public +export interface VirtualMachineScaleSetExtensionListResult { + nextLink?: string; + value: VirtualMachineScaleSetExtension[]; +} + +// @public +export interface VirtualMachineScaleSetExtensionProfile { + extensions?: VirtualMachineScaleSetExtension[]; + extensionsTimeBudget?: string; +} + +// @public +export interface VirtualMachineScaleSetExtensions { + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtension, options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams): Promise, VirtualMachineScaleSetExtensionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: VirtualMachineScaleSetExtensionUpdate, options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: VirtualMachineScaleSetExtensionsGetOptionalParams): Promise; + list(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetExtensionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetExtensionsCreateOrUpdateResponse = VirtualMachineScaleSetExtension; + +// @public +export interface VirtualMachineScaleSetExtensionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetExtensionsGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineScaleSetExtensionsGetResponse = VirtualMachineScaleSetExtension; + +// @public +export interface VirtualMachineScaleSetExtensionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetExtensionsListNextResponse = VirtualMachineScaleSetExtensionListResult; + +// @public +export interface VirtualMachineScaleSetExtensionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetExtensionsListResponse = VirtualMachineScaleSetExtensionListResult; + +// @public +export interface VirtualMachineScaleSetExtensionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetExtensionsUpdateResponse = VirtualMachineScaleSetExtension; + +// @public +export type VirtualMachineScaleSetExtensionUpdate = SubResourceReadOnly & { + readonly name?: string; + readonly type?: string; + forceUpdateTag?: string; + publisher?: string; + typePropertiesType?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + settings?: Record; + protectedSettings?: Record; + readonly provisioningState?: string; + provisionAfterExtensions?: string[]; +}; + +// @public +export interface VirtualMachineScaleSetIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: ResourceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue; + }; +} + +// @public (undocumented) +export interface VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface VirtualMachineScaleSetInstanceView { + readonly extensions?: VirtualMachineScaleSetVMExtensionsSummary[]; + readonly orchestrationServices?: OrchestrationServiceSummary[]; + statuses?: InstanceViewStatus[]; + readonly virtualMachine?: VirtualMachineScaleSetInstanceViewStatusesSummary; +} + +// @public +export interface VirtualMachineScaleSetInstanceViewStatusesSummary { + readonly statusesSummary?: VirtualMachineStatusCodeCount[]; +} + +// @public +export type VirtualMachineScaleSetIPConfiguration = SubResource & { + name: string; + subnet?: ApiEntityReference; + primary?: boolean; + publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; + privateIPAddressVersion?: IPVersion; + applicationGatewayBackendAddressPools?: SubResource[]; + applicationSecurityGroups?: SubResource[]; + loadBalancerBackendAddressPools?: SubResource[]; + loadBalancerInboundNatPools?: SubResource[]; +}; + +// @public +export interface VirtualMachineScaleSetIpTag { + ipTagType?: string; + tag?: string; +} + +// @public +export interface VirtualMachineScaleSetListOSUpgradeHistory { + nextLink?: string; + value: UpgradeOperationHistoricalStatusInfo[]; +} + +// @public +export interface VirtualMachineScaleSetListResult { + nextLink?: string; + value: VirtualMachineScaleSet[]; +} + +// @public +export interface VirtualMachineScaleSetListSkusResult { + nextLink?: string; + value: VirtualMachineScaleSetSku[]; +} + +// @public +export interface VirtualMachineScaleSetListWithLinkResult { + nextLink?: string; + value: VirtualMachineScaleSet[]; +} + +// @public +export interface VirtualMachineScaleSetManagedDiskParameters { + diskEncryptionSet?: DiskEncryptionSetParameters; + storageAccountType?: StorageAccountTypes; +} + +// @public +export type VirtualMachineScaleSetNetworkConfiguration = SubResource & { + name: string; + primary?: boolean; + enableAcceleratedNetworking?: boolean; + enableFpga?: boolean; + networkSecurityGroup?: SubResource; + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + ipConfigurations?: VirtualMachineScaleSetIPConfiguration[]; + enableIPForwarding?: boolean; + deleteOption?: DeleteOptions; +}; + +// @public +export interface VirtualMachineScaleSetNetworkConfigurationDnsSettings { + dnsServers?: string[]; +} + +// @public +export interface VirtualMachineScaleSetNetworkProfile { + healthProbe?: ApiEntityReference; + networkApiVersion?: NetworkApiVersion; + networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; +} + +// @public +export interface VirtualMachineScaleSetOSDisk { + caching?: CachingTypes; + createOption: DiskCreateOptionTypes; + diffDiskSettings?: DiffDiskSettings; + diskSizeGB?: number; + image?: VirtualHardDisk; + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + name?: string; + osType?: OperatingSystemTypes; + vhdContainers?: string[]; + writeAcceleratorEnabled?: boolean; +} + +// @public +export interface VirtualMachineScaleSetOSProfile { + adminPassword?: string; + adminUsername?: string; + computerNamePrefix?: string; + customData?: string; + linuxConfiguration?: LinuxConfiguration; + secrets?: VaultSecretGroup[]; + windowsConfiguration?: WindowsConfiguration; +} + +// @public +export interface VirtualMachineScaleSetPublicIPAddressConfiguration { + deleteOption?: DeleteOptions; + dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + idleTimeoutInMinutes?: number; + ipTags?: VirtualMachineScaleSetIpTag[]; + name: string; + publicIPAddressVersion?: IPVersion; + publicIPPrefix?: SubResource; + sku?: PublicIPAddressSku; +} + +// @public +export interface VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { + domainNameLabel: string; +} + +// @public +export type VirtualMachineScaleSetReimageParameters = VirtualMachineScaleSetVMReimageParameters & { + instanceIds?: string[]; +}; + +// @public +export interface VirtualMachineScaleSetRollingUpgrades { + beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams): Promise, void>>; + beginCancelAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams): Promise; + beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams): Promise, void>>; + beginStartExtensionUpgradeAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams): Promise; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams): Promise, void>>; + beginStartOSUpgradeAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams): Promise; + getLatest(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams): Promise; +} + +// @public +export interface VirtualMachineScaleSetRollingUpgradesCancelOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetRollingUpgradesGetLatestResponse = RollingUpgradeStatusInfo; + +// @public +export interface VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSets { + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSet, options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams): Promise; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams): Promise, void>>; + beginDeallocateAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeallocateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsDeleteOptionalParams): Promise; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams): Promise, void>>; + beginDeleteInstancesAndWait(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams): Promise; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams): Promise, void>>; + beginPerformMaintenanceAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams): Promise; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams): Promise, void>>; + beginPowerOffAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsPowerOffOptionalParams): Promise; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams): Promise, void>>; + beginRedeployAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRedeployOptionalParams): Promise; + beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams): Promise, void>>; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams): Promise, void>>; + beginReimageAllAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageAllOptionalParams): Promise; + beginReimageAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsReimageOptionalParams): Promise; + beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams): Promise, void>>; + beginRestartAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsRestartOptionalParams): Promise; + beginSetOrchestrationServiceState(resourceGroupName: string, vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams): Promise, void>>; + beginSetOrchestrationServiceStateAndWait(resourceGroupName: string, vmScaleSetName: string, parameters: OrchestrationServiceStateInput, options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams): Promise; + beginStart(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsStartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams): Promise, VirtualMachineScaleSetsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, parameters: VirtualMachineScaleSetUpdate, options?: VirtualMachineScaleSetsUpdateOptionalParams): Promise; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams): Promise, void>>; + beginUpdateInstancesAndWait(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams): Promise; + convertToSinglePlacementGroup(resourceGroupName: string, vmScaleSetName: string, parameters: VMScaleSetConvertToSinglePlacementGroupInput, options?: VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams): Promise; + forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName: string, vmScaleSetName: string, platformUpdateDomain: number, options?: VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams): Promise; + get(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsGetOptionalParams): Promise; + getInstanceView(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsGetInstanceViewOptionalParams): Promise; + list(resourceGroupName: string, options?: VirtualMachineScaleSetsListOptionalParams): PagedAsyncIterableIterator; + listAll(options?: VirtualMachineScaleSetsListAllOptionalParams): PagedAsyncIterableIterator; + listByLocation(location: string, options?: VirtualMachineScaleSetsListByLocationOptionalParams): PagedAsyncIterableIterator; + listOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams): PagedAsyncIterableIterator; + listSkus(resourceGroupName: string, vmScaleSetName: string, options?: VirtualMachineScaleSetsListSkusOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type VirtualMachineScaleSetScaleInRules = string; + +// @public +export interface VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface VirtualMachineScaleSetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetsCreateOrUpdateResponse = VirtualMachineScaleSet; + +// @public +export interface VirtualMachineScaleSetsDeallocateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetsDeleteInstancesOptionalParams extends coreClient.OperationOptions { + forceDeletion?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetsDeleteOptionalParams extends coreClient.OperationOptions { + forceDeletion?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse = RecoveryWalkResponse; + +// @public +export interface VirtualMachineScaleSetsGetInstanceViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsGetInstanceViewResponse = VirtualMachineScaleSetInstanceView; + +// @public +export interface VirtualMachineScaleSetsGetOptionalParams extends coreClient.OperationOptions { + expand?: ExpandTypesForGetVMScaleSets; +} + +// @public +export interface VirtualMachineScaleSetsGetOSUpgradeHistoryNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsGetOSUpgradeHistoryNextResponse = VirtualMachineScaleSetListOSUpgradeHistory; + +// @public +export interface VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsGetOSUpgradeHistoryResponse = VirtualMachineScaleSetListOSUpgradeHistory; + +// @public +export type VirtualMachineScaleSetsGetResponse = VirtualMachineScaleSet; + +// @public +export interface VirtualMachineScaleSetSku { + readonly capacity?: VirtualMachineScaleSetSkuCapacity; + readonly resourceType?: string; + readonly sku?: Sku; +} + +// @public +export interface VirtualMachineScaleSetSkuCapacity { + readonly defaultCapacity?: number; + readonly maximum?: number; + readonly minimum?: number; + readonly scaleType?: VirtualMachineScaleSetSkuScaleType; +} + +// @public +export type VirtualMachineScaleSetSkuScaleType = "Automatic" | "None"; + +// @public +export interface VirtualMachineScaleSetsListAllNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListAllNextResponse = VirtualMachineScaleSetListWithLinkResult; + +// @public +export interface VirtualMachineScaleSetsListAllOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListAllResponse = VirtualMachineScaleSetListWithLinkResult; + +// @public +export interface VirtualMachineScaleSetsListByLocationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListByLocationNextResponse = VirtualMachineScaleSetListResult; + +// @public +export interface VirtualMachineScaleSetsListByLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListByLocationResponse = VirtualMachineScaleSetListResult; + +// @public +export interface VirtualMachineScaleSetsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListNextResponse = VirtualMachineScaleSetListResult; + +// @public +export interface VirtualMachineScaleSetsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListResponse = VirtualMachineScaleSetListResult; + +// @public +export interface VirtualMachineScaleSetsListSkusNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListSkusNextResponse = VirtualMachineScaleSetListSkusResult; + +// @public +export interface VirtualMachineScaleSetsListSkusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetsListSkusResponse = VirtualMachineScaleSetListSkusResult; + +// @public +export interface VirtualMachineScaleSetsPerformMaintenanceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetsPowerOffOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + skipShutdown?: boolean; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetsRedeployOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetsReimageAllOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetsReimageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmScaleSetReimageInput?: VirtualMachineScaleSetReimageParameters; +} + +// @public +export interface VirtualMachineScaleSetsRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; +} + +// @public +export interface VirtualMachineScaleSetStorageProfile { + dataDisks?: VirtualMachineScaleSetDataDisk[]; + imageReference?: ImageReference; + osDisk?: VirtualMachineScaleSetOSDisk; +} + +// @public +export interface VirtualMachineScaleSetsUpdateInstancesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetsUpdateResponse = VirtualMachineScaleSet; + +// @public +export type VirtualMachineScaleSetUpdate = UpdateResource & { + sku?: Sku; + plan?: Plan; + identity?: VirtualMachineScaleSetIdentity; + upgradePolicy?: UpgradePolicy; + automaticRepairsPolicy?: AutomaticRepairsPolicy; + virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; + overprovision?: boolean; + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + singlePlacementGroup?: boolean; + additionalCapabilities?: AdditionalCapabilities; + scaleInPolicy?: ScaleInPolicy; + proximityPlacementGroup?: SubResource; +}; + +// @public +export type VirtualMachineScaleSetUpdateIPConfiguration = SubResource & { + name?: string; + subnet?: ApiEntityReference; + primary?: boolean; + publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; + privateIPAddressVersion?: IPVersion; + applicationGatewayBackendAddressPools?: SubResource[]; + applicationSecurityGroups?: SubResource[]; + loadBalancerBackendAddressPools?: SubResource[]; + loadBalancerInboundNatPools?: SubResource[]; +}; + +// @public +export type VirtualMachineScaleSetUpdateNetworkConfiguration = SubResource & { + name?: string; + primary?: boolean; + enableAcceleratedNetworking?: boolean; + enableFpga?: boolean; + networkSecurityGroup?: SubResource; + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; + enableIPForwarding?: boolean; + deleteOption?: DeleteOptions; +}; + +// @public +export interface VirtualMachineScaleSetUpdateNetworkProfile { + healthProbe?: ApiEntityReference; + networkApiVersion?: NetworkApiVersion; + networkInterfaceConfigurations?: VirtualMachineScaleSetUpdateNetworkConfiguration[]; +} + +// @public +export interface VirtualMachineScaleSetUpdateOSDisk { + caching?: CachingTypes; + diskSizeGB?: number; + image?: VirtualHardDisk; + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + vhdContainers?: string[]; + writeAcceleratorEnabled?: boolean; +} + +// @public +export interface VirtualMachineScaleSetUpdateOSProfile { + customData?: string; + linuxConfiguration?: LinuxConfiguration; + secrets?: VaultSecretGroup[]; + windowsConfiguration?: WindowsConfiguration; +} + +// @public +export interface VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { + deleteOption?: DeleteOptions; + dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + idleTimeoutInMinutes?: number; + name?: string; +} + +// @public +export interface VirtualMachineScaleSetUpdateStorageProfile { + dataDisks?: VirtualMachineScaleSetDataDisk[]; + imageReference?: ImageReference; + osDisk?: VirtualMachineScaleSetUpdateOSDisk; +} + +// @public +export interface VirtualMachineScaleSetUpdateVMProfile { + billingProfile?: BillingProfile; + diagnosticsProfile?: DiagnosticsProfile; + extensionProfile?: VirtualMachineScaleSetExtensionProfile; + licenseType?: string; + networkProfile?: VirtualMachineScaleSetUpdateNetworkProfile; + osProfile?: VirtualMachineScaleSetUpdateOSProfile; + scheduledEventsProfile?: ScheduledEventsProfile; + securityProfile?: SecurityProfile; + storageProfile?: VirtualMachineScaleSetUpdateStorageProfile; + userData?: string; +} + +// @public +export type VirtualMachineScaleSetVM = Resource & { + readonly instanceId?: string; + readonly sku?: Sku; + plan?: Plan; + readonly resources?: VirtualMachineExtension[]; + readonly zones?: string[]; + readonly latestModelApplied?: boolean; + readonly vmId?: string; + readonly instanceView?: VirtualMachineScaleSetVMInstanceView; + hardwareProfile?: HardwareProfile; + storageProfile?: StorageProfile; + additionalCapabilities?: AdditionalCapabilities; + osProfile?: OSProfile; + securityProfile?: SecurityProfile; + networkProfile?: NetworkProfile; + networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; + diagnosticsProfile?: DiagnosticsProfile; + availabilitySet?: SubResource; + readonly provisioningState?: string; + licenseType?: string; + readonly modelDefinitionApplied?: string; + protectionPolicy?: VirtualMachineScaleSetVMProtectionPolicy; + userData?: string; +}; + +// @public +export type VirtualMachineScaleSetVMExtension = SubResourceReadOnly & { + readonly name?: string; + readonly type?: string; + forceUpdateTag?: string; + publisher?: string; + typePropertiesType?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + settings?: Record; + protectedSettings?: Record; + readonly provisioningState?: string; + instanceView?: VirtualMachineExtensionInstanceView; +}; + +// @public +export interface VirtualMachineScaleSetVMExtensions { + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtension, options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMExtensionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: VirtualMachineScaleSetVMExtensionsGetOptionalParams): Promise; + list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMExtensionsListOptionalParams): Promise; +} + +// @public +export interface VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse = VirtualMachineScaleSetVMExtension; + +// @public +export interface VirtualMachineScaleSetVMExtensionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMExtensionsGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineScaleSetVMExtensionsGetResponse = VirtualMachineScaleSetVMExtension; + +// @public +export interface VirtualMachineScaleSetVMExtensionsListOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineScaleSetVMExtensionsListResponse = VirtualMachineScaleSetVMExtensionsListResult; + +// @public +export interface VirtualMachineScaleSetVMExtensionsListResult { + value?: VirtualMachineScaleSetVMExtension[]; +} + +// @public +export interface VirtualMachineScaleSetVMExtensionsSummary { + readonly name?: string; + readonly statusesSummary?: VirtualMachineStatusCodeCount[]; +} + +// @public +export interface VirtualMachineScaleSetVMExtensionsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetVMExtensionsUpdateResponse = VirtualMachineScaleSetVMExtension; + +// @public +export type VirtualMachineScaleSetVMExtensionUpdate = SubResourceReadOnly & { + readonly name?: string; + readonly type?: string; + forceUpdateTag?: string; + publisher?: string; + typePropertiesType?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + enableAutomaticUpgrade?: boolean; + settings?: Record; + protectedSettings?: Record; +}; + +// @public +export interface VirtualMachineScaleSetVMInstanceIDs { + instanceIds?: string[]; +} + +// @public +export interface VirtualMachineScaleSetVMInstanceRequiredIDs { + instanceIds: string[]; +} + +// @public +export interface VirtualMachineScaleSetVMInstanceView { + readonly assignedHost?: string; + bootDiagnostics?: BootDiagnosticsInstanceView; + disks?: DiskInstanceView[]; + extensions?: VirtualMachineExtensionInstanceView[]; + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + placementGroupId?: string; + platformFaultDomain?: number; + platformUpdateDomain?: number; + rdpThumbPrint?: string; + statuses?: InstanceViewStatus[]; + vmAgent?: VirtualMachineAgentInstanceView; + readonly vmHealth?: VirtualMachineHealthStatus; +} + +// @public +export interface VirtualMachineScaleSetVMListResult { + nextLink?: string; + value: VirtualMachineScaleSetVM[]; +} + +// @public +export interface VirtualMachineScaleSetVMNetworkProfileConfiguration { + networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; +} + +// @public +export interface VirtualMachineScaleSetVMProfile { + billingProfile?: BillingProfile; + diagnosticsProfile?: DiagnosticsProfile; + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + extensionProfile?: VirtualMachineScaleSetExtensionProfile; + licenseType?: string; + networkProfile?: VirtualMachineScaleSetNetworkProfile; + osProfile?: VirtualMachineScaleSetOSProfile; + priority?: VirtualMachinePriorityTypes; + scheduledEventsProfile?: ScheduledEventsProfile; + securityProfile?: SecurityProfile; + storageProfile?: VirtualMachineScaleSetStorageProfile; + userData?: string; +} + +// @public +export interface VirtualMachineScaleSetVMProtectionPolicy { + protectFromScaleIn?: boolean; + protectFromScaleSetActions?: boolean; +} + +// @public +export type VirtualMachineScaleSetVMReimageParameters = VirtualMachineReimageParameters & {}; + +// @public +export interface VirtualMachineScaleSetVMRunCommands { + beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams): Promise, VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommand, options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMRunCommandsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: VirtualMachineRunCommandUpdate, options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams): Promise; + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: VirtualMachineScaleSetVMRunCommandsGetOptionalParams): Promise; + list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand; + +// @public +export interface VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMRunCommandsGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineScaleSetVMRunCommandsGetResponse = VirtualMachineRunCommand; + +// @public +export interface VirtualMachineScaleSetVMRunCommandsListNextOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineScaleSetVMRunCommandsListNextResponse = VirtualMachineRunCommandsListResult; + +// @public +export interface VirtualMachineScaleSetVMRunCommandsListOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type VirtualMachineScaleSetVMRunCommandsListResponse = VirtualMachineRunCommandsListResult; + +// @public +export interface VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetVMRunCommandsUpdateResponse = VirtualMachineRunCommand; + +// @public +export interface VirtualMachineScaleSetVMs { + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams): Promise, void>>; + beginDeallocateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeallocateOptionalParams): Promise; + beginDelete(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsDeleteOptionalParams): Promise; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams): Promise, void>>; + beginPerformMaintenanceAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams): Promise; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams): Promise, void>>; + beginPowerOffAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsPowerOffOptionalParams): Promise; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams): Promise, void>>; + beginRedeployAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRedeployOptionalParams): Promise; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams): Promise, void>>; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams): Promise, void>>; + beginReimageAllAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageAllOptionalParams): Promise; + beginReimageAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsReimageOptionalParams): Promise; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams): Promise, void>>; + beginRestartAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRestartOptionalParams): Promise; + beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams): Promise, VirtualMachineScaleSetVMsRunCommandResponse>>; + beginRunCommandAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: RunCommandInput, options?: VirtualMachineScaleSetVMsRunCommandOptionalParams): Promise; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsStartOptionalParams): Promise; + beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams): Promise, VirtualMachineScaleSetVMsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: VirtualMachineScaleSetVM, options?: VirtualMachineScaleSetVMsUpdateOptionalParams): Promise; + get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsGetOptionalParams): Promise; + getInstanceView(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsGetInstanceViewOptionalParams): Promise; + list(resourceGroupName: string, virtualMachineScaleSetName: string, options?: VirtualMachineScaleSetVMsListOptionalParams): PagedAsyncIterableIterator; + retrieveBootDiagnosticsData(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams): Promise; + simulateEviction(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: VirtualMachineScaleSetVMsSimulateEvictionOptionalParams): Promise; +} + +// @public +export interface VirtualMachineScaleSetVMsDeallocateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsDeleteOptionalParams extends coreClient.OperationOptions { + forceDeletion?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsGetInstanceViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineScaleSetVMsGetInstanceViewResponse = VirtualMachineScaleSetVMInstanceView; + +// @public +export interface VirtualMachineScaleSetVMsGetOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type VirtualMachineScaleSetVMsGetResponse = VirtualMachineScaleSetVM; + +// @public +export interface VirtualMachineScaleSetVMsListNextOptionalParams extends coreClient.OperationOptions { + expand?: string; + filter?: string; + select?: string; +} + +// @public +export type VirtualMachineScaleSetVMsListNextResponse = VirtualMachineScaleSetVMListResult; + +// @public +export interface VirtualMachineScaleSetVMsListOptionalParams extends coreClient.OperationOptions { + expand?: string; + filter?: string; + select?: string; +} + +// @public +export type VirtualMachineScaleSetVMsListResponse = VirtualMachineScaleSetVMListResult; + +// @public +export interface VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsPowerOffOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + skipShutdown?: boolean; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsRedeployOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsReimageAllOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsReimageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; + vmScaleSetVMReimageInput?: VirtualMachineScaleSetVMReimageParameters; +} + +// @public +export interface VirtualMachineScaleSetVMsRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams extends coreClient.OperationOptions { + sasUriExpirationTimeInMinutes?: number; +} + +// @public +export type VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataResponse = RetrieveBootDiagnosticsDataResult; + +// @public +export interface VirtualMachineScaleSetVMsRunCommandOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetVMsRunCommandResponse = RunCommandResult; + +// @public +export interface VirtualMachineScaleSetVMsSimulateEvictionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface VirtualMachineScaleSetVMsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineScaleSetVMsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachineScaleSetVMsUpdateResponse = VirtualMachineScaleSetVM; + +// @public +export interface VirtualMachinesCaptureOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachinesCaptureResponse = VirtualMachineCaptureResult; + +// @public +export interface VirtualMachinesConvertToManagedDisksOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine; + +// @public +export interface VirtualMachinesDeallocateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesDeleteOptionalParams extends coreClient.OperationOptions { + forceDeletion?: boolean; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesGeneralizeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface VirtualMachinesGetOptionalParams extends coreClient.OperationOptions { + expand?: InstanceViewTypes; +} + +// @public +export type VirtualMachinesGetResponse = VirtualMachine; + +// @public +export interface VirtualMachinesInstallPatchesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult; + +// @public +export interface VirtualMachinesInstanceViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachinesInstanceViewResponse = VirtualMachineInstanceView; + +// @public +export interface VirtualMachineSize { + maxDataDiskCount?: number; + memoryInMB?: number; + name?: string; + numberOfCores?: number; + osDiskSizeInMB?: number; + resourceDiskSizeInMB?: number; +} + +// @public +export interface VirtualMachineSizeListResult { + value?: VirtualMachineSize[]; +} + +// @public +export interface VirtualMachineSizes { + list(location: string, options?: VirtualMachineSizesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface VirtualMachineSizesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachineSizesListResponse = VirtualMachineSizeListResult; + +// @public +export type VirtualMachineSizeTypes = string; + +// @public +export interface VirtualMachinesListAllNextOptionalParams extends coreClient.OperationOptions { + statusOnly?: string; +} + +// @public +export type VirtualMachinesListAllNextResponse = VirtualMachineListResult; + +// @public +export interface VirtualMachinesListAllOptionalParams extends coreClient.OperationOptions { + statusOnly?: string; +} + +// @public +export type VirtualMachinesListAllResponse = VirtualMachineListResult; + +// @public +export interface VirtualMachinesListAvailableSizesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachinesListAvailableSizesResponse = VirtualMachineSizeListResult; + +// @public +export interface VirtualMachinesListByLocationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachinesListByLocationNextResponse = VirtualMachineListResult; + +// @public +export interface VirtualMachinesListByLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachinesListByLocationResponse = VirtualMachineListResult; + +// @public +export interface VirtualMachinesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachinesListNextResponse = VirtualMachineListResult; + +// @public +export interface VirtualMachinesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type VirtualMachinesListResponse = VirtualMachineListResult; + +// @public +export interface VirtualMachineSoftwarePatchProperties { + readonly activityId?: string; + readonly assessmentState?: PatchAssessmentState; + readonly classifications?: string[]; + readonly kbId?: string; + readonly lastModifiedDateTime?: Date; + readonly name?: string; + readonly patchId?: string; + readonly publishedDate?: Date; + readonly rebootBehavior?: VMGuestPatchRebootBehavior; + readonly version?: string; +} + +// @public +export interface VirtualMachinesPerformMaintenanceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesPowerOffOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + skipShutdown?: boolean; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesReapplyOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesRedeployOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesReimageOptionalParams extends coreClient.OperationOptions { + parameters?: VirtualMachineReimageParameters; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams extends coreClient.OperationOptions { + sasUriExpirationTimeInMinutes?: number; +} + +// @public +export type VirtualMachinesRetrieveBootDiagnosticsDataResponse = RetrieveBootDiagnosticsDataResult; + +// @public +export interface VirtualMachinesRunCommandOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachinesRunCommandResponse = RunCommandResult; + +// @public +export interface VirtualMachinesSimulateEvictionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface VirtualMachinesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface VirtualMachineStatusCodeCount { + readonly code?: string; + readonly count?: number; +} + +// @public +export interface VirtualMachinesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type VirtualMachinesUpdateResponse = VirtualMachine; + +// @public +export type VirtualMachineUpdate = UpdateResource & { + plan?: Plan; + identity?: VirtualMachineIdentity; + zones?: string[]; + hardwareProfile?: HardwareProfile; + storageProfile?: StorageProfile; + additionalCapabilities?: AdditionalCapabilities; + osProfile?: OSProfile; + networkProfile?: NetworkProfile; + securityProfile?: SecurityProfile; + diagnosticsProfile?: DiagnosticsProfile; + availabilitySet?: SubResource; + virtualMachineScaleSet?: SubResource; + proximityPlacementGroup?: SubResource; + priority?: VirtualMachinePriorityTypes; + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + billingProfile?: BillingProfile; + host?: SubResource; + hostGroup?: SubResource; + readonly provisioningState?: string; + readonly instanceView?: VirtualMachineInstanceView; + licenseType?: string; + readonly vmId?: string; + extensionsTimeBudget?: string; + platformFaultDomain?: number; + scheduledEventsProfile?: ScheduledEventsProfile; + userData?: string; +}; + +// @public +export type VmDiskTypes = string; + +// @public +export type VMGuestPatchClassificationLinux = string; + +// @public +export type VMGuestPatchClassificationWindows = string; + +// @public +export type VMGuestPatchRebootBehavior = string; + +// @public +export type VMGuestPatchRebootSetting = string; + +// @public +export type VMGuestPatchRebootStatus = string; + +// @public (undocumented) +export interface VMScaleSetConvertToSinglePlacementGroupInput { + activePlacementGroupId?: string; +} + +// @public +export interface WindowsConfiguration { + additionalUnattendContent?: AdditionalUnattendContent[]; + enableAutomaticUpdates?: boolean; + patchSettings?: PatchSettings; + provisionVMAgent?: boolean; + timeZone?: string; + winRM?: WinRMConfiguration; +} + +// @public +export interface WindowsParameters { + classificationsToInclude?: VMGuestPatchClassificationWindows[]; + excludeKbsRequiringReboot?: boolean; + kbNumbersToExclude?: string[]; + kbNumbersToInclude?: string[]; + maxPatchPublishDate?: Date; +} + +// @public +export type WindowsPatchAssessmentMode = string; + +// @public +export type WindowsVMGuestPatchMode = string; + +// @public +export interface WinRMConfiguration { + listeners?: WinRMListener[]; +} + +// @public +export interface WinRMListener { + certificateUrl?: string; + protocol?: ProtocolTypes; +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/compute/arm-compute/rollup.config.js b/sdk/compute/arm-compute/rollup.config.js index 21325d2ced2e..9be1955eb7f1 100644 --- a/sdk/compute/arm-compute/rollup.config.js +++ b/sdk/compute/arm-compute/rollup.config.js @@ -1,37 +1,188 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -/** - * @type {rollup.RollupFileOptions} - */ -const config = { - input: "./esm/computeManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-compute.js", - format: "umd", - name: "Azure.ArmCompute", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* +/* * 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. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + */ + +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 + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +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/**"] + }, + 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/compute/arm-compute/src/computeManagementClient.ts b/sdk/compute/arm-compute/src/computeManagementClient.ts index 32a12eb89df2..9fcc79694a87 100644 --- a/sdk/compute/arm-compute/src/computeManagementClient.ts +++ b/sdk/compute/arm-compute/src/computeManagementClient.ts @@ -3,141 +3,221 @@ * 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 * as coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + AvailabilitySetsImpl, + ProximityPlacementGroupsImpl, + DedicatedHostGroupsImpl, + DedicatedHostsImpl, + SshPublicKeysImpl, + VirtualMachineExtensionImagesImpl, + VirtualMachineExtensionsImpl, + VirtualMachineImagesImpl, + VirtualMachineImagesEdgeZoneImpl, + UsageOperationsImpl, + VirtualMachinesImpl, + VirtualMachineScaleSetsImpl, + VirtualMachineSizesImpl, + ImagesImpl, + RestorePointCollectionsImpl, + RestorePointsImpl, + VirtualMachineScaleSetExtensionsImpl, + VirtualMachineScaleSetRollingUpgradesImpl, + VirtualMachineScaleSetVMExtensionsImpl, + VirtualMachineScaleSetVMsImpl, + LogAnalyticsImpl, + VirtualMachineRunCommandsImpl, + VirtualMachineScaleSetVMRunCommandsImpl, + ResourceSkusImpl, + DisksImpl, + SnapshotsImpl, + DiskEncryptionSetsImpl, + DiskAccessesImpl, + DiskRestorePointOperationsImpl, + GalleriesImpl, + GalleryImagesImpl, + GalleryImageVersionsImpl, + GalleryApplicationsImpl, + GalleryApplicationVersionsImpl, + GallerySharingProfileImpl, + SharedGalleriesImpl, + SharedGalleryImagesImpl, + SharedGalleryImageVersionsImpl, + CloudServiceRoleInstancesImpl, + CloudServiceRolesImpl, + CloudServicesImpl, + CloudServicesUpdateDomainImpl, + CloudServiceOperatingSystemsImpl +} from "./operations"; +import { + Operations, + AvailabilitySets, + ProximityPlacementGroups, + DedicatedHostGroups, + DedicatedHosts, + SshPublicKeys, + VirtualMachineExtensionImages, + VirtualMachineExtensions, + VirtualMachineImages, + VirtualMachineImagesEdgeZone, + UsageOperations, + VirtualMachines, + VirtualMachineScaleSets, + VirtualMachineSizes, + Images, + RestorePointCollections, + RestorePoints, + VirtualMachineScaleSetExtensions, + VirtualMachineScaleSetRollingUpgrades, + VirtualMachineScaleSetVMExtensions, + VirtualMachineScaleSetVMs, + LogAnalytics, + VirtualMachineRunCommands, + VirtualMachineScaleSetVMRunCommands, + ResourceSkus, + Disks, + Snapshots, + DiskEncryptionSets, + DiskAccesses, + DiskRestorePointOperations, + Galleries, + GalleryImages, + GalleryImageVersions, + GalleryApplications, + GalleryApplicationVersions, + GallerySharingProfile, + SharedGalleries, + SharedGalleryImages, + SharedGalleryImageVersions, + CloudServiceRoleInstances, + CloudServiceRoles, + CloudServices, + CloudServicesUpdateDomain, + CloudServiceOperatingSystems +} from "./operationsInterfaces"; import { ComputeManagementClientContext } from "./computeManagementClientContext"; +import { ComputeManagementClientOptionalParams } from "./models"; -class ComputeManagementClient extends ComputeManagementClientContext { - // Operation groups - operations: operations.Operations; - availabilitySets: operations.AvailabilitySets; - proximityPlacementGroups: operations.ProximityPlacementGroups; - dedicatedHostGroups: operations.DedicatedHostGroups; - dedicatedHosts: operations.DedicatedHosts; - sshPublicKeys: operations.SshPublicKeys; - virtualMachineExtensionImages: operations.VirtualMachineExtensionImages; - virtualMachineExtensions: operations.VirtualMachineExtensions; - virtualMachineImages: operations.VirtualMachineImages; - virtualMachineImagesEdgeZone: operations.VirtualMachineImagesEdgeZone; - usage: operations.UsageOperations; - virtualMachines: operations.VirtualMachines; - virtualMachineScaleSets: operations.VirtualMachineScaleSets; - virtualMachineSizes: operations.VirtualMachineSizes; - images: operations.Images; - restorePointCollections: operations.RestorePointCollections; - restorePoints: operations.RestorePoints; - virtualMachineScaleSetExtensions: operations.VirtualMachineScaleSetExtensions; - virtualMachineScaleSetRollingUpgrades: operations.VirtualMachineScaleSetRollingUpgrades; - virtualMachineScaleSetVMExtensions: operations.VirtualMachineScaleSetVMExtensions; - virtualMachineScaleSetVMs: operations.VirtualMachineScaleSetVMs; - logAnalytics: operations.LogAnalytics; - virtualMachineRunCommands: operations.VirtualMachineRunCommands; - virtualMachineScaleSetVMRunCommands: operations.VirtualMachineScaleSetVMRunCommands; - resourceSkus: operations.ResourceSkus; - disks: operations.Disks; - snapshots: operations.Snapshots; - diskEncryptionSets: operations.DiskEncryptionSets; - diskAccesses: operations.DiskAccesses; - diskRestorePoint: operations.DiskRestorePointOperations; - galleries: operations.Galleries; - galleryImages: operations.GalleryImages; - galleryImageVersions: operations.GalleryImageVersions; - galleryApplications: operations.GalleryApplications; - galleryApplicationVersions: operations.GalleryApplicationVersions; - gallerySharingProfile: operations.GallerySharingProfile; - sharedGalleries: operations.SharedGalleries; - sharedGalleryImages: operations.SharedGalleryImages; - sharedGalleryImageVersions: operations.SharedGalleryImageVersions; - cloudServiceRoleInstances: operations.CloudServiceRoleInstances; - cloudServiceRoles: operations.CloudServiceRoles; - cloudServices: operations.CloudServices; - cloudServicesUpdateDomain: operations.CloudServicesUpdateDomain; - cloudServiceOperatingSystems: operations.CloudServiceOperatingSystems; - +export class ComputeManagementClient extends ComputeManagementClientContext { /** * Initializes a new instance of the ComputeManagementClient 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 which 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 which 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, + credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: Models.ComputeManagementClientOptions + options?: ComputeManagementClientOptionalParams ) { super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); - this.availabilitySets = new operations.AvailabilitySets(this); - this.proximityPlacementGroups = new operations.ProximityPlacementGroups(this); - this.dedicatedHostGroups = new operations.DedicatedHostGroups(this); - this.dedicatedHosts = new operations.DedicatedHosts(this); - this.sshPublicKeys = new operations.SshPublicKeys(this); - this.virtualMachineExtensionImages = new operations.VirtualMachineExtensionImages(this); - this.virtualMachineExtensions = new operations.VirtualMachineExtensions(this); - this.virtualMachineImages = new operations.VirtualMachineImages(this); - this.virtualMachineImagesEdgeZone = new operations.VirtualMachineImagesEdgeZone(this); - this.usage = new operations.UsageOperations(this); - this.virtualMachines = new operations.VirtualMachines(this); - this.virtualMachineScaleSets = new operations.VirtualMachineScaleSets(this); - this.virtualMachineSizes = new operations.VirtualMachineSizes(this); - this.images = new operations.Images(this); - this.restorePointCollections = new operations.RestorePointCollections(this); - this.restorePoints = new operations.RestorePoints(this); - this.virtualMachineScaleSetExtensions = new operations.VirtualMachineScaleSetExtensions(this); - this.virtualMachineScaleSetRollingUpgrades = new operations.VirtualMachineScaleSetRollingUpgrades( + this.operations = new OperationsImpl(this); + this.availabilitySets = new AvailabilitySetsImpl(this); + this.proximityPlacementGroups = new ProximityPlacementGroupsImpl(this); + this.dedicatedHostGroups = new DedicatedHostGroupsImpl(this); + this.dedicatedHosts = new DedicatedHostsImpl(this); + this.sshPublicKeys = new SshPublicKeysImpl(this); + this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesImpl( + this + ); + this.virtualMachineExtensions = new VirtualMachineExtensionsImpl(this); + this.virtualMachineImages = new VirtualMachineImagesImpl(this); + this.virtualMachineImagesEdgeZone = new VirtualMachineImagesEdgeZoneImpl( + this + ); + this.usageOperations = new UsageOperationsImpl(this); + this.virtualMachines = new VirtualMachinesImpl(this); + this.virtualMachineScaleSets = new VirtualMachineScaleSetsImpl(this); + this.virtualMachineSizes = new VirtualMachineSizesImpl(this); + this.images = new ImagesImpl(this); + this.restorePointCollections = new RestorePointCollectionsImpl(this); + this.restorePoints = new RestorePointsImpl(this); + this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsImpl( + this + ); + this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesImpl( + this + ); + this.virtualMachineScaleSetVMExtensions = new VirtualMachineScaleSetVMExtensionsImpl( this ); - this.virtualMachineScaleSetVMExtensions = new operations.VirtualMachineScaleSetVMExtensions( + this.virtualMachineScaleSetVMs = new VirtualMachineScaleSetVMsImpl(this); + this.logAnalytics = new LogAnalyticsImpl(this); + this.virtualMachineRunCommands = new VirtualMachineRunCommandsImpl(this); + this.virtualMachineScaleSetVMRunCommands = new VirtualMachineScaleSetVMRunCommandsImpl( this ); - this.virtualMachineScaleSetVMs = new operations.VirtualMachineScaleSetVMs(this); - this.logAnalytics = new operations.LogAnalytics(this); - this.virtualMachineRunCommands = new operations.VirtualMachineRunCommands(this); - this.virtualMachineScaleSetVMRunCommands = new operations.VirtualMachineScaleSetVMRunCommands( + this.resourceSkus = new ResourceSkusImpl(this); + this.disks = new DisksImpl(this); + this.snapshots = new SnapshotsImpl(this); + this.diskEncryptionSets = new DiskEncryptionSetsImpl(this); + this.diskAccesses = new DiskAccessesImpl(this); + this.diskRestorePointOperations = new DiskRestorePointOperationsImpl(this); + this.galleries = new GalleriesImpl(this); + this.galleryImages = new GalleryImagesImpl(this); + this.galleryImageVersions = new GalleryImageVersionsImpl(this); + this.galleryApplications = new GalleryApplicationsImpl(this); + this.galleryApplicationVersions = new GalleryApplicationVersionsImpl(this); + this.gallerySharingProfile = new GallerySharingProfileImpl(this); + this.sharedGalleries = new SharedGalleriesImpl(this); + this.sharedGalleryImages = new SharedGalleryImagesImpl(this); + this.sharedGalleryImageVersions = new SharedGalleryImageVersionsImpl(this); + this.cloudServiceRoleInstances = new CloudServiceRoleInstancesImpl(this); + this.cloudServiceRoles = new CloudServiceRolesImpl(this); + this.cloudServices = new CloudServicesImpl(this); + this.cloudServicesUpdateDomain = new CloudServicesUpdateDomainImpl(this); + this.cloudServiceOperatingSystems = new CloudServiceOperatingSystemsImpl( this ); - this.resourceSkus = new operations.ResourceSkus(this); - this.disks = new operations.Disks(this); - this.snapshots = new operations.Snapshots(this); - this.diskEncryptionSets = new operations.DiskEncryptionSets(this); - this.diskAccesses = new operations.DiskAccesses(this); - this.diskRestorePoint = new operations.DiskRestorePointOperations(this); - this.galleries = new operations.Galleries(this); - this.galleryImages = new operations.GalleryImages(this); - this.galleryImageVersions = new operations.GalleryImageVersions(this); - this.galleryApplications = new operations.GalleryApplications(this); - this.galleryApplicationVersions = new operations.GalleryApplicationVersions(this); - this.gallerySharingProfile = new operations.GallerySharingProfile(this); - this.sharedGalleries = new operations.SharedGalleries(this); - this.sharedGalleryImages = new operations.SharedGalleryImages(this); - this.sharedGalleryImageVersions = new operations.SharedGalleryImageVersions(this); - this.cloudServiceRoleInstances = new operations.CloudServiceRoleInstances(this); - this.cloudServiceRoles = new operations.CloudServiceRoles(this); - this.cloudServices = new operations.CloudServices(this); - this.cloudServicesUpdateDomain = new operations.CloudServicesUpdateDomain(this); - this.cloudServiceOperatingSystems = new operations.CloudServiceOperatingSystems(this); } -} - -// Operation Specifications -export { - ComputeManagementClient, - ComputeManagementClientContext, - Models as ComputeManagementModels, - Mappers as ComputeManagementMappers -}; -export * from "./operations"; + operations: Operations; + availabilitySets: AvailabilitySets; + proximityPlacementGroups: ProximityPlacementGroups; + dedicatedHostGroups: DedicatedHostGroups; + dedicatedHosts: DedicatedHosts; + sshPublicKeys: SshPublicKeys; + virtualMachineExtensionImages: VirtualMachineExtensionImages; + virtualMachineExtensions: VirtualMachineExtensions; + virtualMachineImages: VirtualMachineImages; + virtualMachineImagesEdgeZone: VirtualMachineImagesEdgeZone; + usageOperations: UsageOperations; + virtualMachines: VirtualMachines; + virtualMachineScaleSets: VirtualMachineScaleSets; + virtualMachineSizes: VirtualMachineSizes; + images: Images; + restorePointCollections: RestorePointCollections; + restorePoints: RestorePoints; + virtualMachineScaleSetExtensions: VirtualMachineScaleSetExtensions; + virtualMachineScaleSetRollingUpgrades: VirtualMachineScaleSetRollingUpgrades; + virtualMachineScaleSetVMExtensions: VirtualMachineScaleSetVMExtensions; + virtualMachineScaleSetVMs: VirtualMachineScaleSetVMs; + logAnalytics: LogAnalytics; + virtualMachineRunCommands: VirtualMachineRunCommands; + virtualMachineScaleSetVMRunCommands: VirtualMachineScaleSetVMRunCommands; + resourceSkus: ResourceSkus; + disks: Disks; + snapshots: Snapshots; + diskEncryptionSets: DiskEncryptionSets; + diskAccesses: DiskAccesses; + diskRestorePointOperations: DiskRestorePointOperations; + galleries: Galleries; + galleryImages: GalleryImages; + galleryImageVersions: GalleryImageVersions; + galleryApplications: GalleryApplications; + galleryApplicationVersions: GalleryApplicationVersions; + gallerySharingProfile: GallerySharingProfile; + sharedGalleries: SharedGalleries; + sharedGalleryImages: SharedGalleryImages; + sharedGalleryImageVersions: SharedGalleryImageVersions; + cloudServiceRoleInstances: CloudServiceRoleInstances; + cloudServiceRoles: CloudServiceRoles; + cloudServices: CloudServices; + cloudServicesUpdateDomain: CloudServicesUpdateDomain; + cloudServiceOperatingSystems: CloudServiceOperatingSystems; +} diff --git a/sdk/compute/arm-compute/src/computeManagementClientContext.ts b/sdk/compute/arm-compute/src/computeManagementClientContext.ts index d73c162bd266..9b8a39b482c3 100644 --- a/sdk/compute/arm-compute/src/computeManagementClientContext.ts +++ b/sdk/compute/arm-compute/src/computeManagementClientContext.ts @@ -3,71 +3,67 @@ * 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 Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import { TokenCredential } from "@azure/core-auth"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { ComputeManagementClientOptionalParams } from "./models"; -const packageName = "@azure/arm-compute"; -const packageVersion = "16.2.0"; - -export class ComputeManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials | TokenCredential; +export class ComputeManagementClientContext extends coreClient.ServiceClient { + $host: string; subscriptionId: string; /** - * Initializes a new instance of the ComputeManagementClient 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 which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. - * @param [options] The parameter options + * Initializes a new instance of the ComputeManagementClientContext class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId Subscription credentials which 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, + credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: Models.ComputeManagementClientOptions + options?: ComputeManagementClientOptionalParams ) { - if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); } - if (subscriptionId == undefined) { - throw new Error("'subscriptionId' cannot be null."); + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); } + // Initializing default values for options if (!options) { options = {}; } - if (!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } + const defaults: ComputeManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; - super(credentials, options); + const packageDetails = `azsdk-js-arm-compute/30.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; - 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; + 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; - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if ( - options.longRunningOperationRetryTimeout !== null && - options.longRunningOperationRetryTimeout !== undefined - ) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; } } diff --git a/sdk/compute/arm-compute/src/coreClientLro.ts b/sdk/compute/arm-compute/src/coreClientLro.ts new file mode 100644 index 000000000000..d793a24458bc --- /dev/null +++ b/sdk/compute/arm-compute/src/coreClientLro.ts @@ -0,0 +1,323 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + OperationArguments, + OperationSpec, + OperationResponseMap, + FullOperationResponse +} from "@azure/core-client"; +import { + LroResourceLocationConfig, + GetLroStatusFromResponse, + LongRunningOperation, + LroConfig, + LroMode, + LroResponse, + LroStatus, + createGetLroStatusFromResponse, + RawResponse +} from "./lro"; + +export const successStates = ["succeeded"]; +export const failureStates = ["failed", "canceled", "cancelled"]; +export const terminalStates = successStates.concat(failureStates); + +export type SendOperationFn = ( + args: OperationArguments, + spec: OperationSpec +) => Promise>; + +export function createPollingMethod( + sendOperationFn: SendOperationFn, + GetLroStatusFromResponse: GetLroStatusFromResponse, + args: OperationArguments, + spec: OperationSpec, + mode?: LroMode +): (path?: string) => Promise> { + /** + * Polling calls will always return a status object i.e. {"status": "success"} + * these intermediate responses are not described in the swagger so we need to + * pass custom mappers at runtime. + * This function replaces all the existing mappers to be able to deserialize a status object + * @param responses Original set of responses defined in the operation + */ + function getCompositeMappers(responses: { + [responseCode: string]: OperationResponseMap; + }): { + [responseCode: string]: OperationResponseMap; + } { + return Object.keys(responses).reduce((acc, statusCode) => { + return { + ...acc, + [statusCode]: { + ...responses[statusCode], + bodyMapper: { + type: { + name: "Composite", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } + } + } + }; + }, {} as { [responseCode: string]: OperationResponseMap }); + } + let response: LroStatus | undefined = undefined; + const customerCallback = args?.options?.onResponse; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: ( + rawResponse: FullOperationResponse, + flatResponse: unknown + ): void => { + response = GetLroStatusFromResponse( + { + statusCode: rawResponse.status, + body: rawResponse.parsedBody, + headers: rawResponse.headers.toJSON() + }, + flatResponse as TResult + ); + if (response.done) { + customerCallback?.(rawResponse, flatResponse); + } + } + } + }; + // Make sure we don't send any body to the get request + const { requestBody, responses, ...restSpec } = spec; + if (mode === "AzureAsync") { + return async (path?: string) => { + await sendOperationFn(updatedArgs, { + ...restSpec, + responses: getCompositeMappers(responses), + httpMethod: "GET", + ...(path && { path }) + }); + return response!; + }; + } + return async (path?: string) => { + await sendOperationFn(updatedArgs, { + ...restSpec, + responses: responses, + httpMethod: "GET", + ...(path && { path }) + }); + return response!; + }; +} + +/** + * We need to selectively deserialize our responses, only deserializing if we + * are in a final Lro response, not deserializing any polling non-terminal responses + */ +export function shouldDeserializeLro(lroResourceLocationConfig?: string) { + let initialOperationInfo: LroResponseInfo | undefined; + let isInitialRequest = true; + + return (response: FullOperationResponse) => { + if (response.status < 200 || response.status >= 300) { + return true; + } + + if (!initialOperationInfo) { + initialOperationInfo = getLroData(response); + } else { + isInitialRequest = false; + } + + if ( + initialOperationInfo.azureAsyncOperation || + initialOperationInfo.operationLocation + ) { + return ( + !isInitialRequest && + isAsyncOperationFinalResponse( + response, + initialOperationInfo, + lroResourceLocationConfig + ) + ); + } + + if (initialOperationInfo.location) { + return isLocationFinalResponse(response); + } + + if (initialOperationInfo.requestMethod === "PUT") { + return isBodyPollingFinalResponse(response); + } + + return true; + }; +} + +function isAsyncOperationFinalResponse( + response: FullOperationResponse, + initialOperationInfo: LroResponseInfo, + lroResourceLocationConfig?: string +): boolean { + const status: string = response.parsedBody?.status || "Succeeded"; + if (!terminalStates.includes(status.toLowerCase())) { + return false; + } + + if (initialOperationInfo.requestMethod === "DELETE") { + return true; + } + + if ( + initialOperationInfo.requestMethod === "PUT" && + lroResourceLocationConfig && + lroResourceLocationConfig.toLowerCase() === "azure-asyncoperation" + ) { + return true; + } + + if ( + initialOperationInfo.requestMethod !== "PUT" && + !initialOperationInfo.location + ) { + return true; + } + + return false; +} + +function isLocationFinalResponse(response: FullOperationResponse): boolean { + return response.status !== 202; +} + +function isBodyPollingFinalResponse(response: FullOperationResponse): boolean { + const provisioningState: string = + response.parsedBody?.properties?.provisioningState || "Succeeded"; + + if (terminalStates.includes(provisioningState.toLowerCase())) { + return true; + } + + return false; +} + +interface LroResponseInfo { + requestMethod: string; + azureAsyncOperation?: string; + operationLocation?: string; + location?: string; +} + +function getLroData(result: FullOperationResponse): LroResponseInfo { + return { + azureAsyncOperation: result.headers.get("azure-asyncoperation"), + operationLocation: result.headers.get("operation-location"), + location: result.headers.get("location"), + requestMethod: result.request.method + }; +} + +export function getSpecPath(spec: OperationSpec): string { + if (spec.path) { + return spec.path; + } else { + throw Error("Bad spec: request path is not found!"); + } +} + +export class CoreClientLro implements LongRunningOperation { + constructor( + private sendOperationFn: SendOperationFn, + private args: OperationArguments, + private spec: OperationSpec, + private lroResourceLocationConfig?: LroResourceLocationConfig, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest( + initializeState: ( + rawResponse: RawResponse, + flatResponse: unknown + ) => boolean + ): Promise> { + const { onResponse, ...restOptions } = this.args.options || {}; + return this.sendOperationFn( + { + ...this.args, + options: { + ...restOptions, + onResponse: ( + rawResponse: FullOperationResponse, + flatResponse: unknown + ) => { + const isCompleted = initializeState( + { + statusCode: rawResponse.status, + body: rawResponse.parsedBody, + headers: rawResponse.headers.toJSON() + }, + flatResponse + ); + if (isCompleted) { + onResponse?.(rawResponse, flatResponse); + } + } + } + }, + this.spec + ); + } + + public async sendPollRequest( + config: LroConfig, + path: string + ): Promise> { + const getLroStatusFromResponse = createGetLroStatusFromResponse( + this, + config, + this.lroResourceLocationConfig + ); + return createPollingMethod( + this.sendOperationFn, + getLroStatusFromResponse, + this.args, + this.spec, + config.mode + )(path); + } + + public async retrieveAzureAsyncResource( + path?: string + ): Promise> { + const updatedArgs = { ...this.args }; + if (updatedArgs.options) { + (updatedArgs.options as any).shouldDeserialize = true; + } + return createPollingMethod( + this.sendOperationFn, + (rawResponse, flatResponse) => ({ + rawResponse, + flatResponse, + done: true + }), + updatedArgs, + this.spec + )(path); + } +} diff --git a/sdk/compute/arm-compute/src/index.ts b/sdk/compute/arm-compute/src/index.ts new file mode 100644 index 000000000000..60179f9a7722 --- /dev/null +++ b/sdk/compute/arm-compute/src/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { ComputeManagementClient } from "./computeManagementClient"; +export { ComputeManagementClientContext } from "./computeManagementClientContext"; +export * from "./operationsInterfaces"; diff --git a/sdk/compute/arm-compute/src/lro/azureAsyncPolling.ts b/sdk/compute/arm-compute/src/lro/azureAsyncPolling.ts new file mode 100644 index 000000000000..725578a69264 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/azureAsyncPolling.ts @@ -0,0 +1,96 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + failureStates, + LroResourceLocationConfig, + LongRunningOperation, + LroBody, + LroResponse, + LroStatus, + RawResponse, + successStates +} from "./models"; +import { isUnexpectedPollingResponse } from "./requestUtils"; + +function getResponseStatus(rawResponse: RawResponse): string { + const { status } = (rawResponse.body as LroBody) ?? {}; + return status?.toLowerCase() ?? "succeeded"; +} + +function isAzureAsyncPollingDone(rawResponse: RawResponse): boolean { + const state = getResponseStatus(rawResponse); + if ( + isUnexpectedPollingResponse(rawResponse) || + failureStates.includes(state) + ) { + throw new Error(`Operation status: ${state}`); + } + return successStates.includes(state); +} + +async function sendFinalRequest( + lro: LongRunningOperation, + lroResourceLocationConfig?: LroResourceLocationConfig, + resourceLocation?: string +): Promise | undefined> { + switch (lroResourceLocationConfig) { + case "original-uri": + return lro.retrieveAzureAsyncResource(); + case "azure-async-operation": + return Promise.resolve(undefined); + case "location": + default: + return lro.retrieveAzureAsyncResource(resourceLocation); + } +} + +export function processAzureAsyncOperationResult( + lro: LongRunningOperation, + resourceLocation?: string, + lroResourceLocationConfig?: LroResourceLocationConfig +): (rawResponse: RawResponse, flatResponse: TResult) => LroStatus { + return ( + rawResponse: RawResponse, + flatResponse: TResult + ): LroStatus => { + if (isAzureAsyncPollingDone(rawResponse)) { + if (resourceLocation === undefined) { + return { rawResponse, flatResponse, done: true }; + } else { + return { + rawResponse, + flatResponse, + done: false, + next: async () => { + const finalResponse = await sendFinalRequest( + lro, + lroResourceLocationConfig, + resourceLocation + ); + return { + ...(finalResponse ?? { + rawResponse, + flatResponse + }), + done: true + }; + } + }; + } + } + return { + rawResponse, + flatResponse, + done: false + }; + }; +} diff --git a/sdk/compute/arm-compute/src/lro/bodyPolling.ts b/sdk/compute/arm-compute/src/lro/bodyPolling.ts new file mode 100644 index 000000000000..b1c87f8bc8d7 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/bodyPolling.ts @@ -0,0 +1,54 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + failureStates, + LroBody, + LroStatus, + RawResponse, + successStates +} from "./models"; +import { isUnexpectedPollingResponse } from "./requestUtils"; + +function getProvisioningState(rawResponse: RawResponse): string { + const { properties, provisioningState } = (rawResponse.body as LroBody) ?? {}; + const state: string | undefined = + properties?.provisioningState ?? provisioningState; + return state?.toLowerCase() ?? "succeeded"; +} + +export function isBodyPollingDone(rawResponse: RawResponse): boolean { + const state = getProvisioningState(rawResponse); + if ( + isUnexpectedPollingResponse(rawResponse) || + failureStates.includes(state) + ) { + throw new Error( + `The long running operation has failed. The provisioning state: ${state}.` + ); + } + return successStates.includes(state); +} + +/** + * Creates a polling strategy based on BodyPolling which uses the provisioning state + * from the result to determine the current operation state + */ +export function processBodyPollingOperationResult( + rawResponse: RawResponse, + flatResponse: TResult +): LroStatus { + return { + rawResponse, + flatResponse, + done: isBodyPollingDone(rawResponse) + }; +} diff --git a/sdk/compute/arm-compute/src/lro/index.ts b/sdk/compute/arm-compute/src/lro/index.ts new file mode 100644 index 000000000000..20df608fc848 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/index.ts @@ -0,0 +1,26 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export { LroEngine } from "./lroEngine"; +export { createGetLroStatusFromResponse } from "./stateMachine"; +export { + LroResourceLocationConfig, + GetLroStatusFromResponse, + RawResponse, + LongRunningOperation, + LroConfig, + LroMode, + LroResponse, + LroStatus, + LroTerminalState, + LroInProgressState, + LroEngineOptions +} from "./models"; diff --git a/sdk/compute/arm-compute/src/lro/locationPolling.ts b/sdk/compute/arm-compute/src/lro/locationPolling.ts new file mode 100644 index 000000000000..9d1aadfbdecc --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/locationPolling.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { LroStatus, RawResponse } from "./models"; +import { isUnexpectedPollingResponse } from "./requestUtils"; + +function isLocationPollingDone(rawResponse: RawResponse): boolean { + return ( + !isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202 + ); +} + +export function processLocationPollingOperationResult( + rawResponse: RawResponse, + flatResponse: TResult +): LroStatus { + return { + rawResponse, + flatResponse, + done: isLocationPollingDone(rawResponse) + }; +} diff --git a/sdk/compute/arm-compute/src/lro/lroEngine.ts b/sdk/compute/arm-compute/src/lro/lroEngine.ts new file mode 100644 index 000000000000..85cc15e60913 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/lroEngine.ts @@ -0,0 +1,61 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Poller, PollOperationState } from "@azure/core-lro"; +import { + LongRunningOperation, + LroEngineOptions, + ResumablePollOperationState +} from "./models"; +import { GenericPollOperation } from "./operation"; + +/** + * The LRO Engine, a class that performs polling. + */ +export class LroEngine< + TResult, + TState extends PollOperationState +> extends Poller { + private intervalInMs: number; + + constructor(lro: LongRunningOperation, options?: LroEngineOptions) { + const { intervalInMs = 2000, resumeFrom } = options || {}; + function deserializeState( + resumeFrom: string + ): TState & ResumablePollOperationState { + try { + return JSON.parse(resumeFrom).state; + } catch (e) { + throw new Error( + `LroEngine: Unable to deserialize state: ${resumeFrom}` + ); + } + } + const state: TState & ResumablePollOperationState = resumeFrom + ? deserializeState(resumeFrom) + : ({} as any); + + const operation = new GenericPollOperation(state, lro); + super(operation); + + this.intervalInMs = intervalInMs; + operation.setPollerConfig(this as any); + } + + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay(): Promise { + return new Promise((resolve) => + setTimeout(() => resolve(), this.intervalInMs) + ); + } +} diff --git a/sdk/compute/arm-compute/src/lro/models.ts b/sdk/compute/arm-compute/src/lro/models.ts new file mode 100644 index 000000000000..93c3437c8e40 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/models.ts @@ -0,0 +1,173 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { PollOperationState } from "@azure/core-lro"; + +/** + * Options for the LRO poller. + */ +export interface LroEngineOptions { + /** + * Defines how much time the poller is going to wait before making a new request to the service. + */ + intervalInMs?: number; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + resumeFrom?: string; +} + +export const successStates = ["succeeded"]; +export const failureStates = ["failed", "canceled", "cancelled"]; +/** + * The LRO states that signal that the LRO has completed. + */ +export const terminalStates = successStates.concat(failureStates); + +/** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ +export type LroResourceLocationConfig = + | "azure-async-operation" + | "location" + | "original-uri"; + +/** + * The type of a LRO response body. This is just a convenience type for checking the status of the operation. + */ + +export interface LroBody extends Record { + /** The status of the operation. */ + status?: string; + /** The state of the provisioning process */ + provisioningState?: string; + /** The properties of the provisioning process */ + properties?: { provisioningState?: string } & Record; +} + +/** + * Simple type of the raw response. + */ +export interface RawResponse { + /** The HTTP status code */ + statusCode: number; + /** A HttpHeaders collection in the response represented as a simple JSON object where all header names have been normalized to be lower-case. */ + headers: { + [headerName: string]: string; + }; + /** The parsed response body */ + body?: unknown; +} + +/** + * The type of the response of a LRO. + */ +export interface LroResponse { + /** The flattened response */ + flatResponse: T; + /** The raw response */ + rawResponse: RawResponse; +} + +/** The type of which LRO implementation being followed by a specific API. */ +export type LroMode = "AzureAsync" | "Location" | "Body"; + +/** + * The configuration of a LRO to determine how to perform polling and checking whether the operation has completed. + */ +export interface LroConfig { + /** The LRO mode */ + mode?: LroMode; + /** The path of a provisioned resource */ + resourceLocation?: string; +} + +/** + * Type of a polling operation state that can actually be resumed. + */ +export type ResumablePollOperationState = PollOperationState & { + initialRawResponse?: RawResponse; + config?: LroConfig; + pollingURL?: string; +}; + +export interface PollerConfig { + intervalInMs: number; +} + +/** + * The type of a terminal state of an LRO. + */ +export interface LroTerminalState extends LroResponse { + /** + * Whether the operation has finished. + */ + done: true; +} + +/** + * The type of an in-progress state of an LRO. + */ +export interface LroInProgressState extends LroResponse { + /** + * Whether the operation has finished. + */ + done: false; + /** + * The request to be sent next if it is different from the standard polling one. + * Notice that it will disregard any polling URLs provided to it. + */ + next?: () => Promise>; +} + +/** + * The type of an LRO state which is a tagged union of terminal and in-progress states. + */ +export type LroStatus = LroTerminalState | LroInProgressState; + +/** + * The type of the getLROStatusFromResponse method. It takes the response as input and returns along the response whether the operation has finished. + */ +export type GetLroStatusFromResponse = ( + rawResponse: RawResponse, + flatResponse: T +) => LroStatus; + +/** + * Description of a long running operation. + */ +export interface LongRunningOperation { + /** + * The request path. + */ + requestPath: string; + /** + * The HTTP request method. + */ + requestMethod: string; + /** + * A function that can be used to send initial request to the service. + */ + sendInitialRequest: ( + initializeState: ( + rawResponse: RawResponse, + flatResponse: unknown + ) => boolean + ) => Promise>; + /** + * A function that can be used to poll for the current status of a long running operation. + */ + sendPollRequest: (config: LroConfig, path: string) => Promise>; + /** + * A function that can be used to retrieve the provisioned azure resource. + */ + retrieveAzureAsyncResource: (path?: string) => Promise>; +} diff --git a/sdk/compute/arm-compute/src/lro/operation.ts b/sdk/compute/arm-compute/src/lro/operation.ts new file mode 100644 index 000000000000..3ea7b76d89b3 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/operation.ts @@ -0,0 +1,120 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; +import { PollOperationState, PollOperation } from "@azure/core-lro"; +import { + PollerConfig, + ResumablePollOperationState, + LongRunningOperation, + LroStatus +} from "./models"; +import { getPollingUrl } from "./requestUtils"; +import { createInitializeState, createPollForLROStatus } from "./stateMachine"; + +export class GenericPollOperation< + TResult, + TState extends PollOperationState +> implements PollOperation { + private getLROStatusFromResponse?: ( + pollingURL: string, + pollerConfig: PollerConfig + ) => Promise>; + private pollerConfig?: PollerConfig; + constructor( + public state: TState & ResumablePollOperationState, + private lro: LongRunningOperation + ) {} + + public setPollerConfig(pollerConfig: PollerConfig): void { + this.pollerConfig = pollerConfig; + } + + /** + * General update function for LROPoller, the general process is as follows + * 1. Check initial operation result to determine the strategy to use + * - Strategies: Location, Azure-AsyncOperation, Original Uri + * 2. Check if the operation result has a terminal state + * - Terminal state will be determined by each strategy + * 2.1 If it is terminal state Check if a final GET request is required, if so + * send final GET request and return result from operation. If no final GET + * is required, just return the result from operation. + * - Determining what to call for final request is responsibility of each strategy + * 2.2 If it is not terminal state, call the polling operation and go to step 1 + * - Determining what to call for polling is responsibility of each strategy + * - Strategies will always use the latest URI for polling if provided otherwise + * the last known one + */ + async update(options?: { + abortSignal?: AbortSignalLike | undefined; + fireProgress?: ((state: TState) => void) | undefined; + }): Promise> { + const state = this.state; + if (!state.isStarted) { + const initializeState = createInitializeState( + state, + this.lro.requestPath, + this.lro.requestMethod + ); + await this.lro.sendInitialRequest(initializeState); + } + + if (!state.isCompleted) { + if (this.getLROStatusFromResponse === undefined) { + if (state.config === undefined) { + throw new Error( + "Bad state: LRO mode is undefined. Please check if the serialized state is well-formed." + ); + } + this.getLROStatusFromResponse = createPollForLROStatus( + this.lro, + state.config + ); + } + if (state.pollingURL === undefined) { + throw new Error( + "Bad state: polling URL is undefined. Please check if the serialized state is well-formed." + ); + } + const currentState = await this.getLROStatusFromResponse( + state.pollingURL, + this.pollerConfig! + ); + if (currentState.done) { + state.result = currentState.flatResponse; + state.isCompleted = true; + } else { + this.getLROStatusFromResponse = + currentState.next ?? this.getLROStatusFromResponse; + state.pollingURL = getPollingUrl( + currentState.rawResponse, + state.pollingURL + ); + } + } + options?.fireProgress?.(state); + return this; + } + + async cancel(): Promise> { + this.state.isCancelled = true; + return this; + } + + /** + * Serializes the Poller operation. + */ + public toString(): string { + return JSON.stringify({ + state: this.state + }); + } +} diff --git a/sdk/compute/arm-compute/src/lro/passthrough.ts b/sdk/compute/arm-compute/src/lro/passthrough.ts new file mode 100644 index 000000000000..ae7f87d38483 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/passthrough.ts @@ -0,0 +1,23 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { LroStatus, RawResponse } from "./models"; + +export function processPassthroughOperationResult( + rawResponse: RawResponse, + flatResponse: TResult +): LroStatus { + return { + rawResponse, + flatResponse, + done: true + }; +} diff --git a/sdk/compute/arm-compute/src/lro/requestUtils.ts b/sdk/compute/arm-compute/src/lro/requestUtils.ts new file mode 100644 index 000000000000..40d993686f0d --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/requestUtils.ts @@ -0,0 +1,105 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { LroConfig, RawResponse } from "./models"; + +/** + * Detects where the continuation token is and returns it. Notice that azure-asyncoperation + * must be checked first before the other location headers because there are scenarios + * where both azure-asyncoperation and location could be present in the same response but + * azure-asyncoperation should be the one to use for polling. + */ +export function getPollingUrl( + rawResponse: RawResponse, + defaultPath: string +): string { + return ( + getAzureAsyncOperation(rawResponse) ?? + getLocation(rawResponse) ?? + getOperationLocation(rawResponse) ?? + defaultPath + ); +} + +function getLocation(rawResponse: RawResponse): string | undefined { + return rawResponse.headers["location"]; +} + +function getOperationLocation(rawResponse: RawResponse): string | undefined { + return rawResponse.headers["operation-location"]; +} + +function getAzureAsyncOperation(rawResponse: RawResponse): string | undefined { + return rawResponse.headers["azure-asyncoperation"]; +} + +export function inferLroMode( + requestPath: string, + requestMethod: string, + rawResponse: RawResponse +): LroConfig { + if (getAzureAsyncOperation(rawResponse) !== undefined) { + return { + mode: "AzureAsync", + resourceLocation: + requestMethod === "PUT" + ? requestPath + : requestMethod === "POST" + ? getLocation(rawResponse) + : undefined + }; + } else if ( + getLocation(rawResponse) !== undefined || + getOperationLocation(rawResponse) !== undefined + ) { + return { + mode: "Location" + }; + } else if (["PUT", "PATCH"].includes(requestMethod)) { + return { + mode: "Body" + }; + } + return {}; +} + +export class RestError extends Error { + public statusCode?: number; + constructor(message: string, statusCode: number) { + super(message); + this.name = "RestError"; + this.statusCode = statusCode; + + Object.setPrototypeOf(this, RestError.prototype); + } +} + +export function isUnexpectedInitialResponse(rawResponse: RawResponse): boolean { + const code = rawResponse.statusCode; + if (![203, 204, 202, 201, 200, 500].includes(code)) { + throw new RestError( + `Received unexpected HTTP status code ${code} in the initial response. This may indicate a server issue.`, + code + ); + } + return false; +} + +export function isUnexpectedPollingResponse(rawResponse: RawResponse): boolean { + const code = rawResponse.statusCode; + if (![202, 201, 200, 500].includes(code)) { + throw new RestError( + `Received unexpected HTTP status code ${code} while polling. This may indicate a server issue.`, + code + ); + } + return false; +} diff --git a/sdk/compute/arm-compute/src/lro/stateMachine.ts b/sdk/compute/arm-compute/src/lro/stateMachine.ts new file mode 100644 index 000000000000..19a8f6747032 --- /dev/null +++ b/sdk/compute/arm-compute/src/lro/stateMachine.ts @@ -0,0 +1,138 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { processAzureAsyncOperationResult } from "./azureAsyncPolling"; +import { + isBodyPollingDone, + processBodyPollingOperationResult +} from "./bodyPolling"; +import { processLocationPollingOperationResult } from "./locationPolling"; +import { + LroResourceLocationConfig, + GetLroStatusFromResponse, + LongRunningOperation, + LroConfig, + LroStatus, + PollerConfig, + RawResponse, + ResumablePollOperationState +} from "./models"; +import { processPassthroughOperationResult } from "./passthrough"; +import { + getPollingUrl, + inferLroMode, + isUnexpectedInitialResponse +} from "./requestUtils"; + +/** + * creates a stepping function that maps an LRO state to another. + */ +export function createGetLroStatusFromResponse( + lroPrimitives: LongRunningOperation, + config: LroConfig, + lroResourceLocationConfig?: LroResourceLocationConfig +): GetLroStatusFromResponse { + switch (config.mode) { + case "AzureAsync": { + return processAzureAsyncOperationResult( + lroPrimitives, + config.resourceLocation, + lroResourceLocationConfig + ); + } + case "Location": { + return processLocationPollingOperationResult; + } + case "Body": { + return processBodyPollingOperationResult; + } + default: { + return processPassthroughOperationResult; + } + } +} + +/** + * Creates a polling operation that returns a LRO state. + */ +export function createPollForLROStatus( + lroPrimitives: LongRunningOperation, + config: LroConfig +): ( + pollingURL: string, + pollerConfig: PollerConfig +) => Promise> { + return async ( + path: string, + pollerConfig: PollerConfig + ): Promise> => { + const response = await lroPrimitives.sendPollRequest(config, path); + const retryAfter: string | undefined = + response.rawResponse.headers["retry-after"]; + if (retryAfter !== undefined) { + const retryAfterInMs = parseInt(retryAfter); + pollerConfig.intervalInMs = isNaN(retryAfterInMs) + ? calculatePollingIntervalFromDate( + new Date(retryAfter), + pollerConfig.intervalInMs + ) + : retryAfterInMs; + } + return response; + }; +} + +function calculatePollingIntervalFromDate( + retryAfterDate: Date, + defaultIntervalInMs: number +): number { + const timeNow = Math.floor(new Date().getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return defaultIntervalInMs; +} + +/** + * Creates a callback to be used to initialize the polling operation state. + * @param state - of the polling operation + * @param operationSpec - of the LRO + * @param callback - callback to be called when the operation is done + * @returns callback that initializes the state of the polling operation + */ +export function createInitializeState( + state: ResumablePollOperationState, + requestPath: string, + requestMethod: string +): (rawResponse: RawResponse, flatResponse: unknown) => boolean { + return (rawResponse: RawResponse, flatResponse: unknown) => { + if (isUnexpectedInitialResponse(rawResponse)) return true; + state.initialRawResponse = rawResponse; + state.isStarted = true; + state.pollingURL = getPollingUrl(state.initialRawResponse, requestPath); + state.config = inferLroMode( + requestPath, + requestMethod, + state.initialRawResponse + ); + /** short circuit polling if body polling is done in the initial request */ + if ( + state.config.mode === undefined || + (state.config.mode === "Body" && + isBodyPollingDone(state.initialRawResponse)) + ) { + state.result = flatResponse as TResult; + state.isCompleted = true; + } + return Boolean(state.isCompleted); + }; +} diff --git a/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts b/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts deleted file mode 100644 index 967d4c6ca074..000000000000 --- a/sdk/compute/arm-compute/src/models/availabilitySetsMappers.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetListResult, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineSize, - VirtualMachineSizeListResult, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/cloudServiceOperatingSystemsMappers.ts b/sdk/compute/arm-compute/src/models/cloudServiceOperatingSystemsMappers.ts deleted file mode 100644 index 97ea70de5c8a..000000000000 --- a/sdk/compute/arm-compute/src/models/cloudServiceOperatingSystemsMappers.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - InnerError, - OSFamily, - OSFamilyListResult, - OSFamilyProperties, - OSVersion, - OSVersionListResult, - OSVersionProperties, - OSVersionPropertiesBase -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/cloudServiceRoleInstancesMappers.ts b/sdk/compute/arm-compute/src/models/cloudServiceRoleInstancesMappers.ts deleted file mode 100644 index 1e57c9d53abe..000000000000 --- a/sdk/compute/arm-compute/src/models/cloudServiceRoleInstancesMappers.ts +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceSku, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceInstanceViewStatus, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RoleInstance, - RoleInstanceInstanceView, - RoleInstanceListResult, - RoleInstanceNetworkProfile, - RoleInstanceProperties, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/cloudServiceRolesMappers.ts b/sdk/compute/arm-compute/src/models/cloudServiceRolesMappers.ts deleted file mode 100644 index 5c9b68780c58..000000000000 --- a/sdk/compute/arm-compute/src/models/cloudServiceRolesMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - CloudServiceRole, - CloudServiceRoleListResult, - CloudServiceRoleProperties, - CloudServiceRoleSku, - InnerError -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/cloudServicesMappers.ts b/sdk/compute/arm-compute/src/models/cloudServicesMappers.ts deleted file mode 100644 index 1e9dfd8e27ce..000000000000 --- a/sdk/compute/arm-compute/src/models/cloudServicesMappers.ts +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceInstanceView, - CloudServiceListResult, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceUpdate, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - InstanceViewStatusesSummary, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceInstanceViewStatus, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RoleInstances, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StatusCodeCount, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/cloudServicesUpdateDomainMappers.ts b/sdk/compute/arm-compute/src/models/cloudServicesUpdateDomainMappers.ts deleted file mode 100644 index 263e5178c53a..000000000000 --- a/sdk/compute/arm-compute/src/models/cloudServicesUpdateDomainMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - InnerError, - UpdateDomain, - UpdateDomainListResult -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts b/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts deleted file mode 100644 index b6f34888e48f..000000000000 --- a/sdk/compute/arm-compute/src/models/dedicatedHostGroupsMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupListResult, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts b/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts deleted file mode 100644 index deea0cb38833..000000000000 --- a/sdk/compute/arm-compute/src/models/dedicatedHostsMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostListResult, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts b/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts deleted file mode 100644 index 75e5593fe9d5..000000000000 --- a/sdk/compute/arm-compute/src/models/diskAccessesMappers.ts +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskAccessList, - DiskAccessUpdate, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateEndpointConnectionListResult, - PrivateLinkResource, - PrivateLinkResourceListResult, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts b/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts deleted file mode 100644 index b1e1e6a71096..000000000000 --- a/sdk/compute/arm-compute/src/models/diskEncryptionSetsMappers.ts +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetList, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskEncryptionSetUpdate, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - ResourceUriList, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/diskRestorePointOperationsMappers.ts b/sdk/compute/arm-compute/src/models/diskRestorePointOperationsMappers.ts deleted file mode 100644 index abbb4f14eb06..000000000000 --- a/sdk/compute/arm-compute/src/models/diskRestorePointOperationsMappers.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - DiskRestorePoint, - DiskRestorePointList, - Encryption, - InnerError, - ProxyOnlyResource, - PurchasePlan -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/disksMappers.ts b/sdk/compute/arm-compute/src/models/disksMappers.ts deleted file mode 100644 index 3e560539ca22..000000000000 --- a/sdk/compute/arm-compute/src/models/disksMappers.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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 { - AccessUri, - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskList, - DiskSecurityProfile, - DiskSku, - DiskUpdate, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - GrantAccessData, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/galleriesMappers.ts b/sdk/compute/arm-compute/src/models/galleriesMappers.ts deleted file mode 100644 index 794243ab3ff1..000000000000 --- a/sdk/compute/arm-compute/src/models/galleriesMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryList, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts b/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts deleted file mode 100644 index e952760016ec..000000000000 --- a/sdk/compute/arm-compute/src/models/galleryApplicationVersionsMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionList, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts b/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts deleted file mode 100644 index 0d543a5cc3f1..000000000000 --- a/sdk/compute/arm-compute/src/models/galleryApplicationsMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationList, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts b/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts deleted file mode 100644 index cecf6ffdd9a8..000000000000 --- a/sdk/compute/arm-compute/src/models/galleryImageVersionsMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionList, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts b/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts deleted file mode 100644 index 0ac43aeb3c7d..000000000000 --- a/sdk/compute/arm-compute/src/models/galleryImagesMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageList, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/gallerySharingProfileMappers.ts b/sdk/compute/arm-compute/src/models/gallerySharingProfileMappers.ts deleted file mode 100644 index 959e24e26d33..000000000000 --- a/sdk/compute/arm-compute/src/models/gallerySharingProfileMappers.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/imagesMappers.ts b/sdk/compute/arm-compute/src/models/imagesMappers.ts deleted file mode 100644 index f5283950fb63..000000000000 --- a/sdk/compute/arm-compute/src/models/imagesMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageListResult, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/index.ts b/sdk/compute/arm-compute/src/models/index.ts index 5439a3450ce8..a8a945cb8fc2 100644 --- a/sdk/compute/arm-compute/src/models/index.ts +++ b/sdk/compute/arm-compute/src/models/index.ts @@ -6,16925 +6,9965 @@ * 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 }; - -/** - * The properties of the source resource that this restore point collection is created from. - */ -export interface RestorePointCollectionSourceProperties { - /** - * Location of the source resource used to create this restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; +/** The List Compute Operation operation response. */ +export interface ComputeOperationListResult { /** - * Resource Id of the source resource used to create this restore point collection + * The list of compute operations + * NOTE: This property will not be serialized. It can only be populated by the server. */ - id?: string; + readonly value?: ComputeOperationValue[]; } -/** - * Specifies the hardware settings for the virtual machine. - */ -export interface HardwareProfile { +/** Describes the properties of a Compute Operation value. */ +export interface ComputeOperationValue { /** - * Specifies the size of the virtual machine.

The enum data type is currently deprecated - * and will be removed by December 23rd 2023.

Recommended way to get the list of - * available sizes is using these APIs:

[List all available virtual machine sizes in an - * availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

- * [List all available virtual machine sizes in a region]( - * https://docs.microsoft.com/rest/api/compute/resourceskus/list)

[List all available - * virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For - * more information about virtual machine sizes, see [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/sizes).

The available VM - * sizes depend on region and availability set. Possible values include: 'Basic_A0', 'Basic_A1', - * 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', - * 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', - * 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', - * 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', - * 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', - * 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', - * 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', - * 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', - * 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', - * 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - * 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', - * 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - * 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', - * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - * 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', - * 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - * 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', - * 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', - * 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', - * 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', - * 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', - * 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', - * 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', - * 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', - * 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24' + * The origin of the compute operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vmSize?: VirtualMachineSizeTypes; -} - -/** - * An interface representing SubResource. - */ -export interface SubResource extends BaseResource { + readonly origin?: string; /** - * Resource Id + * The name of the compute operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - id?: string; -} - -/** - * Describes a reference to Key Vault Secret - */ -export interface KeyVaultSecretReference { + readonly name?: string; /** - * The URL referencing a secret in a Key Vault. + * The display name of the compute operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - secretUrl: string; + readonly operation?: string; /** - * The relative URL of the Key Vault containing the secret. + * The display name of the resource the operation applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceVault: SubResource; -} - -/** - * Describes a reference to Key Vault Key - */ -export interface KeyVaultKeyReference { + readonly resource?: string; /** - * The URL referencing a key encryption key in Key Vault. + * The description of the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - keyUrl: string; + readonly description?: string; /** - * The relative URL of the Key Vault containing the key. + * The resource provider for the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceVault: SubResource; + readonly provider?: string; } -/** - * Describes a Encryption Settings for a Disk - */ -export interface DiskEncryptionSettings { +/** The Resource model definition. */ +export interface Resource { /** - * Specifies the location of the disk encryption key, which is a Key Vault Secret. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diskEncryptionKey?: KeyVaultSecretReference; + readonly id?: string; /** - * Specifies the location of the key encryption key in Key Vault. + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - keyEncryptionKey?: KeyVaultKeyReference; + readonly name?: string; /** - * Specifies whether disk encryption should be enabled on the virtual machine. + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enabled?: boolean; + readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; } -/** - * Describes the parameter of customer managed disk encryption set resource id that can be - * specified for disk.

NOTE: The disk encryption set resource id can only be specified for - * managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. - */ -export interface DiskEncryptionSetParameters extends SubResource {} - -/** - * The parameters of a managed disk. - */ -export interface ManagedDiskParameters extends SubResource { - /** - * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used - * with data disks, it cannot be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS' - */ - storageAccountType?: StorageAccountTypes; - /** - * Specifies the customer managed disk encryption set resource id for the managed disk. - */ - diskEncryptionSet?: DiskEncryptionSetParameters; +export interface SubResource { + /** Resource Id */ + id?: string; } -/** - * The API entity reference. - */ -export interface ApiEntityReference { - /** - * The ARM resource id in the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - */ - id?: string; +/** Instance view status. */ +export interface InstanceViewStatus { + /** The status code. */ + code?: string; + /** The level code. */ + level?: StatusLevelTypes; + /** The short localizable label for the status. */ + displayStatus?: string; + /** The detailed status message, including for alerts and error messages. */ + message?: string; + /** The time of the status. */ + time?: Date; } -/** - * Describes an Operating System disk. - */ -export interface RestorePointSourceVMOSDisk { - /** - * Gets the Operating System type. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemType; - /** - * Gets the disk encryption settings. - */ - encryptionSettings?: DiskEncryptionSettings; - /** - * Gets the disk name. - */ +/** Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name. */ +export interface Sku { + /** The sku name. */ name?: string; - /** - * Gets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - */ - caching?: CachingTypes; - /** - * Gets the disk size in GB. - */ - diskSizeGB?: number; - /** - * Gets the managed disk details - */ - managedDisk?: ManagedDiskParameters; - /** - * Gets the disk restore point Id. - */ - diskRestorePoint?: ApiEntityReference; + /** Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** */ + tier?: string; + /** Specifies the number of virtual machines in the scale set. */ + capacity?: number; } -/** - * Describes a data disk. - */ -export interface RestorePointSourceVMDataDisk { - /** - * Gets the logical unit number. - */ - lun?: number; - /** - * Gets the disk name. - */ +/** The Update Resource model definition. */ +export interface UpdateResource { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** The List Availability Set operation response. */ +export interface AvailabilitySetListResult { + /** The list of availability sets */ + value: AvailabilitySet[]; + /** The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets. */ + nextLink?: string; +} + +/** The List Virtual Machine operation response. */ +export interface VirtualMachineSizeListResult { + /** The list of virtual machine sizes. */ + value?: VirtualMachineSize[]; +} + +/** Describes the properties of a VM size. */ +export interface VirtualMachineSize { + /** The name of the virtual machine size. */ name?: string; - /** - * Gets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - */ - caching?: CachingTypes; - /** - * Gets the initial disk size in GB for blank data disks, and the new desired size for existing - * OS and Data disks. - */ - diskSizeGB?: number; - /** - * Gets the managed disk details - */ - managedDisk?: ManagedDiskParameters; - /** - * Gets the disk restore point Id. - */ - diskRestorePoint?: ApiEntityReference; + /** The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list */ + numberOfCores?: number; + /** The OS disk size, in MB, allowed by the virtual machine size. */ + osDiskSizeInMB?: number; + /** The resource disk size, in MB, allowed by the virtual machine size. */ + resourceDiskSizeInMB?: number; + /** The amount of memory, in MB, supported by the virtual machine size. */ + memoryInMB?: number; + /** The maximum number of data disks that can be attached to the virtual machine size. */ + maxDataDiskCount?: number; } -/** - * Describes the storage profile. - */ -export interface RestorePointSourceVMStorageProfile { - /** - * Gets the OS disk of the VM captured at the time of the restore point creation. - */ - osDisk?: RestorePointSourceVMOSDisk; - /** - * Gets the data disks of the VM captured at the time of the restore point creation. - */ - dataDisks?: RestorePointSourceVMDataDisk[]; +/** The List Proximity Placement Group operation response. */ +export interface ProximityPlacementGroupListResult { + /** The list of proximity placement groups */ + value: ProximityPlacementGroup[]; + /** The URI to fetch the next page of proximity placement groups. */ + nextLink?: string; } -/** - * Specifies additional XML formatted information that can be included in the Unattend.xml file, - * which is used by Windows Setup. Contents are defined by setting name, component name, and the - * pass in which the content is applied. - */ -export interface AdditionalUnattendContent { - /** - * The pass name. Currently, the only allowable value is OobeSystem. Possible values include: - * 'OobeSystem' - */ - passName?: PassNames; - /** - * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. - * Possible values include: 'Microsoft-Windows-Shell-Setup' - */ - componentName?: ComponentNames; +export interface SubResourceReadOnly { /** - * Specifies the name of the setting to which the content applies. Possible values are: - * FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands' - */ - settingName?: SettingNames; - /** - * Specifies the XML formatted content that is added to the unattend.xml file for the specified - * path and component. The XML must be less than 4KB and must include the root element for the - * setting or feature that is being inserted. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - content?: string; + readonly id?: string; } -/** - * Specifies settings related to VM Guest Patching on Windows. - */ -export interface PatchSettings { - /** - * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated - * to virtual machine scale set with OrchestrationMode as Flexible.

Possible values - * are:

**Manual** - You control the application of patches to a virtual machine. - * You do this by applying patches manually inside the VM. In this mode, automatic updates are - * disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

- * **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property - * WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** - * - the virtual machine will automatically updated by the platform. The properties - * provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values - * include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' - */ - patchMode?: WindowsVMGuestPatchMode; - /** - * Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, - * the 'provisionVMAgent' must be set to true and 'patchMode' must be set to - * 'AutomaticByPlatform'. - */ - enableHotpatching?: boolean; - /** - * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

- * Possible values are:

**ImageDefault** - You control the timing of patch - * assessments on a virtual machine.

**AutomaticByPlatform** - The platform will - * trigger periodic patch assessments. The property provisionVMAgent must be true. Possible - * values include: 'ImageDefault', 'AutomaticByPlatform' - */ - assessmentMode?: WindowsPatchAssessmentMode; +export interface DedicatedHostGroupInstanceView { + /** List of instance view of the dedicated hosts under the dedicated host group. */ + hosts?: DedicatedHostInstanceViewWithName[]; } -/** - * Describes Protocol and thumbprint of Windows Remote Management listener - */ -export interface WinRMListener { - /** - * Specifies the protocol of WinRM listener.

Possible values are:
**http**

- * **https**. Possible values include: 'Http', 'Https' - */ - protocol?: ProtocolTypes; +/** The instance view of a dedicated host. */ +export interface DedicatedHostInstanceView { /** - * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a - * secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, - * your certificate needs to be It is the Base64 encoding of the following JSON Object which is - * encoded in UTF-8:

{
"data":"",
- * "dataType":"pfx",
"password":""
} + * Specifies the unique id of the dedicated physical machine on which the dedicated host resides. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - certificateUrl?: string; + readonly assetId?: string; + /** Unutilized capacity of the dedicated host. */ + availableCapacity?: DedicatedHostAvailableCapacity; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; } -/** - * Describes Windows Remote Management configuration of the VM - */ -export interface WinRMConfiguration { - /** - * The list of Windows Remote Management listeners - */ - listeners?: WinRMListener[]; +/** Dedicated host unutilized capacity. */ +export interface DedicatedHostAvailableCapacity { + /** The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host. */ + allocatableVMs?: DedicatedHostAllocatableVM[]; } -/** - * Specifies Windows operating system settings on the virtual machine. - */ -export interface WindowsConfiguration { - /** - * Indicates whether virtual machine agent should be provisioned on the virtual machine.

- * When this property is not specified in the request body, default behavior is to set it to - * true. This will ensure that VM Agent is installed on the VM so that extensions can be added - * to the VM later. - */ - provisionVMAgent?: boolean; - /** - * Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value - * is true.

For virtual machine scale sets, this property can be updated and updates - * will take effect on OS reprovisioning. - */ - enableAutomaticUpdates?: boolean; - /** - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".

- * Possible values can be - * [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) - * value from time zones returned by - * [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). - */ - timeZone?: string; - /** - * Specifies additional base-64 encoded XML formatted information that can be included in the - * Unattend.xml file, which is used by Windows Setup. - */ - additionalUnattendContent?: AdditionalUnattendContent[]; - /** - * [Preview Feature] Specifies settings related to VM Guest Patching on Windows. - */ - patchSettings?: PatchSettings; - /** - * Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - */ - winRM?: WinRMConfiguration; +/** Represents the dedicated host unutilized capacity in terms of a specific VM size. */ +export interface DedicatedHostAllocatableVM { + /** VM size in terms of which the unutilized capacity is represented. */ + vmSize?: string; + /** Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. */ + count?: number; } -/** - * Contains information about SSH certificate public key and the path on the Linux VM where the - * public key is placed. - */ -export interface SshPublicKey { - /** - * Specifies the full path on the created VM where ssh public key is stored. If the file already - * exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - */ - path?: string; - /** - * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be - * at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys - * on Linux and Mac for Linux VMs in - * Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). - */ - keyData?: string; +/** The List Dedicated Host Group with resource group response. */ +export interface DedicatedHostGroupListResult { + /** The list of dedicated host groups */ + value: DedicatedHostGroup[]; + /** The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups. */ + nextLink?: string; } -/** - * SSH configuration for Linux based VMs running on Azure - */ -export interface SshConfiguration { - /** - * The list of SSH public keys used to authenticate with linux based VMs. - */ - publicKeys?: SshPublicKey[]; +/** The list dedicated host operation response. */ +export interface DedicatedHostListResult { + /** The list of dedicated hosts */ + value: DedicatedHost[]; + /** The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts. */ + nextLink?: string; } -/** - * Specifies settings related to VM Guest Patching on Linux. - */ -export interface LinuxPatchSettings { - /** - * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated - * to virtual machine scale set with OrchestrationMode as Flexible.

Possible values - * are:

**ImageDefault** - The virtual machine's default patching configuration is - * used.

**AutomaticByPlatform** - The virtual machine will be automatically updated - * by the platform. The property provisionVMAgent must be true. Possible values include: - * 'ImageDefault', 'AutomaticByPlatform' - */ - patchMode?: LinuxVMGuestPatchMode; - /** - * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

- * Possible values are:

**ImageDefault** - You control the timing of patch - * assessments on a virtual machine.

**AutomaticByPlatform** - The platform will - * trigger periodic patch assessments. The property provisionVMAgent must be true. Possible - * values include: 'ImageDefault', 'AutomaticByPlatform' - */ - assessmentMode?: LinuxPatchAssessmentMode; +/** The list SSH public keys operation response. */ +export interface SshPublicKeysGroupListResult { + /** The list of SSH public keys */ + value: SshPublicKeyResource[]; + /** The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys. */ + nextLink?: string; } -/** - * Specifies the Linux operating system settings on the virtual machine.

For a list of - * supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). - */ -export interface LinuxConfiguration { - /** - * Specifies whether password authentication should be disabled. - */ - disablePasswordAuthentication?: boolean; - /** - * Specifies the ssh key configuration for a Linux OS. - */ - ssh?: SshConfiguration; - /** - * Indicates whether virtual machine agent should be provisioned on the virtual machine.

- * When this property is not specified in the request body, default behavior is to set it to - * true. This will ensure that VM Agent is installed on the VM so that extensions can be added - * to the VM later. - */ - provisionVMAgent?: boolean; - /** - * [Preview Feature] Specifies settings related to VM Guest Patching on Linux. - */ - patchSettings?: LinuxPatchSettings; +/** Response from generation of an SSH key pair. */ +export interface SshPublicKeyGenerateKeyPairResult { + /** Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret. */ + privateKey: string; + /** Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. */ + publicKey: string; + /** The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} */ + id: string; } -/** - * Describes a single certificate reference in a Key Vault, and where the certificate should reside - * on the VM. - */ -export interface VaultCertificate { - /** - * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a - * secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, - * your certificate needs to be It is the Base64 encoding of the following JSON Object which is - * encoded in UTF-8:

{
"data":"",
- * "dataType":"pfx",
"password":""
} - */ - certificateUrl?: string; - /** - * For Windows VMs, specifies the certificate store on the Virtual Machine to which the - * certificate should be added. The specified certificate store is implicitly in the LocalMachine - * account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent - * directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file - * and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. - */ - certificateStore?: string; +/** The instance view of a virtual machine extension. */ +export interface VirtualMachineExtensionInstanceView { + /** The virtual machine extension name. */ + name?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** The resource status information. */ + substatuses?: InstanceViewStatus[]; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; } -/** - * Describes a set of certificates which are all in the same Key Vault. - */ -export interface VaultSecretGroup { - /** - * The relative URL of the Key Vault containing all of the certificates in VaultCertificates. - */ - sourceVault?: SubResource; - /** - * The list of key vault references in SourceVault which contain certificates. - */ - vaultCertificates?: VaultCertificate[]; +/** The List Extension operation response */ +export interface VirtualMachineExtensionsListResult { + /** The list of extensions */ + value?: VirtualMachineExtension[]; } -/** - * Specifies the operating system settings for the virtual machine. Some of the settings cannot be - * changed once VM is provisioned. - */ -export interface OSProfile { - /** - * Specifies the host OS name of the virtual machine.

This name cannot be updated after - * the VM is created.

**Max-length (Windows):** 15 characters

**Max-length - * (Linux):** 64 characters.

For naming conventions and restrictions see [Azure - * infrastructure services implementation - * guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). - */ - computerName?: string; - /** - * Specifies the name of the administrator account.

This property cannot be updated - * after the VM is created.

**Windows-only restriction:** Cannot end in "."

- * **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", - * "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", - * "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - * "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character - *

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 - * characters. - */ - adminUsername?: string; - /** - * Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 - * characters

**Minimum-length (Linux):** 6 characters

**Max-length - * (Windows):** 123 characters

**Max-length (Linux):** 72 characters

- * **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower - * characters
Has upper characters
Has a digit
Has a special character (Regex match - * [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For - * resetting the password, see [How to reset the Remote Desktop service or its login password in - * a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) - *

For resetting root password, see [Manage users, SSH, and check or repair disks on - * Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) - */ - adminPassword?: string; - /** - * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum length of the binary - * array is 65535 bytes.

**Note: Do not pass any secrets or passwords in customData - * property**

This property cannot be updated after the VM is created.

- * customData is passed to the VM to be saved as a file, for more information see [Custom Data on - * Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/) - *

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM - * during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) - */ - customData?: string; - /** - * Specifies Windows operating system settings on the virtual machine. - */ - windowsConfiguration?: WindowsConfiguration; - /** - * Specifies the Linux operating system settings on the virtual machine.

For a list of - * supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). - */ - linuxConfiguration?: LinuxConfiguration; - /** - * Specifies set of certificates that should be installed onto the virtual machine. - */ - secrets?: VaultSecretGroup[]; - /** - * Specifies whether extension operations should be allowed on the virtual machine.

This - * may only be set to False when no extensions are present on the virtual machine. - */ - allowExtensionOperations?: boolean; - /** - * Specifies whether the guest provision signal is required to infer provision success of the - * virtual machine. **Note: This property is for private testing only, and all customers must - * not set the property to false.** - */ - requireGuestProvisionSignal?: boolean; +/** The complex type of the extended location. */ +export interface ExtendedLocation { + /** The name of the extended location. */ + name?: string; + /** The type of the extended location. */ + type?: ExtendedLocationTypes; } -/** - * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot - * to diagnose VM status.

You can easily view the output of your console log.

- * Azure also enables you to see a screenshot of the VM from the hypervisor. - */ -export interface BootDiagnostics { - /** - * Whether boot diagnostics should be enabled on the Virtual Machine. - */ - enabled?: boolean; - /** - * Uri of the storage account to use for placing the console output and screenshot.

If - * storageUri is not specified while enabling boot diagnostics, managed storage will be used. - */ - storageUri?: string; +/** Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. */ +export interface PurchasePlan { + /** The publisher ID. */ + publisher: string; + /** The plan ID. */ + name: string; + /** Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. */ + product: string; } -/** - * Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. - */ -export interface DiagnosticsProfile { - /** - * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot - * to diagnose VM status.

You can easily view the output of your console log.

- * Azure also enables you to see a screenshot of the VM from the hypervisor. - */ - bootDiagnostics?: BootDiagnostics; +/** Contains the os disk image information. */ +export interface OSDiskImage { + /** The operating system of the osDiskImage. */ + operatingSystem: OperatingSystemTypes; } -/** - * Specifies the security settings like secure boot and vTPM used while creating the virtual - * machine.

Minimum api-version: 2020-12-01 - */ -export interface UefiSettings { - /** - * Specifies whether secure boot should be enabled on the virtual machine.

Minimum - * api-version: 2020-12-01 - */ - secureBootEnabled?: boolean; +/** Contains the data disk images information. */ +export interface DataDiskImage { /** - * Specifies whether vTPM should be enabled on the virtual machine.

Minimum api-version: - * 2020-12-01 + * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vTpmEnabled?: boolean; + readonly lun?: number; } -/** - * Specifies the Security profile settings for the virtual machine or virtual machine scale set. - */ -export interface SecurityProfile { - /** - * Specifies the security settings like secure boot and vTPM used while creating the virtual - * machine.

Minimum api-version: 2020-12-01 - */ - uefiSettings?: UefiSettings; - /** - * This property can be used by user in the request to enable or disable the Host Encryption for - * the virtual machine or virtual machine scale set. This will enable the encryption for all the - * disks including Resource/Temp disk at host itself.

Default: The Encryption at host - * will be disabled unless this property is set to true for the resource. - */ - encryptionAtHost?: boolean; - /** - * Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable - * UefiSettings.

Default: UefiSettings will not be enabled unless this property is set - * as TrustedLaunch. Possible values include: 'TrustedLaunch' - */ - securityType?: SecurityTypes; +/** Describes automatic OS upgrade properties on the image. */ +export interface AutomaticOSUpgradeProperties { + /** Specifies whether automatic OS upgrade is supported on the image. */ + automaticOSUpgradeSupported: boolean; } -/** - * Describes the properties of the Virtual Machine for which the restore point was created. The - * properties provided are a subset and the snapshot of the overall Virtual Machine properties - * captured at the time of the restore point creation. - */ -export interface RestorePointSourceMetadata { - /** - * Gets the hardware profile. - */ - hardwareProfile?: HardwareProfile; - /** - * Gets the storage profile. - */ - storageProfile?: RestorePointSourceVMStorageProfile; - /** - * Gets the OS profile. - */ - osProfile?: OSProfile; - /** - * Gets the diagnostics profile. - */ - diagnosticsProfile?: DiagnosticsProfile; - /** - * Gets the license type, which is for bring your own license scenario. - */ - licenseType?: string; - /** - * Gets the virtual machine unique id. - */ - vmId?: string; - /** - * Gets the security profile. - */ - securityProfile?: SecurityProfile; +/** Specifies the disallowed configuration for a virtual machine image. */ +export interface DisallowedConfiguration { + /** VM disk types which are disallowed. */ + vmDiskType?: VmDiskTypes; } -/** - * Restore Point Provisioning details. - */ -export interface RestorePointProvisioningDetails { - /** - * Gets the creation time of the restore point. - */ - creationTime?: Date; - /** - * Gets the total size of the data in all the disks which are part of the restore point. - */ - totalUsedSizeInBytes?: number; - /** - * Gets the status of the Create restore point operation. - */ - statusCode?: number; - /** - * Gets the status message of the Create restore point operation. - */ - statusMessage?: string; +/** Specifies additional capabilities supported by the image */ +export interface VirtualMachineImageFeature { + /** The name of the feature. */ + name?: string; + /** The corresponding value for the feature. */ + value?: string; } -/** - * The resource model definition for an Azure Resource Manager proxy resource. It will not have - * tags and a location - */ -export interface ProxyResource extends BaseResource { - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; +/** An error response from the Compute service. */ +export interface CloudError { + /** Api error. */ + error?: ApiError; } -/** - * Restore Point details. - */ -export interface RestorePoint extends ProxyResource { - /** - * Gets the details of the VM captured at the time of the restore point creation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sourceMetadata?: RestorePointSourceMetadata; - /** - * Gets the provisioning state of the restore point. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints - * for more details. Possible values include: 'CrashConsistent', 'FileSystemConsistent', - * 'ApplicationConsistent' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly consistencyMode?: ConsistencyModeTypes; - /** - * Gets the provisioning details set by the server during Create restore point operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningDetails?: RestorePointProvisioningDetails; - /** - * List of disk resource ids that the customer wishes to exclude from the restore point. If no - * disks are specified, all disks will be included. - */ - excludeDisks?: ApiEntityReference[]; +/** Api error. */ +export interface ApiError { + /** The Api error details */ + details?: ApiErrorBase[]; + /** The Api inner error */ + innererror?: InnerError; + /** The error code. */ + code?: string; + /** The target of the particular error. */ + target?: string; + /** The error message. */ + message?: string; } -/** - * The Resource model definition. - */ -export interface Resource extends BaseResource { - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location - */ - location: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; +/** Api error base. */ +export interface ApiErrorBase { + /** The error code. */ + code?: string; + /** The target of the particular error. */ + target?: string; + /** The error message. */ + message?: string; } -/** - * Create or update Restore Point collection parameters. - */ -export interface RestorePointCollection extends Resource { - source?: RestorePointCollectionSourceProperties; - /** - * The provisioning state of the restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The unique id of the restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly restorePointCollectionId?: string; - /** - * A list containing all restore points created under this restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly restorePoints?: RestorePoint[]; +/** Inner error details. */ +export interface InnerError { + /** The exception type. */ + exceptiontype?: string; + /** The internal error message or exception dump. */ + errordetail?: string; } -/** - * The Update Resource model definition. - */ -export interface UpdateResource { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; +/** The List Usages operation response. */ +export interface ListUsagesResult { + /** The list of compute resource usages. */ + value: Usage[]; + /** The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information. */ + nextLink?: string; } -/** - * Update Restore Point collection parameters. - */ -export interface RestorePointCollectionUpdate extends UpdateResource { - source?: RestorePointCollectionSourceProperties; - /** - * The provisioning state of the restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The unique id of the restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly restorePointCollectionId?: string; - /** - * A list containing all restore points created under this restore point collection. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly restorePoints?: RestorePoint[]; +/** Describes Compute Resource Usage. */ +export interface Usage { + /** An enum describing the unit of usage measurement. */ + unit: "Count"; + /** The current usage of the resource. */ + currentValue: number; + /** The maximum permitted usage of the resource. */ + limit: number; + /** The name of the type of usage. */ + name: UsageName; } -/** - * Describes the properties of a Compute Operation value. - */ -export interface ComputeOperationValue { - /** - * The origin of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly origin?: string; - /** - * The name of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The display name of the compute operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly operation?: string; - /** - * The display name of the resource the operation applies to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resource?: string; - /** - * The description of the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly description?: string; - /** - * The resource provider for the operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provider?: string; +/** The Usage Names. */ +export interface UsageName { + /** The name of the resource. */ + value?: string; + /** The localized name of the resource. */ + localizedValue?: string; } -/** - * Specifies the disallowed configuration for a virtual machine image. - */ -export interface DisallowedConfiguration { - /** - * VM disk types which are disallowed. Possible values include: 'None', 'Unmanaged' - */ - vmDiskType?: VmDiskTypes; +/** The List Virtual Machine operation response. */ +export interface VirtualMachineListResult { + /** The list of virtual machines. */ + value: VirtualMachine[]; + /** The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines. */ + nextLink?: string; } -/** - * The SAS URIs of the console screenshot and serial log blobs. - */ -export interface RetrieveBootDiagnosticsDataResult { - /** - * The console screenshot blob URI - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly consoleScreenshotBlobUri?: string; - /** - * The serial console log blob URI. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serialConsoleLogBlobUri?: string; +/** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. */ +export interface Plan { + /** The plan ID. */ + name?: string; + /** The publisher ID. */ + publisher?: string; + /** Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. */ + product?: string; + /** The promotion code. */ + promotionCode?: string; } -/** - * Instance view status. - */ -export interface InstanceViewStatus { - /** - * The status code. - */ - code?: string; - /** - * The level code. Possible values include: 'Info', 'Warning', 'Error' - */ - level?: StatusLevelTypes; - /** - * The short localizable label for the status. - */ - displayStatus?: string; - /** - * The detailed status message, including for alerts and error messages. - */ - message?: string; - /** - * The time of the status. - */ - time?: Date; +/** Specifies the hardware settings for the virtual machine. */ +export interface HardwareProfile { + /** Specifies the size of the virtual machine.

The enum data type is currently deprecated and will be removed by December 23rd 2023.

Recommended way to get the list of available sizes is using these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

[List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. */ + vmSize?: VirtualMachineSizeTypes; } -/** - * Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the - * hardware the scale set is currently on, you need to deallocate the VMs in the scale set before - * you modify the SKU name. - */ -export interface Sku { - /** - * The sku name. - */ +/** Specifies the storage settings for the virtual machine disks. */ +export interface StorageProfile { + /** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. */ + imageReference?: ImageReference; + /** Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + osDisk?: OSDisk; + /** Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + dataDisks?: DataDisk[]; +} + +/** Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ +export interface OSDisk { + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux** */ + osType?: OperatingSystemTypes; + /** Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 */ + encryptionSettings?: DiskEncryptionSettings; + /** The disk name. */ name?: string; - /** - * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** - */ - tier?: string; - /** - * Specifies the number of virtual machines in the scale set. - */ - capacity?: number; + /** The virtual hard disk. */ + vhd?: VirtualHardDisk; + /** The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. */ + image?: VirtualHardDisk; + /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None** for Standard storage. **ReadOnly** for Premium storage. */ + caching?: CachingTypes; + /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ + writeAcceleratorEnabled?: boolean; + /** Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. */ + diffDiskSettings?: DiffDiskSettings; + /** Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ + createOption: DiskCreateOptionTypes; + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + diskSizeGB?: number; + /** The managed disk parameters. */ + managedDisk?: ManagedDiskParameters; + /** Specifies whether OS Disk should be deleted or detached upon VM deletion.

Possible values:

**Delete** If this value is used, the OS disk is deleted when VM is deleted.

**Detach** If this value is used, the os disk is retained after VM is deleted.

The default value is set to **detach**. For an ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for ephemeral OS Disk. */ + deleteOption?: DiskDeleteOptionTypes; } -/** - * Specifies information about the availability set that the virtual machine should be assigned to. - * Virtual machines specified in the same availability set are allocated to different nodes to - * maximize availability. For more information about availability sets, see [Availability sets - * overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

- * For more information on Azure planned maintenance, see [Maintenance and updates for Virtual - * Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) - *

Currently, a VM can only be added to availability set at creation time. An existing VM - * cannot be added to an availability set. - */ -export interface AvailabilitySet extends Resource { - /** - * Update Domain count. - */ - platformUpdateDomainCount?: number; - /** - * Fault Domain count. - */ - platformFaultDomainCount?: number; - /** - * A list of references to all virtual machines in the availability set. - */ - virtualMachines?: SubResource[]; - /** - * Specifies information about the proximity placement group that the availability set should be - * assigned to.

Minimum api-version: 2018-04-01. - */ - proximityPlacementGroup?: SubResource; - /** - * The resource status information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statuses?: InstanceViewStatus[]; - /** - * Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for - * possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' - * for virtual machines with unmanaged disks. Default value is 'Classic'. - */ - sku?: Sku; +/** Describes a Encryption Settings for a Disk */ +export interface DiskEncryptionSettings { + /** Specifies the location of the disk encryption key, which is a Key Vault Secret. */ + diskEncryptionKey?: KeyVaultSecretReference; + /** Specifies the location of the key encryption key in Key Vault. */ + keyEncryptionKey?: KeyVaultKeyReference; + /** Specifies whether disk encryption should be enabled on the virtual machine. */ + enabled?: boolean; } -/** - * Specifies information about the availability set that the virtual machine should be assigned to. - * Only tags may be updated. - */ -export interface AvailabilitySetUpdate extends UpdateResource { - /** - * Update Domain count. - */ - platformUpdateDomainCount?: number; - /** - * Fault Domain count. - */ - platformFaultDomainCount?: number; - /** - * A list of references to all virtual machines in the availability set. - */ - virtualMachines?: SubResource[]; - /** - * Specifies information about the proximity placement group that the availability set should be - * assigned to.

Minimum api-version: 2018-04-01. - */ - proximityPlacementGroup?: SubResource; - /** - * The resource status information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statuses?: InstanceViewStatus[]; - /** - * Sku of the availability set - */ - sku?: Sku; +/** Describes a reference to Key Vault Secret */ +export interface KeyVaultSecretReference { + /** The URL referencing a secret in a Key Vault. */ + secretUrl: string; + /** The relative URL of the Key Vault containing the secret. */ + sourceVault: SubResource; } -/** - * An interface representing SubResourceWithColocationStatus. - */ -export interface SubResourceWithColocationStatus extends SubResource { - /** - * Describes colocation status of a resource in the Proximity Placement Group. - */ - colocationStatus?: InstanceViewStatus; +/** Describes a reference to Key Vault Key */ +export interface KeyVaultKeyReference { + /** The URL referencing a key encryption key in Key Vault. */ + keyUrl: string; + /** The relative URL of the Key Vault containing the key. */ + sourceVault: SubResource; } -/** - * Specifies information about the proximity placement group. - */ -export interface ProximityPlacementGroup extends Resource { - /** - * Specifies the type of the proximity placement group.

Possible values are:

- * **Standard** : Co-locate resources within an Azure region or Availability Zone.

- * **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' - */ - proximityPlacementGroupType?: ProximityPlacementGroupType; - /** - * A list of references to all virtual machines in the proximity placement group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly virtualMachines?: SubResourceWithColocationStatus[]; - /** - * A list of references to all virtual machine scale sets in the proximity placement group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly virtualMachineScaleSets?: SubResourceWithColocationStatus[]; - /** - * A list of references to all availability sets in the proximity placement group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly availabilitySets?: SubResourceWithColocationStatus[]; - /** - * Describes colocation status of the Proximity Placement Group. - */ - colocationStatus?: InstanceViewStatus; +/** Describes the uri of a disk. */ +export interface VirtualHardDisk { + /** Specifies the virtual hard disk's uri. */ + uri?: string; } -/** - * Specifies information about the proximity placement group. - */ -export interface ProximityPlacementGroupUpdate extends UpdateResource {} +/** Describes the parameters of ephemeral disk settings that can be specified for operating system disk.

NOTE: The ephemeral disk settings can only be specified for managed disk. */ +export interface DiffDiskSettings { + /** Specifies the ephemeral disk settings for operating system disk. */ + option?: DiffDiskOptions; + /** Specifies the ephemeral disk placement for operating system disk.

Possible values are:

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. */ + placement?: DiffDiskPlacement; +} -/** - * The instance view of a dedicated host. - */ -export interface DedicatedHostInstanceView { - /** - * Specifies the unique id of the dedicated physical machine on which the dedicated host resides. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly assetId?: string; +/** Describes a data disk. */ +export interface DataDisk { + /** Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. */ + lun: number; + /** The disk name. */ + name?: string; + /** The virtual hard disk. */ + vhd?: VirtualHardDisk; + /** The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. */ + image?: VirtualHardDisk; + /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + caching?: CachingTypes; + /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ + writeAcceleratorEnabled?: boolean; + /** Specifies how the virtual machine should be created.

Possible values are:

**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.

**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ + createOption: DiskCreateOptionTypes; + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + diskSizeGB?: number; + /** The managed disk parameters. */ + managedDisk?: ManagedDiskParameters; + /** Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset */ + toBeDetached?: boolean; /** - * Unutilized capacity of the dedicated host. + * Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - availableCapacity?: DedicatedHostAvailableCapacity; + readonly diskIopsReadWrite?: number; /** - * The resource status information. + * Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - statuses?: InstanceViewStatus[]; + readonly diskMBpsReadWrite?: number; + /** Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**.

detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior.

This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. */ + detachOption?: DiskDetachOptionTypes; + /** Specifies whether data disk should be deleted or detached upon VM deletion.

Possible values:

**Delete** If this value is used, the data disk is deleted when VM is deleted.

**Detach** If this value is used, the data disk is retained after VM is deleted.

The default value is set to **detach** */ + deleteOption?: DiskDeleteOptionTypes; } -/** - * The instance view of a dedicated host that includes the name of the dedicated host. It is used - * for the response to the instance view of a dedicated host group. - */ -export interface DedicatedHostInstanceViewWithName extends DedicatedHostInstanceView { - /** - * The name of the dedicated host. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; +/** Enables or disables a capability on the virtual machine or virtual machine scale set. */ +export interface AdditionalCapabilities { + /** The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. */ + ultraSSDEnabled?: boolean; } -/** - * An interface representing DedicatedHostGroupInstanceView. - */ -export interface DedicatedHostGroupInstanceView { - /** - * List of instance view of the dedicated hosts under the dedicated host group. - */ - hosts?: DedicatedHostInstanceViewWithName[]; +/** Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. */ +export interface OSProfile { + /** Specifies the host OS name of the virtual machine.

This name cannot be updated after the VM is created.

**Max-length (Windows):** 15 characters

**Max-length (Linux):** 64 characters.

For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). */ + computerName?: string; + /** Specifies the name of the administrator account.

This property cannot be updated after the VM is created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 characters. */ + adminUsername?: string; + /** Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ + adminPassword?: string; + /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

**Note: Do not pass any secrets or passwords in customData property**

This property cannot be updated after the VM is created.

customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)

For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) */ + customData?: string; + /** Specifies Windows operating system settings on the virtual machine. */ + windowsConfiguration?: WindowsConfiguration; + /** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ + linuxConfiguration?: LinuxConfiguration; + /** Specifies set of certificates that should be installed onto the virtual machine. */ + secrets?: VaultSecretGroup[]; + /** Specifies whether extension operations should be allowed on the virtual machine.

This may only be set to False when no extensions are present on the virtual machine. */ + allowExtensionOperations?: boolean; + /** Specifies whether the guest provision signal is required to infer provision success of the virtual machine. **Note: This property is for private testing only, and all customers must not set the property to false.** */ + requireGuestProvisionSignal?: boolean; } -/** - * An interface representing SubResourceReadOnly. - */ -export interface SubResourceReadOnly extends BaseResource { +/** Specifies Windows operating system settings on the virtual machine. */ +export interface WindowsConfiguration { + /** Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. */ + provisionVMAgent?: boolean; + /** Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.

For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. */ + enableAutomaticUpdates?: boolean; + /** Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".

Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). */ + timeZone?: string; + /** Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. */ + additionalUnattendContent?: AdditionalUnattendContent[]; + /** [Preview Feature] Specifies settings related to VM Guest Patching on Windows. */ + patchSettings?: PatchSettings; + /** Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. */ + winRM?: WinRMConfiguration; +} + +/** Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. */ +export interface AdditionalUnattendContent { + /** The pass name. Currently, the only allowable value is OobeSystem. */ + passName?: "OobeSystem"; + /** The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. */ + componentName?: "Microsoft-Windows-Shell-Setup"; + /** Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. */ + settingName?: SettingNames; + /** Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. */ + content?: string; +} + +/** Specifies settings related to VM Guest Patching on Windows. */ +export interface PatchSettings { + /** Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true */ + patchMode?: WindowsVMGuestPatchMode; + /** Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'. */ + enableHotpatching?: boolean; + /** Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. */ + assessmentMode?: WindowsPatchAssessmentMode; +} + +/** Describes Windows Remote Management configuration of the VM */ +export interface WinRMConfiguration { + /** The list of Windows Remote Management listeners */ + listeners?: WinRMListener[]; +} + +/** Describes Protocol and thumbprint of Windows Remote Management listener */ +export interface WinRMListener { + /** Specifies the protocol of WinRM listener.

Possible values are:
**http**

**https** */ + protocol?: ProtocolTypes; + /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
} */ + certificateUrl?: string; +} + +/** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ +export interface LinuxConfiguration { + /** Specifies whether password authentication should be disabled. */ + disablePasswordAuthentication?: boolean; + /** Specifies the ssh key configuration for a Linux OS. */ + ssh?: SshConfiguration; + /** Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. */ + provisionVMAgent?: boolean; + /** [Preview Feature] Specifies settings related to VM Guest Patching on Linux. */ + patchSettings?: LinuxPatchSettings; +} + +/** SSH configuration for Linux based VMs running on Azure */ +export interface SshConfiguration { + /** The list of SSH public keys used to authenticate with linux based VMs. */ + publicKeys?: SshPublicKey[]; +} + +/** Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. */ +export interface SshPublicKey { + /** Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys */ + path?: string; + /** SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ + keyData?: string; +} + +/** Specifies settings related to VM Guest Patching on Linux. */ +export interface LinuxPatchSettings { + /** Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**ImageDefault** - The virtual machine's default patching configuration is used.

**AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true */ + patchMode?: LinuxVMGuestPatchMode; + /** Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. */ + assessmentMode?: LinuxPatchAssessmentMode; +} + +/** Describes a set of certificates which are all in the same Key Vault. */ +export interface VaultSecretGroup { + /** The relative URL of the Key Vault containing all of the certificates in VaultCertificates. */ + sourceVault?: SubResource; + /** The list of key vault references in SourceVault which contain certificates. */ + vaultCertificates?: VaultCertificate[]; +} + +/** Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. */ +export interface VaultCertificate { + /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
} */ + certificateUrl?: string; + /** For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. */ + certificateStore?: string; +} + +/** Specifies the network interfaces or the networking configuration of the virtual machine. */ +export interface NetworkProfile { + /** Specifies the list of resource Ids for the network interfaces associated with the virtual machine. */ + networkInterfaces?: NetworkInterfaceReference[]; + /** specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations */ + networkApiVersion?: NetworkApiVersion; + /** Specifies the networking configurations that will be used to create the virtual machine networking resources. */ + networkInterfaceConfigurations?: VirtualMachineNetworkInterfaceConfiguration[]; +} + +/** Describes a virtual machine network interface configurations. */ +export interface VirtualMachineNetworkInterfaceConfiguration { + /** The network interface configuration name. */ + name: string; + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** Specify what happens to the network interface when the VM is deleted */ + deleteOption?: DeleteOptions; + /** Specifies whether the network interface is accelerated networking-enabled. */ + enableAcceleratedNetworking?: boolean; + /** Specifies whether the network interface is FPGA networking-enabled. */ + enableFpga?: boolean; + /** Whether IP forwarding enabled on this NIC. */ + enableIPForwarding?: boolean; + /** The network security group. */ + networkSecurityGroup?: SubResource; + /** The dns settings to be applied on the network interfaces. */ + dnsSettings?: VirtualMachineNetworkInterfaceDnsSettingsConfiguration; + /** Specifies the IP configurations of the network interface. */ + ipConfigurations?: VirtualMachineNetworkInterfaceIPConfiguration[]; + dscpConfiguration?: SubResource; +} + +/** Describes a virtual machines network configuration's DNS settings. */ +export interface VirtualMachineNetworkInterfaceDnsSettingsConfiguration { + /** List of DNS servers IP addresses */ + dnsServers?: string[]; +} + +/** Describes a virtual machine network profile's IP configuration. */ +export interface VirtualMachineNetworkInterfaceIPConfiguration { + /** The IP configuration name. */ + name: string; + /** Specifies the identifier of the subnet. */ + subnet?: SubResource; + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** The publicIPAddressConfiguration. */ + publicIPAddressConfiguration?: VirtualMachinePublicIPAddressConfiguration; + /** Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ + privateIPAddressVersion?: IPVersions; + /** Specifies an array of references to application security group. */ + applicationSecurityGroups?: SubResource[]; + /** Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway. */ + applicationGatewayBackendAddressPools?: SubResource[]; + /** Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. */ + loadBalancerBackendAddressPools?: SubResource[]; +} + +/** Describes a virtual machines IP Configuration's PublicIPAddress configuration */ +export interface VirtualMachinePublicIPAddressConfiguration { + /** The publicIP address configuration name. */ + name: string; + /** Describes the public IP Sku */ + sku?: PublicIPAddressSku; + /** The idle timeout of the public IP address. */ + idleTimeoutInMinutes?: number; + /** Specify what happens to the public IP address when the VM is deleted */ + deleteOption?: DeleteOptions; + /** The dns settings to be applied on the publicIP addresses . */ + dnsSettings?: VirtualMachinePublicIPAddressDnsSettingsConfiguration; + /** The list of IP tags associated with the public IP address. */ + ipTags?: VirtualMachineIpTag[]; + /** The PublicIPPrefix from which to allocate publicIP addresses. */ + publicIPPrefix?: SubResource; + /** Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ + publicIPAddressVersion?: IPVersions; + /** Specify the public IP allocation type */ + publicIPAllocationMethod?: PublicIPAllocationMethod; +} + +/** Describes a virtual machines network configuration's DNS settings. */ +export interface VirtualMachinePublicIPAddressDnsSettingsConfiguration { + /** The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. */ + domainNameLabel: string; +} + +/** Contains the IP tag associated with the public IP address. */ +export interface VirtualMachineIpTag { + /** IP tag type. Example: FirstPartyUsage. */ + ipTagType?: string; + /** IP tag associated with the public IP. Example: SQL, Storage etc. */ + tag?: string; +} + +/** Describes the public IP Sku */ +export interface PublicIPAddressSku { + /** Specify public IP sku name */ + name?: PublicIPAddressSkuName; + /** Specify public IP sku tier */ + tier?: PublicIPAddressSkuTier; +} + +/** Specifies the Security profile settings for the virtual machine or virtual machine scale set. */ +export interface SecurityProfile { + /** Specifies the security settings like secure boot and vTPM used while creating the virtual machine.

Minimum api-version: 2020-12-01 */ + uefiSettings?: UefiSettings; + /** This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself.

Default: The Encryption at host will be disabled unless this property is set to true for the resource. */ + encryptionAtHost?: boolean; + /** Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings.

Default: UefiSettings will not be enabled unless this property is set as TrustedLaunch. */ + securityType?: SecurityTypes; +} + +/** Specifies the security settings like secure boot and vTPM used while creating the virtual machine.

Minimum api-version: 2020-12-01 */ +export interface UefiSettings { + /** Specifies whether secure boot should be enabled on the virtual machine.

Minimum api-version: 2020-12-01 */ + secureBootEnabled?: boolean; + /** Specifies whether vTPM should be enabled on the virtual machine.

Minimum api-version: 2020-12-01 */ + vTpmEnabled?: boolean; +} + +/** Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. */ +export interface DiagnosticsProfile { + /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ + bootDiagnostics?: BootDiagnostics; +} + +/** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ +export interface BootDiagnostics { + /** Whether boot diagnostics should be enabled on the Virtual Machine. */ + enabled?: boolean; + /** Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. */ + storageUri?: string; +} + +/** Specifies the billing related details of a Azure Spot VM or VMSS.

Minimum api-version: 2019-03-01. */ +export interface BillingProfile { + /** Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. */ + maxPrice?: number; +} + +/** The instance view of a virtual machine. */ +export interface VirtualMachineInstanceView { + /** Specifies the update domain of the virtual machine. */ + platformUpdateDomain?: number; + /** Specifies the fault domain of the virtual machine. */ + platformFaultDomain?: number; + /** The computer name assigned to the virtual machine. */ + computerName?: string; + /** The Operating System running on the virtual machine. */ + osName?: string; + /** The version of Operating System running on the virtual machine. */ + osVersion?: string; + /** Specifies the HyperVGeneration Type associated with a resource */ + hyperVGeneration?: HyperVGenerationType; + /** The Remote desktop certificate thumbprint. */ + rdpThumbPrint?: string; + /** The VM Agent running on the virtual machine. */ + vmAgent?: VirtualMachineAgentInstanceView; + /** The Maintenance Operation status on the virtual machine. */ + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + /** The virtual machine disk information. */ + disks?: DiskInstanceView[]; + /** The extensions information. */ + extensions?: VirtualMachineExtensionInstanceView[]; /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The health status for the VM. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly vmHealth?: VirtualMachineHealthStatus; + /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ + bootDiagnostics?: BootDiagnosticsInstanceView; + /** + * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly assignedHost?: string; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; + /** [Preview Feature] The status of virtual machine patch operations. */ + patchStatus?: VirtualMachinePatchStatus; } -/** - * Specifies information about the dedicated host group that the dedicated hosts should be assigned - * to.

Currently, a dedicated host can only be added to a dedicated host group at creation - * time. An existing dedicated host cannot be added to another dedicated host group. - */ -export interface DedicatedHostGroup extends Resource { +/** The instance view of the VM Agent running on the virtual machine. */ +export interface VirtualMachineAgentInstanceView { + /** The VM Agent full version. */ + vmAgentVersion?: string; + /** The virtual machine extension handler instance view. */ + extensionHandlers?: VirtualMachineExtensionHandlerInstanceView[]; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; +} + +/** The instance view of a virtual machine extension handler. */ +export interface VirtualMachineExtensionHandlerInstanceView { + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** The extension handler status. */ + status?: InstanceViewStatus; +} + +/** Maintenance Operation Status. */ +export interface MaintenanceRedeployStatus { + /** True, if customer is allowed to perform Maintenance. */ + isCustomerInitiatedMaintenanceAllowed?: boolean; + /** Start Time for the Pre Maintenance Window. */ + preMaintenanceWindowStartTime?: Date; + /** End Time for the Pre Maintenance Window. */ + preMaintenanceWindowEndTime?: Date; + /** Start Time for the Maintenance Window. */ + maintenanceWindowStartTime?: Date; + /** End Time for the Maintenance Window. */ + maintenanceWindowEndTime?: Date; + /** The Last Maintenance Operation Result Code. */ + lastOperationResultCode?: MaintenanceOperationResultCodeTypes; + /** Message returned for the last Maintenance Operation. */ + lastOperationMessage?: string; +} + +/** The instance view of the disk. */ +export interface DiskInstanceView { + /** The disk name. */ + name?: string; + /** Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 */ + encryptionSettings?: DiskEncryptionSettings[]; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; +} + +/** The health status of the VM. */ +export interface VirtualMachineHealthStatus { /** - * Number of fault domains that the host group can span. + * The health status information for the VM. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformFaultDomainCount: number; + readonly status?: InstanceViewStatus; +} + +/** The instance view of a virtual machine boot diagnostics. */ +export interface BootDiagnosticsInstanceView { /** - * A list of references to all dedicated hosts in the dedicated host group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hosts?: SubResourceReadOnly[]; + readonly consoleScreenshotBlobUri?: string; /** - * The dedicated host group instance view, which has the list of instance view of the dedicated - * hosts under the dedicated host group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceView?: DedicatedHostGroupInstanceView; + readonly serialConsoleLogBlobUri?: string; /** - * Specifies whether virtual machines or virtual machine scale sets can be placed automatically - * on the dedicated host group. Automatic placement means resources are allocated on dedicated - * hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to - * 'false' when not provided.

Minimum api-version: 2020-06-01. + * The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - supportAutomaticPlacement?: boolean; + readonly status?: InstanceViewStatus; +} + +/** The status of virtual machine patch operations. */ +export interface VirtualMachinePatchStatus { + /** The available patch summary of the latest assessment operation for the virtual machine. */ + availablePatchSummary?: AvailablePatchSummary; + /** The installation summary of the latest installation operation for the virtual machine. */ + lastPatchInstallationSummary?: LastPatchInstallationSummary; /** - * Availability Zone to use for this host group. Only single zone is supported. The zone can be - * assigned only during creation. If not provided, the group supports all zones in the region. If - * provided, enforces each host in the group to be in the same zone. + * The enablement status of the specified patchMode + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zones?: string[]; + readonly configurationStatuses?: InstanceViewStatus[]; } -/** - * Specifies information about the dedicated host group that the dedicated host should be assigned - * to. Only tags may be updated. - */ -export interface DedicatedHostGroupUpdate extends UpdateResource { +/** Describes the properties of an virtual machine instance view for available patch summary. */ +export interface AvailablePatchSummary { /** - * Number of fault domains that the host group can span. + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformFaultDomainCount: number; + readonly status?: PatchOperationStatus; /** - * A list of references to all dedicated hosts in the dedicated host group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hosts?: SubResourceReadOnly[]; + readonly assessmentActivityId?: string; /** - * The dedicated host group instance view, which has the list of instance view of the dedicated - * hosts under the dedicated host group. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceView?: DedicatedHostGroupInstanceView; + readonly rebootPending?: boolean; /** - * Specifies whether virtual machines or virtual machine scale sets can be placed automatically - * on the dedicated host group. Automatic placement means resources are allocated on dedicated - * hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to - * 'false' when not provided.

Minimum api-version: 2020-06-01. + * The number of critical or security patches that have been detected as available and not yet installed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - supportAutomaticPlacement?: boolean; + readonly criticalAndSecurityPatchCount?: number; /** - * Availability Zone to use for this host group. Only single zone is supported. The zone can be - * assigned only during creation. If not provided, the group supports all zones in the region. If - * provided, enforces each host in the group to be in the same zone. + * The number of all available patches excluding critical and security. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zones?: string[]; -} - -/** - * Represents the dedicated host unutilized capacity in terms of a specific VM size. - */ -export interface DedicatedHostAllocatableVM { + readonly otherPatchCount?: number; /** - * VM size in terms of which the unutilized capacity is represented. + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vmSize?: string; + readonly startTime?: Date; /** - * Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - count?: number; -} - -/** - * Dedicated host unutilized capacity. - */ -export interface DedicatedHostAvailableCapacity { + readonly lastModifiedTime?: Date; /** - * The unutilized capacity of the dedicated host represented in terms of each VM size that is - * allowed to be deployed to the dedicated host. + * The errors that were encountered during execution of the operation. The details array contains the list of them. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - allocatableVMs?: DedicatedHostAllocatableVM[]; + readonly error?: ApiError; } -/** - * Specifies information about the Dedicated host. - */ -export interface DedicatedHost extends Resource { +/** Describes the properties of the last installed patch summary. */ +export interface LastPatchInstallationSummary { /** - * Fault domain of the dedicated host within a dedicated host group. + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformFaultDomain?: number; + readonly status?: PatchOperationStatus; /** - * Specifies whether the dedicated host should be replaced automatically in case of a failure. - * The value is defaulted to 'true' when not provided. + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoReplaceOnFailure?: boolean; + readonly installationActivityId?: string; /** - * A unique id generated and assigned to the dedicated host by the platform.

Does not - * change throughout the lifetime of the host. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes whether the operation ran out of time before it completed all its intended actions + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hostId?: string; - /** - * A list of references to all virtual machines in the Dedicated Host. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly virtualMachines?: SubResourceReadOnly[]; - /** - * Specifies the software license type that will be applied to the VMs deployed on the dedicated - * host.

Possible values are:

**None**

**Windows_Server_Hybrid** - *

**Windows_Server_Perpetual**

Default: **None**. Possible values include: - * 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' - */ - licenseType?: DedicatedHostLicenseTypes; - /** - * The date when the host was first provisioned. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningTime?: Date; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; + readonly maintenanceWindowExceeded?: boolean; /** - * The dedicated host instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceView?: DedicatedHostInstanceView; + readonly notSelectedPatchCount?: number; /** - * SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be - * set. List Microsoft.Compute SKUs for a list of possible values. + * The number of all available patches but excluded explicitly by a customer-specified exclusion list match. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sku: Sku; -} - -/** - * Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType - * may be updated. - */ -export interface DedicatedHostUpdate extends UpdateResource { + readonly excludedPatchCount?: number; /** - * Fault domain of the dedicated host within a dedicated host group. + * The number of all available patches expected to be installed over the course of the patch installation operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformFaultDomain?: number; + readonly pendingPatchCount?: number; /** - * Specifies whether the dedicated host should be replaced automatically in case of a failure. - * The value is defaulted to 'true' when not provided. + * The count of patches that successfully installed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoReplaceOnFailure?: boolean; + readonly installedPatchCount?: number; /** - * A unique id generated and assigned to the dedicated host by the platform.

Does not - * change throughout the lifetime of the host. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The count of patches that failed installation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hostId?: string; + readonly failedPatchCount?: number; /** - * A list of references to all virtual machines in the Dedicated Host. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly virtualMachines?: SubResourceReadOnly[]; + readonly startTime?: Date; /** - * Specifies the software license type that will be applied to the VMs deployed on the dedicated - * host.

Possible values are:

**None**

**Windows_Server_Hybrid** - *

**Windows_Server_Perpetual**

Default: **None**. Possible values include: - * 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - licenseType?: DedicatedHostLicenseTypes; + readonly lastModifiedTime?: Date; /** - * The date when the host was first provisioned. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningTime?: Date; + readonly error?: ApiError; +} + +export interface ScheduledEventsProfile { + /** Specifies Terminate Scheduled Event related configurations. */ + terminateNotificationProfile?: TerminateNotificationProfile; +} + +export interface TerminateNotificationProfile { + /** Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M) */ + notBeforeTimeout?: string; + /** Specifies whether the Terminate Scheduled event is enabled or disabled. */ + enable?: boolean; +} + +/** Identity for the virtual machine. */ +export interface VirtualMachineIdentity { /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The principal id of virtual machine identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly principalId?: string; /** - * The dedicated host instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceView?: DedicatedHostInstanceView; + readonly tenantId?: string; + /** The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. */ + type?: ResourceIdentityType; + /** The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentitiesValue; + }; } -/** - * Response from generation of an SSH key pair. - */ -export interface SshPublicKeyGenerateKeyPairResult { - /** - * Private key portion of the key pair used to authenticate to a virtual machine through ssh. The - * private key is returned in RFC3447 format and should be treated as a secret. - */ - privateKey: string; +export interface UserAssignedIdentitiesValue { /** - * Public key portion of the key pair used to authenticate to a virtual machine through ssh. The - * public key is in ssh-rsa format. + * The principal id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicKey: string; + readonly principalId?: string; /** - * The ARM resource id in the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} + * The client id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - id: string; + readonly clientId?: string; } -/** - * Specifies information about the SSH public key. - */ -export interface SshPublicKeyResource extends Resource { - /** - * SSH public key used to authenticate to a virtual machine through ssh. If this property is not - * initially provided when the resource is created, the publicKey property will be populated when - * generateKeyPair is called. If the public key is provided upon resource creation, the provided - * public key needs to be at least 2048-bit and in ssh-rsa format. - */ - publicKey?: string; +/** The List Virtual Machine operation response. */ +export interface VirtualMachineScaleSetListResult { + /** The list of virtual machine scale sets. */ + value: VirtualMachineScaleSet[]; + /** The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS. */ + nextLink?: string; } -/** - * Specifies information about the SSH public key. - */ -export interface SshPublicKeyUpdateResource extends UpdateResource { - /** - * SSH public key used to authenticate to a virtual machine through ssh. If this property is not - * initially provided when the resource is created, the publicKey property will be populated when - * generateKeyPair is called. If the public key is provided upon resource creation, the provided - * public key needs to be at least 2048-bit and in ssh-rsa format. - */ - publicKey?: string; +/** Describes an upgrade policy - automatic, manual, or rolling. */ +export interface UpgradePolicy { + /** Specifies the mode of an upgrade to virtual machines in the scale set.

Possible values are:

**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

**Automatic** - All virtual machines in the scale set are automatically updated at the same time. */ + mode?: UpgradeMode; + /** The configuration parameters used while performing a rolling upgrade. */ + rollingUpgradePolicy?: RollingUpgradePolicy; + /** Configuration parameters used for performing automatic OS Upgrade. */ + automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy; } -/** - * Describes the properties of a VM size. - */ -export interface VirtualMachineSize { - /** - * The name of the virtual machine size. - */ - name?: string; - /** - * The number of cores supported by the virtual machine size. For Constrained vCPU capable VM - * sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU - * count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or - * https://docs.microsoft.com/rest/api/compute/resourceskus/list - */ - numberOfCores?: number; - /** - * The OS disk size, in MB, allowed by the virtual machine size. - */ - osDiskSizeInMB?: number; - /** - * The resource disk size, in MB, allowed by the virtual machine size. - */ - resourceDiskSizeInMB?: number; - /** - * The amount of memory, in MB, supported by the virtual machine size. - */ - memoryInMB?: number; - /** - * The maximum number of data disks that can be attached to the virtual machine size. - */ - maxDataDiskCount?: number; +/** The configuration parameters used while performing a rolling upgrade. */ +export interface RollingUpgradePolicy { + /** The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. */ + maxBatchInstancePercent?: number; + /** The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. */ + maxUnhealthyInstancePercent?: number; + /** The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. */ + maxUnhealthyUpgradedInstancePercent?: number; + /** The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). */ + pauseTimeBetweenBatches?: string; + /** Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. */ + enableCrossZoneUpgrade?: boolean; + /** Upgrade all unhealthy instances in a scale set before any healthy instances. */ + prioritizeUnhealthyInstances?: boolean; } -/** - * Describes a Virtual Machine Extension Image. - */ -export interface VirtualMachineExtensionImage extends Resource { - /** - * The operating system this extension supports. - */ - operatingSystem: string; - /** - * The type of role (IaaS or PaaS) this extension supports. - */ - computeRole: string; - /** - * The schema defined by publisher, where extension consumers should provide settings in a - * matching schema. - */ - handlerSchema: string; - /** - * Whether the extension can be used on xRP VMScaleSets. By default existing extensions are - * usable on scalesets, but there might be cases where a publisher wants to explicitly indicate - * the extension is only enabled for CRP VMs but not VMSS. - */ - vmScaleSetEnabled?: boolean; - /** - * Whether the handler can support multiple extensions. - */ - supportsMultipleExtensions?: boolean; +/** The configuration parameters used for performing automatic OS upgrade. */ +export interface AutomaticOSUpgradePolicy { + /** Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.

If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. */ + enableAutomaticOSUpgrade?: boolean; + /** Whether OS image rollback feature should be disabled. Default value is false. */ + disableAutomaticRollback?: boolean; } -/** - * The complex type of the extended location. - */ -export interface ExtendedLocation { - /** - * The name of the extended location. - */ - name?: string; - /** - * The type of the extended location. Possible values include: 'EdgeZone' - */ - type?: ExtendedLocationTypes; +/** Specifies the configuration parameters for automatic repairs on the virtual machine scale set. */ +export interface AutomaticRepairsPolicy { + /** Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. */ + enabled?: boolean; + /** The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M). */ + gracePeriod?: string; } -/** - * Virtual machine image resource information. - */ -export interface VirtualMachineImageResource extends SubResource { - /** - * The name of the resource. - */ - name: string; - /** - * The supported Azure location of the resource. - */ - location: string; - /** - * Specifies the tags that are assigned to the virtual machine. For more information about using - * tags, see [Using tags to organize your Azure - * resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - */ - tags?: { [propertyName: string]: string }; - /** - * The extended location of the Virtual Machine. - */ - extendedLocation?: ExtendedLocation; +/** Describes a virtual machine scale set virtual machine profile. */ +export interface VirtualMachineScaleSetVMProfile { + /** Specifies the operating system settings for the virtual machines in the scale set. */ + osProfile?: VirtualMachineScaleSetOSProfile; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: VirtualMachineScaleSetStorageProfile; + /** Specifies properties of the network interfaces of the virtual machines in the scale set. */ + networkProfile?: VirtualMachineScaleSetNetworkProfile; + /** Specifies the Security related profile settings for the virtual machines in the scale set. */ + securityProfile?: SecurityProfile; + /** Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. */ + diagnosticsProfile?: DiagnosticsProfile; + /** Specifies a collection of settings for extensions installed on virtual machines in the scale set. */ + extensionProfile?: VirtualMachineScaleSetExtensionProfile; + /** Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 */ + licenseType?: string; + /** Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview */ + priority?: VirtualMachinePriorityTypes; + /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + /** Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. */ + billingProfile?: BillingProfile; + /** Specifies Scheduled Event related configurations. */ + scheduledEventsProfile?: ScheduledEventsProfile; + /** UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here.

Minimum api-version: 2021-03-01 */ + userData?: string; } -/** - * The instance view of a virtual machine extension. - */ -export interface VirtualMachineExtensionInstanceView { - /** - * The virtual machine extension name. - */ +/** Describes a virtual machine scale set OS profile. */ +export interface VirtualMachineScaleSetOSProfile { + /** Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. */ + computerNamePrefix?: string; + /** Specifies the name of the administrator account.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 characters */ + adminUsername?: string; + /** Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ + adminPassword?: string; + /** Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) */ + customData?: string; + /** Specifies Windows operating system settings on the virtual machine. */ + windowsConfiguration?: WindowsConfiguration; + /** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ + linuxConfiguration?: LinuxConfiguration; + /** Specifies set of certificates that should be installed onto the virtual machines in the scale set. */ + secrets?: VaultSecretGroup[]; +} + +/** Describes a virtual machine scale set storage profile. */ +export interface VirtualMachineScaleSetStorageProfile { + /** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. */ + imageReference?: ImageReference; + /** Specifies information about the operating system disk used by the virtual machines in the scale set.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + osDisk?: VirtualMachineScaleSetOSDisk; + /** Specifies the parameters that are used to add data disks to the virtual machines in the scale set.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + dataDisks?: VirtualMachineScaleSetDataDisk[]; +} + +/** Describes a virtual machine scale set operating system disk. */ +export interface VirtualMachineScaleSetOSDisk { + /** The disk name. */ name?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; - /** - * The resource status information. - */ - substatuses?: InstanceViewStatus[]; - /** - * The resource status information. - */ - statuses?: InstanceViewStatus[]; + /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + caching?: CachingTypes; + /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ + writeAcceleratorEnabled?: boolean; + /** Specifies how the virtual machines in the scale set should be created.

The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ + createOption: DiskCreateOptionTypes; + /** Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. */ + diffDiskSettings?: DiffDiskSettings; + /** Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + diskSizeGB?: number; + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

**Windows**

**Linux** */ + osType?: OperatingSystemTypes; + /** Specifies information about the unmanaged user image to base the scale set on. */ + image?: VirtualHardDisk; + /** Specifies the container urls that are used to store operating system disks for the scale set. */ + vhdContainers?: string[]; + /** The managed disk parameters. */ + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; } -/** - * Describes a Virtual Machine Extension. - */ -export interface VirtualMachineExtension extends Resource { - /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - virtualMachineExtensionType?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; - /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - */ - autoUpgradeMinorVersion?: boolean; - /** - * Indicates whether the extension should be automatically upgraded by the platform if there is a - * newer version of the extension available. - */ - enableAutomaticUpgrade?: boolean; - /** - * Json formatted public settings for the extension. - */ - settings?: any; - /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. - */ - protectedSettings?: any; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The virtual machine extension instance view. - */ - instanceView?: VirtualMachineExtensionInstanceView; +/** Describes the parameters of a ScaleSet managed disk. */ +export interface VirtualMachineScaleSetManagedDiskParameters { + /** Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. */ + storageAccountType?: StorageAccountTypes; + /** Specifies the customer managed disk encryption set resource id for the managed disk. */ + diskEncryptionSet?: DiskEncryptionSetParameters; } -/** - * Describes a VMSS VM Extension. - */ -export interface VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { - /** - * The name of the extension. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type1?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; - /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - */ - autoUpgradeMinorVersion?: boolean; - /** - * Indicates whether the extension should be automatically upgraded by the platform if there is a - * newer version of the extension available. - */ - enableAutomaticUpgrade?: boolean; - /** - * Json formatted public settings for the extension. - */ - settings?: any; - /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. - */ - protectedSettings?: any; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The virtual machine extension instance view. - */ - instanceView?: VirtualMachineExtensionInstanceView; +/** Describes a virtual machine scale set data disk. */ +export interface VirtualMachineScaleSetDataDisk { + /** The disk name. */ + name?: string; + /** Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. */ + lun: number; + /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + caching?: CachingTypes; + /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ + writeAcceleratorEnabled?: boolean; + /** The create option. */ + createOption: DiskCreateOptionTypes; + /** Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + diskSizeGB?: number; + /** The managed disk parameters. */ + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + /** Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. */ + diskIopsReadWrite?: number; + /** Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. */ + diskMBpsReadWrite?: number; } -/** - * Describes a Virtual Machine Extension. - */ -export interface VirtualMachineExtensionUpdate extends UpdateResource { - /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type?: string; +/** Describes a virtual machine scale set network profile. */ +export interface VirtualMachineScaleSetNetworkProfile { + /** A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. */ + healthProbe?: ApiEntityReference; + /** The list of network configurations. */ + networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; + /** specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible' */ + networkApiVersion?: NetworkApiVersion; +} + +/** The API entity reference. */ +export interface ApiEntityReference { + /** The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... */ + id?: string; +} + +/** Describes a virtual machines scale sets network configuration's DNS settings. */ +export interface VirtualMachineScaleSetNetworkConfigurationDnsSettings { + /** List of DNS servers IP addresses */ + dnsServers?: string[]; +} + +/** Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ +export interface VirtualMachineScaleSetPublicIPAddressConfiguration { + /** The publicIP address configuration name. */ + name: string; + /** Describes the public IP Sku */ + sku?: PublicIPAddressSku; + /** The idle timeout of the public IP address. */ + idleTimeoutInMinutes?: number; + /** The dns settings to be applied on the publicIP addresses . */ + dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + /** The list of IP tags associated with the public IP address. */ + ipTags?: VirtualMachineScaleSetIpTag[]; + /** The PublicIPPrefix from which to allocate publicIP addresses. */ + publicIPPrefix?: SubResource; + /** Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ + publicIPAddressVersion?: IPVersion; + /** Specify what happens to the public IP when the VM is deleted */ + deleteOption?: DeleteOptions; +} + +/** Describes a virtual machines scale sets network configuration's DNS settings. */ +export interface VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { + /** The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created */ + domainNameLabel: string; +} + +/** Contains the IP tag associated with the public IP address. */ +export interface VirtualMachineScaleSetIpTag { + /** IP tag type. Example: FirstPartyUsage. */ + ipTagType?: string; + /** IP tag associated with the public IP. Example: SQL, Storage etc. */ + tag?: string; +} + +/** Describes a virtual machine scale set extension profile. */ +export interface VirtualMachineScaleSetExtensionProfile { + /** The virtual machine scale set child extension resources. */ + extensions?: VirtualMachineScaleSetExtension[]; + /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 */ + extensionsTimeBudget?: string; +} + +/** Describes a scale-in policy for a virtual machine scale set. */ +export interface ScaleInPolicy { + /** The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

*/ + rules?: VirtualMachineScaleSetScaleInRules[]; +} + +/** Identity for the virtual machine scale set. */ +export interface VirtualMachineScaleSetIdentity { /** - * Specifies the version of the script handler. + * The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - typeHandlerVersion?: string; + readonly principalId?: string; /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. + * The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoUpgradeMinorVersion?: boolean; + readonly tenantId?: string; + /** The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. */ + type?: ResourceIdentityType; + /** The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: { + [propertyName: string]: VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue; + }; +} + +export interface VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue { /** - * Indicates whether the extension should be automatically upgraded by the platform if there is a - * newer version of the extension available. + * The principal id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableAutomaticUpgrade?: boolean; + readonly principalId?: string; /** - * Json formatted public settings for the extension. + * The client id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - settings?: any; + readonly clientId?: string; +} + +/** Describes a storage profile. */ +export interface ImageStorageProfile { + /** Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + osDisk?: ImageOSDisk; + /** Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). */ + dataDisks?: ImageDataDisk[]; + /** Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). */ + zoneResilient?: boolean; +} + +/** Describes a image disk. */ +export interface ImageDisk { + /** The snapshot. */ + snapshot?: SubResource; + /** The managedDisk. */ + managedDisk?: SubResource; + /** The Virtual Hard Disk. */ + blobUri?: string; + /** Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage** */ + caching?: CachingTypes; + /** Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + diskSizeGB?: number; + /** Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. */ + storageAccountType?: StorageAccountTypes; + /** Specifies the customer managed disk encryption set resource id for the managed image disk. */ + diskEncryptionSet?: DiskEncryptionSetParameters; +} + +/** The List Image operation response. */ +export interface ImageListResult { + /** The list of Images. */ + value: Image[]; + /** The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images. */ + nextLink?: string; +} + +/** Capture Virtual Machine parameters. */ +export interface VirtualMachineCaptureParameters { + /** The captured virtual hard disk's name prefix. */ + vhdPrefix: string; + /** The destination container name. */ + destinationContainerName: string; + /** Specifies whether to overwrite the destination virtual hard disk, in case of conflict. */ + overwriteVhds: boolean; +} + +/** The properties of the source resource that this restore point collection is created from. */ +export interface RestorePointCollectionSourceProperties { /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. + * Location of the source resource used to create this restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - protectedSettings?: any; + readonly location?: string; + /** Resource Id of the source resource used to create this restore point collection */ + id?: string; } -/** - * Describes a VMSS VM Extension. - */ -export interface VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly { +/** The resource model definition for an Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource { /** - * The name of the extension. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** * Resource type - * **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 type?: string; +} + +/** Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation. */ +export interface RestorePointSourceMetadata { + /** Gets the hardware profile. */ + hardwareProfile?: HardwareProfile; + /** Gets the storage profile. */ + storageProfile?: RestorePointSourceVMStorageProfile; + /** Gets the OS profile. */ + osProfile?: OSProfile; + /** Gets the diagnostics profile. */ + diagnosticsProfile?: DiagnosticsProfile; + /** Gets the license type, which is for bring your own license scenario. */ + licenseType?: string; + /** Gets the virtual machine unique id. */ + vmId?: string; + /** Gets the security profile. */ + securityProfile?: SecurityProfile; + /** Location of the VM from which the restore point was created. */ + location?: string; +} + +/** Describes the storage profile. */ +export interface RestorePointSourceVMStorageProfile { + /** Gets the OS disk of the VM captured at the time of the restore point creation. */ + osDisk?: RestorePointSourceVmosDisk; + /** Gets the data disks of the VM captured at the time of the restore point creation. */ + dataDisks?: RestorePointSourceVMDataDisk[]; +} + +/** Describes an Operating System disk. */ +export interface RestorePointSourceVmosDisk { + /** Gets the Operating System type. */ + osType?: OperatingSystemType; + /** Gets the disk encryption settings. */ + encryptionSettings?: DiskEncryptionSettings; + /** Gets the disk name. */ + name?: string; + /** Gets the caching type. */ + caching?: CachingTypes; + /** Gets the disk size in GB. */ + diskSizeGB?: number; + /** Gets the managed disk details */ + managedDisk?: ManagedDiskParameters; + /** Gets the disk restore point Id. */ + diskRestorePoint?: ApiEntityReference; +} + +/** Describes a data disk. */ +export interface RestorePointSourceVMDataDisk { + /** Gets the logical unit number. */ + lun?: number; + /** Gets the disk name. */ + name?: string; + /** Gets the caching type. */ + caching?: CachingTypes; + /** Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. */ + diskSizeGB?: number; + /** Gets the managed disk details */ + managedDisk?: ManagedDiskParameters; + /** Gets the disk restore point Id. */ + diskRestorePoint?: ApiEntityReference; +} + +/** Restore Point Provisioning details. */ +export interface RestorePointProvisioningDetails { + /** Gets the creation time of the restore point. */ + creationTime?: Date; + /** Gets the total size of the data in all the disks which are part of the restore point. */ + totalUsedSizeInBytes?: number; + /** Gets the status of the Create restore point operation. */ + statusCode?: number; + /** Gets the status message of the Create restore point operation. */ + statusMessage?: string; +} + +/** The List restore point collection operation response. */ +export interface RestorePointCollectionListResult { + /** Gets the list of restore point collections. */ + value?: RestorePointCollection[]; + /** The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch the next page of RestorePointCollections */ + nextLink?: string; +} + +/** Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged */ +export interface VirtualMachineReimageParameters { + /** Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. */ + tempDisk?: boolean; +} + +/** The SAS URIs of the console screenshot and serial log blobs. */ +export interface RetrieveBootDiagnosticsDataResult { /** - * How the extension handler should be forced to update even if the extension configuration has - * not changed. + * The console screenshot blob URI + * NOTE: This property will not be serialized. It can only be populated by the server. */ - forceUpdateTag?: string; + readonly consoleScreenshotBlobUri?: string; /** - * The name of the extension handler publisher. + * The serial console log blob URI. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publisher?: string; + readonly serialConsoleLogBlobUri?: string; +} + +/** Describes the properties of an AssessPatches result. */ +export interface VirtualMachineAssessPatchesResult { /** - * Specifies the type of the extension; an example is "CustomScriptExtension". + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type1?: string; + readonly status?: PatchOperationStatus; /** - * Specifies the version of the script handler. + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - typeHandlerVersion?: string; + readonly assessmentActivityId?: string; /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. + * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - autoUpgradeMinorVersion?: boolean; + readonly rebootPending?: boolean; /** - * Indicates whether the extension should be automatically upgraded by the platform if there is a - * newer version of the extension available. + * The number of critical or security patches that have been detected as available and not yet installed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableAutomaticUpgrade?: boolean; + readonly criticalAndSecurityPatchCount?: number; /** - * Json formatted public settings for the extension. + * The number of all available patches excluding critical and security. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - settings?: any; + readonly otherPatchCount?: number; /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. + * The UTC timestamp when the operation began. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - protectedSettings?: any; -} - -/** - * The List Extension operation response - */ -export interface VirtualMachineExtensionsListResult { + readonly startDateTime?: Date; /** - * The list of extensions + * The list of patches that have been detected as available for installation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - value?: VirtualMachineExtension[]; -} - -/** - * The List VMSS VM Extension operation response - */ -export interface VirtualMachineScaleSetVMExtensionsListResult { + readonly availablePatches?: VirtualMachineSoftwarePatchProperties[]; /** - * The list of VMSS VM extensions + * The errors that were encountered during execution of the operation. The details array contains the list of them. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - value?: VirtualMachineScaleSetVMExtension[]; + readonly error?: ApiError; } -/** - * Describes the properties of a Virtual Machine software patch. - */ +/** Describes the properties of a Virtual Machine software patch. */ export interface VirtualMachineSoftwarePatchProperties { /** * A unique identifier for the patch. - * **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 patchId?: string; /** * The friendly name of the patch. - * **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 name?: string; /** * The version number of the patch. This property applies only to Linux patches. - * **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; /** * The KBID of the patch. Only applies to Windows patches. - * **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 kbId?: string; /** * The classification(s) of the patch as provided by the patch publisher. - * **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 classifications?: string[]; /** - * Describes the reboot requirements of the patch. Possible values include: 'Unknown', - * 'NeverReboots', 'AlwaysRequiresReboot', 'CanRequestReboot' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes the reboot requirements of the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly rebootBehavior?: VMGuestPatchRebootBehavior; /** - * The activity ID of the operation that produced this result. It is used to correlate across CRP - * and extension logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly activityId?: string; /** * The UTC timestamp when the repository published this patch. - * **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 publishedDate?: Date; /** * The UTC timestamp of the last update to this patch record. - * **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 lastModifiedDateTime?: Date; /** - * Describes the availability of a given patch. Possible values include: 'Unknown', 'Available' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes the availability of a given patch. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly assessmentState?: PatchAssessmentState; } -/** - * Api error base. - */ -export interface ApiErrorBase { - /** - * The error code. - */ - code?: string; - /** - * The target of the particular error. - */ - target?: string; - /** - * The error message. - */ - message?: string; -} - -/** - * Inner error details. - */ -export interface InnerError { - /** - * The exception type. - */ - exceptiontype?: string; - /** - * The internal error message or exception dump. - */ - errordetail?: string; -} - -/** - * Api error. - */ -export interface ApiError { - /** - * The Api error details - */ - details?: ApiErrorBase[]; - /** - * The Api inner error - */ - innererror?: InnerError; - /** - * The error code. - */ - code?: string; - /** - * The target of the particular error. - */ - target?: string; - /** - * The error message. - */ - message?: string; -} - -/** - * Describes the properties of an AssessPatches result. - */ -export interface VirtualMachineAssessPatchesResult { - /** - * The overall success or failure status of the operation. It remains "InProgress" until the - * operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or - * "CompletedWithWarnings.". Possible values include: 'Unknown', 'InProgress', 'Failed', - * 'Succeeded', 'CompletedWithWarnings' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: PatchOperationStatus; - /** - * The activity ID of the operation that produced this result. It is used to correlate across CRP - * and extension logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly assessmentActivityId?: string; - /** - * The overall reboot status of the VM. It will be true when partially installed patches require - * a reboot to complete installation but the reboot has not yet occurred. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly rebootPending?: boolean; - /** - * The number of critical or security patches that have been detected as available and not yet - * installed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly criticalAndSecurityPatchCount?: number; - /** - * The number of all available patches excluding critical and security. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly otherPatchCount?: number; - /** - * The UTC timestamp when the operation began. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly startDateTime?: Date; - /** - * The list of patches that have been detected as available for installation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly availablePatches?: VirtualMachineSoftwarePatchProperties[]; - /** - * The errors that were encountered during execution of the operation. The details array contains - * the list of them. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ApiError; +/** Input for InstallPatches as directly received by the API */ +export interface VirtualMachineInstallPatchesParameters { + /** Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) */ + maximumDuration: string; + /** Defines when it is acceptable to reboot a VM during a software update operation. */ + rebootSetting: VMGuestPatchRebootSetting; + /** Input for InstallPatches on a Windows VM, as directly received by the API */ + windowsParameters?: WindowsParameters; + /** Input for InstallPatches on a Linux VM, as directly received by the API */ + linuxParameters?: LinuxParameters; } -/** - * Input for InstallPatches on a Windows VM, as directly received by the API - */ +/** Input for InstallPatches on a Windows VM, as directly received by the API */ export interface WindowsParameters { - /** - * The update classifications to select when installing patches for Windows. - */ + /** The update classifications to select when installing patches for Windows. */ classificationsToInclude?: VMGuestPatchClassificationWindows[]; - /** - * Kbs to include in the patch operation - */ + /** Kbs to include in the patch operation */ kbNumbersToInclude?: string[]; - /** - * Kbs to exclude in the patch operation - */ + /** Kbs to exclude in the patch operation */ kbNumbersToExclude?: string[]; - /** - * Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is - * set to true. - */ + /** Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. */ excludeKbsRequiringReboot?: boolean; - /** - * This is used to install patches that were published on or before this given max published - * date. - */ + /** This is used to install patches that were published on or before this given max published date. */ maxPatchPublishDate?: Date; } -/** - * Input for InstallPatches on a Linux VM, as directly received by the API - */ +/** Input for InstallPatches on a Linux VM, as directly received by the API */ export interface LinuxParameters { - /** - * The update classifications to select when installing patches for Linux. - */ + /** The update classifications to select when installing patches for Linux. */ classificationsToInclude?: VMGuestPatchClassificationLinux[]; - /** - * packages to include in the patch operation. Format: packageName_packageVersion - */ + /** packages to include in the patch operation. Format: packageName_packageVersion */ packageNameMasksToInclude?: string[]; - /** - * packages to exclude in the patch operation. Format: packageName_packageVersion - */ + /** packages to exclude in the patch operation. Format: packageName_packageVersion */ packageNameMasksToExclude?: string[]; - /** - * This is used as a maintenance run identifier for Auto VM Guest Patching in Linux. - */ + /** This is used as a maintenance run identifier for Auto VM Guest Patching in Linux. */ maintenanceRunId?: string; } -/** - * Input for InstallPatches as directly received by the API - */ -export interface VirtualMachineInstallPatchesParameters { - /** - * Specifies the maximum amount of time that the operation will run. It must be an ISO - * 8601-compliant duration string such as PT4H (4 hours) - */ - maximumDuration: string; - /** - * Defines when it is acceptable to reboot a VM during a software update operation. Possible - * values include: 'IfRequired', 'Never', 'Always' - */ - rebootSetting: VMGuestPatchRebootSetting; - /** - * Input for InstallPatches on a Windows VM, as directly received by the API - */ - windowsParameters?: WindowsParameters; - /** - * Input for InstallPatches on a Linux VM, as directly received by the API - */ - linuxParameters?: LinuxParameters; -} - -/** - * Information about a specific patch that was encountered during an installation action. - */ -export interface PatchInstallationDetail { - /** - * A unique identifier for the patch. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly patchId?: string; - /** - * The friendly name of the patch. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The version string of the package. It may conform to Semantic Versioning. Only applies to - * Linux. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; - /** - * The KBID of the patch. Only applies to Windows patches. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kbId?: string; - /** - * The classification(s) of the patch as provided by the patch publisher. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly classifications?: string[]; - /** - * The state of the patch after the installation operation completed. Possible values include: - * 'Unknown', 'Installed', 'Failed', 'Excluded', 'NotSelected', 'Pending' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly installationState?: PatchInstallationState; -} - -/** - * The result summary of an installation operation. - */ +/** The result summary of an installation operation. */ export interface VirtualMachineInstallPatchesResult { /** - * The overall success or failure status of the operation. It remains "InProgress" until the - * operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or - * "CompletedWithWarnings.". Possible values include: 'Unknown', 'InProgress', 'Failed', - * 'Succeeded', 'CompletedWithWarnings' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: PatchOperationStatus; /** - * The activity ID of the operation that produced this result. It is used to correlate across CRP - * and extension logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly installationActivityId?: string; /** - * The reboot state of the VM following completion of the operation. Possible values include: - * 'Unknown', 'NotNeeded', 'Required', 'Started', 'Failed', 'Completed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The reboot state of the VM following completion of the operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly rebootStatus?: VMGuestPatchRebootStatus; /** * Whether the operation ran out of time before it completed all its intended actions. - * **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 maintenanceWindowExceeded?: boolean; /** * The number of patches that were not installed due to the user blocking their installation. - * **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 excludedPatchCount?: number; /** - * The number of patches that were detected as available for install, but did not meet the - * operation's criteria. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The number of patches that were detected as available for install, but did not meet the operation's criteria. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly notSelectedPatchCount?: number; /** - * The number of patches that were identified as meeting the installation criteria, but were not - * able to be installed. Typically this happens when maintenanceWindowExceeded == true. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly pendingPatchCount?: number; /** * The number of patches successfully installed. - * **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 installedPatchCount?: number; /** * The number of patches that could not be installed due to some issue. See errors for details. - * **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 failedPatchCount?: number; /** * The patches that were installed during the operation. - * **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 patches?: PatchInstallationDetail[]; /** * The UTC timestamp when the operation began. - * **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 startDateTime?: Date; /** - * The errors that were encountered during execution of the operation. The details array contains - * the list of them. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly error?: ApiError; } -/** - * Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. - */ -export interface PurchasePlan { +/** Information about a specific patch that was encountered during an installation action. */ +export interface PatchInstallationDetail { /** - * The publisher ID. + * A unique identifier for the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publisher: string; + readonly patchId?: string; /** - * The plan ID. + * The friendly name of the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly name?: string; /** - * Specifies the product of the image from the marketplace. This is the same value as Offer under - * the imageReference element. + * The version string of the package. It may conform to Semantic Versioning. Only applies to Linux. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - product: string; + readonly version?: string; /** - * The Offer Promotion Code. + * The KBID of the patch. Only applies to Windows patches. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - promotionCode?: string; -} - -/** - * Contains the os disk image information. - */ -export interface OSDiskImage { + readonly kbId?: string; /** - * The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux' + * The classification(s) of the patch as provided by the patch publisher. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - operatingSystem: OperatingSystemTypes; -} - -/** - * Contains the data disk images information. - */ -export interface DataDiskImage { + readonly classifications?: string[]; /** - * Specifies the logical unit number of the data disk. This value is used to identify data disks - * within the VM and therefore must be unique for each data disk attached to a VM. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The state of the patch after the installation operation completed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lun?: number; + readonly installationState?: PatchInstallationState; } -/** - * Describes automatic OS upgrade properties on the image. - */ -export interface AutomaticOSUpgradeProperties { - /** - * Specifies whether automatic OS upgrade is supported on the image. - */ - automaticOSUpgradeSupported: boolean; +/** Describes a virtual machine scale set virtual machine profile. */ +export interface VirtualMachineScaleSetUpdateVMProfile { + /** The virtual machine scale set OS profile. */ + osProfile?: VirtualMachineScaleSetUpdateOSProfile; + /** The virtual machine scale set storage profile. */ + storageProfile?: VirtualMachineScaleSetUpdateStorageProfile; + /** The virtual machine scale set network profile. */ + networkProfile?: VirtualMachineScaleSetUpdateNetworkProfile; + /** The virtual machine scale set Security profile */ + securityProfile?: SecurityProfile; + /** The virtual machine scale set diagnostics profile. */ + diagnosticsProfile?: DiagnosticsProfile; + /** The virtual machine scale set extension profile. */ + extensionProfile?: VirtualMachineScaleSetExtensionProfile; + /** The license type, which is for bring your own license scenario. */ + licenseType?: string; + /** Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. */ + billingProfile?: BillingProfile; + /** Specifies Scheduled Event related configurations. */ + scheduledEventsProfile?: ScheduledEventsProfile; + /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

Minimum api-version: 2021-03-01 */ + userData?: string; } -/** - * Specifies additional capabilities supported by the image - */ -export interface VirtualMachineImageFeature { - /** - * The name of the feature. - */ +/** Describes a virtual machine scale set OS profile. */ +export interface VirtualMachineScaleSetUpdateOSProfile { + /** A base-64 encoded string of custom data. */ + customData?: string; + /** The Windows Configuration of the OS profile. */ + windowsConfiguration?: WindowsConfiguration; + /** The Linux Configuration of the OS profile. */ + linuxConfiguration?: LinuxConfiguration; + /** The List of certificates for addition to the VM. */ + secrets?: VaultSecretGroup[]; +} + +/** Describes a virtual machine scale set storage profile. */ +export interface VirtualMachineScaleSetUpdateStorageProfile { + /** The image reference. */ + imageReference?: ImageReference; + /** The OS disk. */ + osDisk?: VirtualMachineScaleSetUpdateOSDisk; + /** The data disks. */ + dataDisks?: VirtualMachineScaleSetDataDisk[]; +} + +/** Describes virtual machine scale set operating system disk Update Object. This should be used for Updating VMSS OS Disk. */ +export interface VirtualMachineScaleSetUpdateOSDisk { + /** The caching type. */ + caching?: CachingTypes; + /** Specifies whether writeAccelerator should be enabled or disabled on the disk. */ + writeAcceleratorEnabled?: boolean; + /** Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

This value cannot be larger than 1023 GB */ + diskSizeGB?: number; + /** The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. */ + image?: VirtualHardDisk; + /** The list of virtual hard disk container uris. */ + vhdContainers?: string[]; + /** The managed disk parameters. */ + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; +} + +/** Describes a virtual machine scale set network profile. */ +export interface VirtualMachineScaleSetUpdateNetworkProfile { + /** A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. */ + healthProbe?: ApiEntityReference; + /** The list of network configurations. */ + networkInterfaceConfigurations?: VirtualMachineScaleSetUpdateNetworkConfiguration[]; + /** specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible' */ + networkApiVersion?: NetworkApiVersion; +} + +/** Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ +export interface VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { + /** The publicIP address configuration name. */ name?: string; - /** - * The corresponding value for the feature. - */ - value?: string; + /** The idle timeout of the public IP address. */ + idleTimeoutInMinutes?: number; + /** The dns settings to be applied on the publicIP addresses . */ + dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + /** Specify what happens to the public IP when the VM is deleted */ + deleteOption?: DeleteOptions; } -/** - * Describes a Virtual Machine Image. - */ -export interface VirtualMachineImage extends VirtualMachineImageResource { - plan?: PurchasePlan; - osDiskImage?: OSDiskImage; - dataDiskImages?: DataDiskImage[]; - automaticOSUpgradeProperties?: AutomaticOSUpgradeProperties; +/** Specifies a list of virtual machine instance IDs from the VM scale set. */ +export interface VirtualMachineScaleSetVMInstanceIDs { + /** The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. */ + instanceIds?: string[]; +} + +/** Specifies a list of virtual machine instance IDs from the VM scale set. */ +export interface VirtualMachineScaleSetVMInstanceRequiredIDs { + /** The virtual machine scale set instance ids. */ + instanceIds: string[]; +} + +/** The instance view of a virtual machine scale set. */ +export interface VirtualMachineScaleSetInstanceView { /** - * Possible values include: 'V1', 'V2' + * The instance view status summary for the virtual machine scale set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hyperVGeneration?: HyperVGenerationTypes; + readonly virtualMachine?: VirtualMachineScaleSetInstanceViewStatusesSummary; /** - * Specifies disallowed configuration for the VirtualMachine created from the image + * The extensions information. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - disallowed?: DisallowedConfiguration; - features?: VirtualMachineImageFeature[]; -} - -/** - * The Usage Names. - */ -export interface UsageName { + readonly extensions?: VirtualMachineScaleSetVMExtensionsSummary[]; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; /** - * The name of the resource. + * The orchestration services information. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - value?: string; + readonly orchestrationServices?: OrchestrationServiceSummary[]; +} + +/** Instance view statuses summary for virtual machines of a virtual machine scale set. */ +export interface VirtualMachineScaleSetInstanceViewStatusesSummary { /** - * The localized name of the resource. + * The extensions information. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - localizedValue?: string; + readonly statusesSummary?: VirtualMachineStatusCodeCount[]; } -/** - * Describes Compute Resource Usage. - */ -export interface Usage { - /** - * The current usage of the resource. - */ - currentValue: number; - /** - * The maximum permitted usage of the resource. - */ - limit: number; +/** The status code and count of the virtual machine scale set instance view status summary. */ +export interface VirtualMachineStatusCodeCount { /** - * The name of the type of usage. + * The instance view status code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: UsageName; -} - -/** - * Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged - */ -export interface VirtualMachineReimageParameters { + readonly code?: string; /** - * Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage - * parameter is only supported for VM/VMSS with Ephemeral OS disk. + * The number of instances having a particular status code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tempDisk?: boolean; + readonly count?: number; } -/** - * Capture Virtual Machine parameters. - */ -export interface VirtualMachineCaptureParameters { - /** - * The captured virtual hard disk's name prefix. - */ - vhdPrefix: string; +/** Extensions summary for virtual machines of a virtual machine scale set. */ +export interface VirtualMachineScaleSetVMExtensionsSummary { /** - * The destination container name. + * The extension name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - destinationContainerName: string; + readonly name?: string; /** - * Specifies whether to overwrite the destination virtual hard disk, in case of conflict. + * The extensions information. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - overwriteVhds: boolean; + readonly statusesSummary?: VirtualMachineStatusCodeCount[]; } -/** - * Output of virtual machine capture operation. - */ -export interface VirtualMachineCaptureResult extends SubResource { - /** - * the schema of the captured virtual machine - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly schema?: string; - /** - * the version of the content - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly contentVersion?: string; +/** Summary for an orchestration service of a virtual machine scale set. */ +export interface OrchestrationServiceSummary { /** - * parameters of the captured virtual machine - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The name of the service. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly parameters?: any; + readonly serviceName?: OrchestrationServiceNames; /** - * a list of resource items of the captured virtual machine - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The current state of the service. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resources?: any[]; + readonly serviceState?: OrchestrationServiceState; } -/** - * Specifies information about the marketplace image used to create the virtual machine. This - * element is only used for marketplace images. Before you can use a marketplace image from an API, - * you must enable the image for programmatic use. In the Azure portal, find the marketplace image - * that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter - * any required information and then click **Save**. - */ -export interface Plan { - /** - * The plan ID. - */ - name?: string; +/** The List VM scale set extension operation response. */ +export interface VirtualMachineScaleSetExtensionListResult { + /** The list of VM scale set extensions. */ + value: VirtualMachineScaleSetExtension[]; + /** The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions. */ + nextLink?: string; +} + +/** The List Virtual Machine operation response. */ +export interface VirtualMachineScaleSetListWithLinkResult { + /** The list of virtual machine scale sets. */ + value: VirtualMachineScaleSet[]; + /** The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual Machine Scale Sets. */ + nextLink?: string; +} + +/** The Virtual Machine Scale Set List Skus operation response. */ +export interface VirtualMachineScaleSetListSkusResult { + /** The list of skus available for the virtual machine scale set. */ + value: VirtualMachineScaleSetSku[]; + /** The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS Skus. */ + nextLink?: string; +} + +/** Describes an available virtual machine scale set sku. */ +export interface VirtualMachineScaleSetSku { /** - * The publisher ID. + * The type of resource the sku applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publisher?: string; + readonly resourceType?: string; /** - * Specifies the product of the image from the marketplace. This is the same value as Offer under - * the imageReference element. + * The Sku. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - product?: string; + readonly sku?: Sku; /** - * The promotion code. + * Specifies the number of virtual machines in the scale set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - promotionCode?: string; + readonly capacity?: VirtualMachineScaleSetSkuCapacity; } -/** - * Specifies information about the image to use. You can specify information about platform images, - * marketplace images, or virtual machine images. This element is required when you want to use a - * platform image, marketplace image, or virtual machine image, but is not used in other creation - * operations. NOTE: Image reference publisher and offer can only be set when you create the scale - * set. - */ -export interface ImageReference extends SubResource { - /** - * The image publisher. - */ - publisher?: string; - /** - * Specifies the offer of the platform image or marketplace image used to create the virtual - * machine. - */ - offer?: string; +/** Describes scaling information of a sku. */ +export interface VirtualMachineScaleSetSkuCapacity { /** - * The image SKU. + * The minimum capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sku?: string; + readonly minimum?: number; /** - * Specifies the version of the platform image or marketplace image used to create the virtual - * machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are - * decimal numbers. Specify 'latest' to use the latest version of an image available at deploy - * time. Even if you use 'latest', the VM image will not automatically update after deploy time - * even if a new version becomes available. + * The maximum capacity that can be set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - version?: string; + readonly maximum?: number; /** - * Specifies in decimal numbers, the version of platform image or marketplace image used to - * create the virtual machine. This readonly field differs from 'version', only if the value - * specified in 'version' field is 'latest'. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The default capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly exactVersion?: string; -} - -/** - * Describes the uri of a disk. - */ -export interface VirtualHardDisk { + readonly defaultCapacity?: number; /** - * Specifies the virtual hard disk's uri. + * The scale type applicable to the sku. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - uri?: string; + readonly scaleType?: VirtualMachineScaleSetSkuScaleType; } -/** - * Describes the parameters of ephemeral disk settings that can be specified for operating system - * disk.

NOTE: The ephemeral disk settings can only be specified for managed disk. - */ -export interface DiffDiskSettings { - /** - * Specifies the ephemeral disk settings for operating system disk. Possible values include: - * 'Local' - */ - option?: DiffDiskOptions; - /** - * Specifies the ephemeral disk placement for operating system disk.

Possible values are: - *

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is - * configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size - * documentation for Windows VM at - * https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at - * https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes - * a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk' - */ - placement?: DiffDiskPlacement; +/** List of Virtual Machine Scale Set OS Upgrade History operation response. */ +export interface VirtualMachineScaleSetListOSUpgradeHistory { + /** The list of OS upgrades performed on the virtual machine scale set. */ + value: UpgradeOperationHistoricalStatusInfo[]; + /** The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades. */ + nextLink?: string; } -/** - * Specifies information about the operating system disk used by the virtual machine.

For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - */ -export interface OSDisk { - /** - * This property allows you to specify the type of the OS that is included in the disk if - * creating a VM from user-image or a specialized VHD.

Possible values are:

- * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemTypes; - /** - * Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 - */ - encryptionSettings?: DiskEncryptionSettings; - /** - * The disk name. - */ - name?: string; +/** Virtual Machine Scale Set OS Upgrade History operation response. */ +export interface UpgradeOperationHistoricalStatusInfo { /** - * The virtual hard disk. + * Information about the properties of the upgrade operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vhd?: VirtualHardDisk; + readonly properties?: UpgradeOperationHistoricalStatusInfoProperties; /** - * The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard - * drive must not exist. + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - image?: VirtualHardDisk; + readonly type?: string; /** - * Specifies the caching requirements.

Possible values are:

**None**

- * **ReadOnly**

**ReadWrite**

Default: **None** for Standard storage. - * **ReadOnly** for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * Resource location + * NOTE: This property will not be serialized. It can only be populated by the server. */ - caching?: CachingTypes; + readonly location?: string; +} + +/** Describes each OS upgrade on the Virtual Machine Scale Set. */ +export interface UpgradeOperationHistoricalStatusInfoProperties { /** - * Specifies whether writeAccelerator should be enabled or disabled on the disk. + * Information about the overall status of the upgrade operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - writeAcceleratorEnabled?: boolean; + readonly runningStatus?: UpgradeOperationHistoryStatus; /** - * Specifies the ephemeral Disk Settings for the operating system disk used by the virtual - * machine. + * Counts of the VMs in each state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diffDiskSettings?: DiffDiskSettings; + readonly progress?: RollingUpgradeProgressInfo; /** - * Specifies how the virtual machine should be created.

Possible values are:

- * **Attach** \u2013 This value is used when you are using a specialized disk to create the - * virtual machine.

**FromImage** \u2013 This value is used when you are using an image - * to create the virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace image, you also use - * the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach' + * Error Details for this upgrade if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - createOption: DiskCreateOptionTypes; + readonly error?: ApiError; /** - * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite - * the size of the disk in a virtual machine image.

This value cannot be larger than - * 1023 GB + * Invoker of the Upgrade Operation + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diskSizeGB?: number; + readonly startedBy?: UpgradeOperationInvoker; /** - * The managed disk parameters. + * Image Reference details + * NOTE: This property will not be serialized. It can only be populated by the server. */ - managedDisk?: ManagedDiskParameters; + readonly targetImageReference?: ImageReference; /** - * Specifies whether OS Disk should be deleted or detached upon VM deletion.

Possible - * values:

**Delete** If this value is used, the OS disk is deleted when VM is - * deleted.

**Detach** If this value is used, the os disk is retained after VM is - * deleted.

The default value is set to **detach**. For an ephemeral OS Disk, the - * default value is set to **Delete**. User cannot change the delete option for ephemeral OS - * Disk. Possible values include: 'Delete', 'Detach' + * Information about OS rollback if performed + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deleteOption?: DiskDeleteOptionTypes; + readonly rollbackInfo?: RollbackStatusInfo; } -/** - * Describes a data disk. - */ -export interface DataDisk { +/** Information about the current running state of the overall upgrade. */ +export interface UpgradeOperationHistoryStatus { /** - * Specifies the logical unit number of the data disk. This value is used to identify data disks - * within the VM and therefore must be unique for each data disk attached to a VM. + * Code indicating the current status of the upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lun: number; + readonly code?: UpgradeState; /** - * The disk name. + * Start time of the upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly startTime?: Date; /** - * The virtual hard disk. + * End time of the upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vhd?: VirtualHardDisk; + readonly endTime?: Date; +} + +/** Information about the number of virtual machine instances in each upgrade state. */ +export interface RollingUpgradeProgressInfo { /** - * The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard - * drive must not exist. + * The number of instances that have been successfully upgraded. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - image?: VirtualHardDisk; + readonly successfulInstanceCount?: number; /** - * Specifies the caching requirements.

Possible values are:

**None**

- * **ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly - * for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * The number of instances that have failed to be upgraded successfully. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - caching?: CachingTypes; + readonly failedInstanceCount?: number; /** - * Specifies whether writeAccelerator should be enabled or disabled on the disk. + * The number of instances that are currently being upgraded. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - writeAcceleratorEnabled?: boolean; + readonly inProgressInstanceCount?: number; /** - * Specifies how the virtual machine should be created.

Possible values are:

- * **Attach** \u2013 This value is used when you are using a specialized disk to create the - * virtual machine.

**FromImage** \u2013 This value is used when you are using an image - * to create the virtual machine. If you are using a platform image, you also use the - * imageReference element described above. If you are using a marketplace image, you also use - * the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach' + * The number of instances that have not yet begun to be upgraded. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - createOption: DiskCreateOptionTypes; + readonly pendingInstanceCount?: number; +} + +/** Information about rollback on failed VM instances after a OS Upgrade operation. */ +export interface RollbackStatusInfo { /** - * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite - * the size of the disk in a virtual machine image.

This value cannot be larger than - * 1023 GB + * The number of instances which have been successfully rolled back. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diskSizeGB?: number; + readonly successfullyRolledbackInstanceCount?: number; /** - * The managed disk parameters. + * The number of instances which failed to rollback. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - managedDisk?: ManagedDiskParameters; + readonly failedRolledbackInstanceCount?: number; /** - * Specifies whether the data disk is in process of detachment from the - * VirtualMachine/VirtualMachineScaleset + * Error details if OS rollback failed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - toBeDetached?: boolean; + readonly rollbackError?: ApiError; +} + +/** Information about the current running state of the overall upgrade. */ +export interface RollingUpgradeRunningStatus { /** - * Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. - * Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the - * VirtualMachine Scale Set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Code indicating the current status of the upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly diskIOPSReadWrite?: number; + readonly code?: RollingUpgradeStatusCode; /** - * Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is - * UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via - * updates to the VirtualMachine Scale Set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Start time of the upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly diskMBpsReadWrite?: number; + readonly startTime?: Date; /** - * Specifies the detach behavior to be used while detaching a disk or which is already in the - * process of detachment from the virtual machine. Supported values: **ForceDetach**.

- * detachOption: **ForceDetach** is applicable only for managed data disks. If a previous - * detachment attempt of the data disk did not complete due to an unexpected failure from the - * virtual machine and the disk is still not released then use force-detach as a last resort - * option to detach the disk forcibly from the VM. All writes might not have been flushed when - * using this detach behavior.

This feature is still in preview mode and is not - * supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to - * 'true' along with setting detachOption: 'ForceDetach'. Possible values include: 'ForceDetach' + * The last action performed on the rolling upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - detachOption?: DiskDetachOptionTypes; + readonly lastAction?: RollingUpgradeActionType; /** - * Specifies whether data disk should be deleted or detached upon VM deletion.

Possible - * values:

**Delete** If this value is used, the data disk is deleted when VM is - * deleted.

**Detach** If this value is used, the data disk is retained after VM is - * deleted.

The default value is set to **detach**. Possible values include: 'Delete', - * 'Detach' + * Last action time of the upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deleteOption?: DiskDeleteOptionTypes; + readonly lastActionTime?: Date; } -/** - * Specifies the storage settings for the virtual machine disks. - */ -export interface StorageProfile { - /** - * Specifies information about the image to use. You can specify information about platform - * images, marketplace images, or virtual machine images. This element is required when you want - * to use a platform image, marketplace image, or virtual machine image, but is not used in other - * creation operations. - */ - imageReference?: ImageReference; +/** Response after calling a manual recovery walk */ +export interface RecoveryWalkResponse { /** - * Specifies information about the operating system disk used by the virtual machine.

- * For more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * Whether the recovery walk was performed + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osDisk?: OSDisk; + readonly walkPerformed?: boolean; /** - * Specifies the parameters that are used to add a data disk to a virtual machine.

For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * The next update domain that needs to be walked. Null means walk spanning all update domains has been completed + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dataDisks?: DataDisk[]; + readonly nextPlatformUpdateDomain?: number; } -/** - * Enables or disables a capability on the virtual machine or virtual machine scale set. - */ -export interface AdditionalCapabilities { - /** - * The flag that enables or disables a capability to have one or more managed data disks with - * UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type - * UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this - * property is enabled. - */ - ultraSSDEnabled?: boolean; +export interface VMScaleSetConvertToSinglePlacementGroupInput { + /** Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. */ + activePlacementGroupId?: string; } -/** - * Specifies the configuration parameters for automatic repairs on the virtual machine scale set. - */ -export interface AutomaticRepairsPolicy { - /** - * Specifies whether automatic repairs should be enabled on the virtual machine scale set. The - * default value is false. - */ - enabled?: boolean; - /** - * The amount of time for which automatic repairs are suspended due to a state change on VM. The - * grace time starts after the state change has completed. This helps avoid premature or - * accidental repairs. The time duration should be specified in ISO 8601 format. The minimum - * allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum - * allowed grace period is 90 minutes (PT90M). - */ - gracePeriod?: string; +/** The input for OrchestrationServiceState */ +export interface OrchestrationServiceStateInput { + /** The name of the service. */ + serviceName: OrchestrationServiceNames; + /** The action to be performed. */ + action: OrchestrationServiceStateAction; } -/** - * Describes a network interface reference. - */ -export interface NetworkInterfaceReference extends SubResource { +/** The List VMSS VM Extension operation response */ +export interface VirtualMachineScaleSetVMExtensionsListResult { + /** The list of VMSS VM extensions */ + value?: VirtualMachineScaleSetVMExtension[]; +} + +/** The instance view of a virtual machine scale set VM. */ +export interface VirtualMachineScaleSetVMInstanceView { + /** The Update Domain count. */ + platformUpdateDomain?: number; + /** The Fault Domain count. */ + platformFaultDomain?: number; + /** The Remote desktop certificate thumbprint. */ + rdpThumbPrint?: string; + /** The VM Agent running on the virtual machine. */ + vmAgent?: VirtualMachineAgentInstanceView; + /** The Maintenance Operation status on the virtual machine. */ + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + /** The disks information. */ + disks?: DiskInstanceView[]; + /** The extensions information. */ + extensions?: VirtualMachineExtensionInstanceView[]; /** - * Specifies the primary network interface in case the virtual machine has more than 1 network - * interface. + * The health status for the VM. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - primary?: boolean; + readonly vmHealth?: VirtualMachineHealthStatus; + /** Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. */ + bootDiagnostics?: BootDiagnosticsInstanceView; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; /** - * Specify what happens to the network interface when the VM is deleted. Possible values include: - * 'Delete', 'Detach' + * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.

Minimum api-version: 2020-06-01. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deleteOption?: DeleteOptions; + readonly assignedHost?: string; + /** The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. */ + placementGroupId?: string; } -/** - * Contains the IP tag associated with the public IP address. - */ -export interface VirtualMachineIpTag { - /** - * IP tag type. Example: FirstPartyUsage. - */ - ipTagType?: string; - /** - * IP tag associated with the public IP. Example: SQL, Storage etc. - */ - tag?: string; +/** Describes a virtual machine scale set VM network profile. */ +export interface VirtualMachineScaleSetVMNetworkProfileConfiguration { + /** The list of network configurations. */ + networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; } -/** - * Describes a virtual machines network configuration's DNS settings. - */ -export interface VirtualMachinePublicIPAddressDnsSettingsConfiguration { - /** - * The Domain name label prefix of the PublicIPAddress resources that will be created. The - * generated name label is the concatenation of the domain name label and vm network profile - * unique ID. - */ - domainNameLabel: string; +/** The protection policy of a virtual machine scale set VM. */ +export interface VirtualMachineScaleSetVMProtectionPolicy { + /** Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation. */ + protectFromScaleIn?: boolean; + /** Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM. */ + protectFromScaleSetActions?: boolean; } -/** - * Describes the public IP Sku - */ -export interface PublicIPAddressSku { +/** The List Virtual Machine Scale Set VMs operation response. */ +export interface VirtualMachineScaleSetVMListResult { + /** The list of virtual machine scale sets VMs. */ + value: VirtualMachineScaleSetVM[]; + /** The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS VMs */ + nextLink?: string; +} + +/** Api input base class for LogAnalytics Api. */ +export interface LogAnalyticsInputBase { + /** SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. */ + blobContainerSasUri: string; + /** From time of the query */ + fromTime: Date; + /** To time of the query */ + toTime: Date; + /** Group query result by Throttle Policy applied. */ + groupByThrottlePolicy?: boolean; + /** Group query result by Operation Name. */ + groupByOperationName?: boolean; + /** Group query result by Resource Name. */ + groupByResourceName?: boolean; + /** Group query result by Client Application ID. */ + groupByClientApplicationId?: boolean; + /** Group query result by User Agent. */ + groupByUserAgent?: boolean; +} + +/** LogAnalytics operation status response */ +export interface LogAnalyticsOperationResult { /** - * Specify public IP sku name. Possible values include: 'Basic', 'Standard' + * LogAnalyticsOutput + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPAddressSkuName: PublicIPAddressSkuName; + readonly properties?: LogAnalyticsOutput; +} + +/** LogAnalytics output properties */ +export interface LogAnalyticsOutput { /** - * Specify public IP sku tier. Possible values include: 'Regional', 'Global' + * Output file Uri path to blob container. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPAddressSkuTier?: PublicIPAddressSkuTier; + readonly output?: string; } -/** - * Describes a virtual machines IP Configuration's PublicIPAddress configuration - */ -export interface VirtualMachinePublicIPAddressConfiguration { +/** The List Virtual Machine operation response. */ +export interface RunCommandListResult { + /** The list of virtual machine run commands. */ + value: RunCommandDocumentBase[]; + /** The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. */ + nextLink?: string; +} + +/** Describes the properties of a Run Command metadata. */ +export interface RunCommandDocumentBase { + /** The VM run command schema. */ + schema: string; + /** The VM run command id. */ + id: string; + /** The Operating System type. */ + osType: OperatingSystemTypes; + /** The VM run command label. */ + label: string; + /** The VM run command description. */ + description: string; +} + +/** Describes the properties of a run command parameter. */ +export interface RunCommandParameterDefinition { + /** The run command parameter name. */ + name: string; + /** The run command parameter type. */ + type: string; + /** The run command parameter default value. */ + defaultValue?: string; + /** The run command parameter required. */ + required?: boolean; +} + +/** Capture Virtual Machine parameters. */ +export interface RunCommandInput { + /** The run command id. */ + commandId: string; + /** Optional. The script to be executed. When this value is given, the given script will override the default script of the command. */ + script?: string[]; + /** The run command parameters. */ + parameters?: RunCommandInputParameter[]; +} + +/** Describes the properties of a run command parameter. */ +export interface RunCommandInputParameter { + /** The run command parameter name. */ + name: string; + /** The run command parameter value. */ + value: string; +} + +export interface RunCommandResult { + /** Run command operation response. */ + value?: InstanceViewStatus[]; +} + +/** Describes the script sources for run command. */ +export interface VirtualMachineRunCommandScriptSource { + /** Specifies the script content to be executed on the VM. */ + script?: string; + /** Specifies the script download location. */ + scriptUri?: string; + /** Specifies a commandId of predefined built-in script. */ + commandId?: string; +} + +/** The instance view of a virtual machine run command. */ +export interface VirtualMachineRunCommandInstanceView { + /** Script execution status. */ + executionState?: ExecutionState; + /** Communicate script configuration errors or execution messages. */ + executionMessage?: string; + /** Exit code returned from script execution. */ + exitCode?: number; + /** Script output stream. */ + output?: string; + /** Script error stream. */ + error?: string; + /** Script start time. */ + startTime?: Date; + /** Script end time. */ + endTime?: Date; + /** The resource status information. */ + statuses?: InstanceViewStatus[]; +} + +/** The List run command operation response */ +export interface VirtualMachineRunCommandsListResult { + /** The list of run commands */ + value: VirtualMachineRunCommand[]; + /** The uri to fetch the next page of run commands. */ + nextLink?: string; +} + +/** The List Resource Skus operation response. */ +export interface ResourceSkusResult { + /** The list of skus available for the subscription. */ + value: ResourceSku[]; + /** The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus */ + nextLink?: string; +} + +/** Describes an available Compute SKU. */ +export interface ResourceSku { /** - * The publicIP address configuration name. + * The type of resource the SKU applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly resourceType?: string; /** - * The idle timeout of the public IP address. + * The name of SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - idleTimeoutInMinutes?: number; + readonly name?: string; /** - * Specify what happens to the public IP address when the VM is deleted. Possible values include: - * 'Delete', 'Detach' + * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deleteOption?: DeleteOptions; + readonly tier?: string; /** - * The dns settings to be applied on the publicIP addresses . + * The Size of the SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dnsSettings?: VirtualMachinePublicIPAddressDnsSettingsConfiguration; + readonly size?: string; /** - * The list of IP tags associated with the public IP address. + * The Family of this particular SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ipTags?: VirtualMachineIpTag[]; + readonly family?: string; /** - * The PublicIPPrefix from which to allocate publicIP addresses. + * The Kind of resources that are supported in this SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPPrefix?: SubResource; + readonly kind?: string; /** - * Available from Api-Version 2019-07-01 onwards, it represents whether the specific - * ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - * 'IPv6'. Possible values include: 'IPv4', 'IPv6' + * Specifies the number of virtual machines in the scale set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPAddressVersion?: IPVersions; + readonly capacity?: ResourceSkuCapacity; /** - * Specify the public IP allocation type. Possible values include: 'Dynamic', 'Static' + * The set of locations that the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPAllocationMethod?: PublicIPAllocationMethod; - sku?: PublicIPAddressSku; -} - -/** - * Describes a virtual machine network profile's IP configuration. - */ -export interface VirtualMachineNetworkInterfaceIPConfiguration { + readonly locations?: string[]; /** - * The IP configuration name. + * A list of locations and availability zones in those locations where the SKU is available. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name: string; + readonly locationInfo?: ResourceSkuLocationInfo[]; /** - * Specifies the identifier of the subnet. + * The api versions that support this SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - subnet?: SubResource; + readonly apiVersions?: string[]; /** - * Specifies the primary network interface in case the virtual machine has more than 1 network - * interface. + * Metadata for retrieving price info. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - primary?: boolean; + readonly costs?: ResourceSkuCosts[]; /** - * The publicIPAddressConfiguration. + * A name value pair to describe the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPAddressConfiguration?: VirtualMachinePublicIPAddressConfiguration; + readonly capabilities?: ResourceSkuCapabilities[]; /** - * Available from Api-Version 2017-03-30 onwards, it represents whether the specific - * ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - * 'IPv6'. Possible values include: 'IPv4', 'IPv6' + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - privateIPAddressVersion?: IPVersions; + readonly restrictions?: ResourceSkuRestrictions[]; +} + +/** Describes scaling information of a SKU. */ +export interface ResourceSkuCapacity { /** - * Specifies an array of references to application security group. + * The minimum capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - applicationSecurityGroups?: SubResource[]; + readonly minimum?: number; /** - * Specifies an array of references to backend address pools of application gateways. A virtual - * machine can reference backend address pools of multiple application gateways. Multiple virtual - * machines cannot use the same application gateway. + * The maximum capacity that can be set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - applicationGatewayBackendAddressPools?: SubResource[]; + readonly maximum?: number; /** - * Specifies an array of references to backend address pools of load balancers. A virtual machine - * can reference backend address pools of one public and one internal load balancer. [Multiple - * virtual machines cannot use the same basic sku load balancer]. + * The default capacity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - loadBalancerBackendAddressPools?: SubResource[]; -} - -/** - * Describes a virtual machines network configuration's DNS settings. - */ -export interface VirtualMachineNetworkInterfaceDnsSettingsConfiguration { + readonly default?: number; /** - * List of DNS servers IP addresses + * The scale type applicable to the sku. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dnsServers?: string[]; + readonly scaleType?: ResourceSkuCapacityScaleType; } -/** - * Describes a virtual machine network interface configurations. - */ -export interface VirtualMachineNetworkInterfaceConfiguration { - /** - * The network interface configuration name. - */ - name: string; - /** - * Specifies the primary network interface in case the virtual machine has more than 1 network - * interface. - */ - primary?: boolean; +export interface ResourceSkuLocationInfo { /** - * Specify what happens to the network interface when the VM is deleted. Possible values include: - * 'Delete', 'Detach' + * Location of the SKU + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deleteOption?: DeleteOptions; + readonly location?: string; /** - * Specifies whether the network interface is accelerated networking-enabled. + * List of availability zones where the SKU is supported. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableAcceleratedNetworking?: boolean; + readonly zones?: string[]; /** - * Specifies whether the network interface is FPGA networking-enabled. + * Details of capabilities available to a SKU in specific zones. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableFpga?: boolean; + readonly zoneDetails?: ResourceSkuZoneDetails[]; +} + +/** Describes The zonal capabilities of a SKU. */ +export interface ResourceSkuZoneDetails { /** - * Whether IP forwarding enabled on this NIC. + * The set of zones that the SKU is available in with the specified capabilities. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableIPForwarding?: boolean; + readonly name?: string[]; /** - * The network security group. + * A list of capabilities that are available for the SKU in the specified list of zones. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - networkSecurityGroup?: SubResource; + readonly capabilities?: ResourceSkuCapabilities[]; +} + +/** Describes The SKU capabilities object. */ +export interface ResourceSkuCapabilities { /** - * The dns settings to be applied on the network interfaces. + * An invariant to describe the feature. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dnsSettings?: VirtualMachineNetworkInterfaceDnsSettingsConfiguration; + readonly name?: string; /** - * Specifies the IP configurations of the network interface. + * An invariant if the feature is measured by quantity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ipConfigurations: VirtualMachineNetworkInterfaceIPConfiguration[]; - dscpConfiguration?: SubResource; + readonly value?: string; } -/** - * Specifies the network interfaces or the networking configuration of the virtual machine. - */ -export interface NetworkProfile { +/** Describes metadata for retrieving price info. */ +export interface ResourceSkuCosts { /** - * Specifies the list of resource Ids for the network interfaces associated with the virtual - * machine. + * Used for querying price from commerce. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - networkInterfaces?: NetworkInterfaceReference[]; + readonly meterID?: string; /** - * specifies the Microsoft.Network API version used when creating networking resources in the - * Network Interface Configurations. Possible values include: '2020-11-01' + * The multiplier is needed to extend the base metered cost. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - networkApiVersion?: NetworkApiVersion; + readonly quantity?: number; /** - * Specifies the networking configurations that will be used to create the virtual machine - * networking resources. + * An invariant to show the extended unit. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - networkInterfaceConfigurations?: VirtualMachineNetworkInterfaceConfiguration[]; + readonly extendedUnit?: string; } -/** - * Specifies the billing related details of a Azure Spot VM or VMSS.

Minimum api-version: - * 2019-03-01. - */ -export interface BillingProfile { +/** Describes scaling information of a SKU. */ +export interface ResourceSkuRestrictions { /** - * Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in - * US Dollars.

This price will be compared with the current Azure Spot price for the VM - * size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the - * operation will only succeed if the maxPrice is greater than the current Azure Spot price. - *

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure - * Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are: - *

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates - * default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that - * the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is - * -1 if it is not provided by you.

Minimum api-version: 2019-03-01. + * The type of restrictions. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maxPrice?: number; -} - -/** - * The instance view of a virtual machine extension handler. - */ -export interface VirtualMachineExtensionHandlerInstanceView { + readonly type?: ResourceSkuRestrictionsType; /** - * Specifies the type of the extension; an example is "CustomScriptExtension". + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: string; + readonly values?: string[]; /** - * Specifies the version of the script handler. + * The information about the restriction where the SKU cannot be used. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - typeHandlerVersion?: string; + readonly restrictionInfo?: ResourceSkuRestrictionInfo; /** - * The extension handler status. + * The reason for restriction. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - status?: InstanceViewStatus; + readonly reasonCode?: ResourceSkuRestrictionsReasonCode; } -/** - * The instance view of the VM Agent running on the virtual machine. - */ -export interface VirtualMachineAgentInstanceView { - /** - * The VM Agent full version. - */ - vmAgentVersion?: string; +export interface ResourceSkuRestrictionInfo { /** - * The virtual machine extension handler instance view. + * Locations where the SKU is restricted + * NOTE: This property will not be serialized. It can only be populated by the server. */ - extensionHandlers?: VirtualMachineExtensionHandlerInstanceView[]; + readonly locations?: string[]; /** - * The resource status information. + * List of availability zones where the SKU is restricted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - statuses?: InstanceViewStatus[]; + readonly zones?: string[]; } -/** - * The instance view of the disk. - */ -export interface DiskInstanceView { +/** The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. */ +export interface DiskSku { + /** The sku name. */ + name?: DiskStorageAccountTypes; /** - * The disk name. + * The sku tier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; - /** - * Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15 - */ - encryptionSettings?: DiskEncryptionSettings[]; - /** - * The resource status information. - */ - statuses?: InstanceViewStatus[]; + readonly tier?: string; } -/** - * The instance view of a virtual machine boot diagnostics. - */ -export interface BootDiagnosticsInstanceView { +/** Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. */ +export interface PurchasePlanAutoGenerated { + /** The plan ID. */ + name: string; + /** The publisher ID. */ + publisher: string; + /** Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. */ + product: string; + /** The Offer Promotion Code. */ + promotionCode?: string; +} + +/** Data used when creating a disk. */ +export interface CreationData { + /** This enumerates the possible sources of a disk's creation. */ + createOption: DiskCreateOption; + /** Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. */ + storageAccountId?: string; + /** Disk source information. */ + imageReference?: ImageDiskReference; + /** Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. */ + galleryImageReference?: ImageDiskReference; + /** If createOption is Import, this is the URI of a blob to be imported into a managed disk. */ + sourceUri?: string; + /** If createOption is Copy, this is the ARM id of the source snapshot or disk. */ + sourceResourceId?: string; /** - * The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is - * currently enabled with managed storage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * If this field is set, this is the unique id identifying the source of this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly consoleScreenshotBlobUri?: string; + readonly sourceUniqueId?: string; + /** If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). */ + uploadSizeBytes?: number; + /** Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. */ + logicalSectorSize?: number; +} + +/** The source image used for creating the disk. */ +export interface ImageDiskReference { + /** A relative uri containing either a Platform Image Repository or user image reference. */ + id: string; + /** If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. */ + lun?: number; +} + +/** Encryption settings for disk or snapshot */ +export interface EncryptionSettingsCollection { + /** Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. */ + enabled: boolean; + /** A collection of encryption settings, one for each disk volume. */ + encryptionSettings?: EncryptionSettingsElement[]; + /** Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption. */ + encryptionSettingsVersion?: string; +} + +/** Encryption settings for one disk volume. */ +export interface EncryptionSettingsElement { + /** Key Vault Secret Url and vault id of the disk encryption key */ + diskEncryptionKey?: KeyVaultAndSecretReference; + /** Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. */ + keyEncryptionKey?: KeyVaultAndKeyReference; +} + +/** Key Vault Secret Url and vault id of the encryption key */ +export interface KeyVaultAndSecretReference { + /** Resource id of the KeyVault containing the key or secret */ + sourceVault: SourceVault; + /** Url pointing to a key or secret in KeyVault */ + secretUrl: string; +} + +/** The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} */ +export interface SourceVault { + /** Resource Id */ + id?: string; +} + +/** Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey */ +export interface KeyVaultAndKeyReference { + /** Resource id of the KeyVault containing the key or secret */ + sourceVault: SourceVault; + /** Url pointing to a key or secret in KeyVault */ + keyUrl: string; +} + +/** Encryption at rest settings for disk or snapshot */ +export interface Encryption { + /** ResourceId of the disk encryption set to use for enabling encryption at rest. */ + diskEncryptionSetId?: string; + /** The type of key used to encrypt the data of the disk. */ + type?: EncryptionType; +} + +export interface ShareInfoElement { /** - * The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is - * currently enabled with managed storage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A relative URI containing the ID of the VM that has the disk attached. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serialConsoleLogBlobUri?: string; + readonly vmUri?: string; +} + +/** Properties of the disk for which update is pending. */ +export interface PropertyUpdatesInProgress { + /** The target performance tier of the disk if a tier change operation is in progress. */ + targetTier?: string; +} + +/** Contains the security related information for the resource. */ +export interface DiskSecurityProfile { + /** Specifies the SecurityType of the VM. Applicable for OS disks only. */ + securityType?: DiskSecurityTypes; +} + +/** Disk update resource. */ +export interface DiskUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. */ + sku?: DiskSku; + /** the Operating System type. */ + osType?: OperatingSystemTypes; + /** If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. */ + diskSizeGB?: number; + /** Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. */ + encryptionSettingsCollection?: EncryptionSettingsCollection; + /** The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. */ + diskIopsReadWrite?: number; + /** The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. */ + diskMBpsReadWrite?: number; + /** The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. */ + diskIopsReadOnly?: number; + /** The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. */ + diskMBpsReadOnly?: number; + /** The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. */ + maxShares?: number; + /** Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. */ + encryption?: Encryption; + /** Policy for accessing the disk via network. */ + networkAccessPolicy?: NetworkAccessPolicy; + /** ARM id of the DiskAccess resource for using private endpoints on disks. */ + diskAccessId?: string; + /** Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. */ + tier?: string; + /** Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. */ + burstingEnabled?: boolean; + /** Purchase plan information to be added on the OS disk */ + purchasePlan?: PurchasePlanAutoGenerated; /** - * The boot diagnostics status information for the VM.

NOTE: It will be set only if - * there are errors encountered in enabling boot diagnostics. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Properties of the disk for which update is pending. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: InstanceViewStatus; + readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; + /** Indicates the OS on a disk supports hibernation. */ + supportsHibernation?: boolean; } -/** - * An interface representing VirtualMachineIdentityUserAssignedIdentitiesValue. - */ -export interface VirtualMachineIdentityUserAssignedIdentitiesValue { +/** The List Disks operation response. */ +export interface DiskList { + /** A list of disks. */ + value: Disk[]; + /** The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks. */ + nextLink?: string; +} + +/** Data used for requesting a SAS. */ +export interface GrantAccessData { + access: AccessLevel; + /** Time duration in seconds until the SAS access expires. */ + durationInSeconds: number; +} + +/** A disk access SAS uri. */ +export interface AccessUri { /** - * The principal id of user assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A SAS uri for accessing a disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly accessSAS?: string; +} + +/** The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot */ +export interface SnapshotSku { + /** The sku name. */ + name?: SnapshotStorageAccountTypes; /** - * The client id of user assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The sku tier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; + readonly tier?: string; } -/** - * Identity for the virtual machine. - */ -export interface VirtualMachineIdentity { +/** Snapshot update resource. */ +export interface SnapshotUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot */ + sku?: SnapshotSku; + /** the Operating System type. */ + osType?: OperatingSystemTypes; + /** If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. */ + diskSizeGB?: number; + /** Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. */ + encryptionSettingsCollection?: EncryptionSettingsCollection; + /** Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. */ + encryption?: Encryption; + /** Policy for accessing the disk via network. */ + networkAccessPolicy?: NetworkAccessPolicy; + /** ARM id of the DiskAccess resource for using private endpoints on disks. */ + diskAccessId?: string; + /** Indicates the OS on a snapshot supports hibernation. */ + supportsHibernation?: boolean; +} + +/** The List Snapshots operation response. */ +export interface SnapshotList { + /** A list of snapshots. */ + value: Snapshot[]; + /** The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. */ + nextLink?: string; +} + +/** The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. */ +export interface EncryptionSetIdentity { + /** The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. */ + type?: DiskEncryptionSetIdentityType; /** - * The principal id of virtual machine identity. This property will only be provided for a system - * assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly principalId?: string; /** - * The tenant id associated with the virtual machine. This property will only be provided for a - * system assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tenantId?: string; - /** - * The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' - * includes both an implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values include: - * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - */ - type?: ResourceIdentityType; - /** - * The list of user identities associated with the Virtual Machine. The user identity dictionary - * key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ - userAssignedIdentities?: { - [propertyName: string]: VirtualMachineIdentityUserAssignedIdentitiesValue; - }; } -/** - * Maintenance Operation Status. - */ -export interface MaintenanceRedeployStatus { - /** - * True, if customer is allowed to perform Maintenance. - */ - isCustomerInitiatedMaintenanceAllowed?: boolean; - /** - * Start Time for the Pre Maintenance Window. - */ - preMaintenanceWindowStartTime?: Date; +/** Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots */ +export interface KeyForDiskEncryptionSet { + /** Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription. */ + sourceVault?: SourceVault; + /** Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value. */ + keyUrl: string; +} + +/** disk encryption set update resource. */ +export interface DiskEncryptionSetUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + /** The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. */ + identity?: EncryptionSetIdentity; + /** The type of key used to encrypt the data of the disk. */ + encryptionType?: DiskEncryptionSetType; + /** Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots */ + activeKey?: KeyForDiskEncryptionSet; + /** Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. */ + rotationToLatestKeyVersionEnabled?: boolean; +} + +/** The List disk encryption set operation response. */ +export interface DiskEncryptionSetList { + /** A list of disk encryption sets. */ + value: DiskEncryptionSet[]; + /** The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets. */ + nextLink?: string; +} + +/** The List resources which are encrypted with the disk encryption set. */ +export interface ResourceUriList { + /** A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set. */ + value: string[]; + /** The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources. */ + nextLink?: string; +} + +/** The Private Endpoint Connection resource. */ +export interface PrivateEndpointConnection { /** - * End Time for the Pre Maintenance Window. + * private endpoint connection Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - preMaintenanceWindowEndTime?: Date; + readonly id?: string; /** - * Start Time for the Maintenance Window. + * private endpoint connection name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maintenanceWindowStartTime?: Date; + readonly name?: string; /** - * End Time for the Maintenance Window. + * private endpoint connection type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maintenanceWindowEndTime?: Date; + readonly type?: string; /** - * The Last Maintenance Operation Result Code. Possible values include: 'None', 'RetryLater', - * 'MaintenanceAborted', 'MaintenanceCompleted' + * The resource of private end point. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastOperationResultCode?: MaintenanceOperationResultCodeTypes; + readonly privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between DiskAccess and Virtual Network. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; /** - * Message returned for the last Maintenance Operation. + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastOperationMessage?: string; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; } -/** - * The health status of the VM. - */ -export interface VirtualMachineHealthStatus { +/** The Private Endpoint resource. */ +export interface PrivateEndpoint { /** - * The health status information for the VM. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: InstanceViewStatus; + readonly id?: string; } -/** - * Describes the properties of an virtual machine instance view for available patch summary. - */ -export interface AvailablePatchSummary { +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + +/** Used for updating a disk access resource. */ +export interface DiskAccessUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** The List disk access operation response. */ +export interface DiskAccessList { + /** A list of disk access resources. */ + value: DiskAccess[]; + /** The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources. */ + nextLink?: string; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; +} + +/** A private link resource */ +export interface PrivateLinkResource { /** - * The overall success or failure status of the operation. It remains "InProgress" until the - * operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or - * "CompletedWithWarnings.". Possible values include: 'Unknown', 'InProgress', 'Failed', - * 'Succeeded', 'CompletedWithWarnings' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * private link resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: PatchOperationStatus; + readonly id?: string; /** - * The activity ID of the operation that produced this result. It is used to correlate across CRP - * and extension logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * private link resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly assessmentActivityId?: string; + readonly name?: string; /** - * The overall reboot status of the VM. It will be true when partially installed patches require - * a reboot to complete installation but the reboot has not yet occurred. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * private link resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly rebootPending?: boolean; + readonly type?: string; /** - * The number of critical or security patches that have been detected as available and not yet - * installed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly criticalAndSecurityPatchCount?: number; + readonly groupId?: string; /** - * The number of all available patches excluding critical and security. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly otherPatchCount?: number; + readonly requiredMembers?: string[]; + /** The private link resource DNS zone name. */ + requiredZoneNames?: string[]; +} + +/** A list of private link resources */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; + /** The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots. */ + nextLink?: string; +} + +/** The ProxyOnly Resource model definition. */ +export interface ProxyOnlyResource { /** - * The UTC timestamp when the operation began. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly id?: string; /** - * The UTC timestamp when the operation began. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastModifiedTime?: Date; + readonly name?: string; /** - * The errors that were encountered during execution of the operation. The details array contains - * the list of them. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly error?: ApiError; + readonly type?: string; } -/** - * Describes the properties of the last installed patch summary. - */ -export interface LastPatchInstallationSummary { - /** - * The overall success or failure status of the operation. It remains "InProgress" until the - * operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or - * "CompletedWithWarnings.". Possible values include: 'Unknown', 'InProgress', 'Failed', - * 'Succeeded', 'CompletedWithWarnings' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: PatchOperationStatus; - /** - * The activity ID of the operation that produced this result. It is used to correlate across CRP - * and extension logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly installationActivityId?: string; +/** The List Disk Restore Points operation response. */ +export interface DiskRestorePointList { + /** A list of disk restore points. */ + value: DiskRestorePoint[]; + /** The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points. */ + nextLink?: string; +} + +/** Describes the gallery unique name. */ +export interface GalleryIdentifier { /** - * Describes whether the operation ran out of time before it completed all its intended actions - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The unique name of the Shared Image Gallery. This name is generated automatically by Azure. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maintenanceWindowExceeded?: boolean; + readonly uniqueName?: string; +} + +/** Profile for gallery sharing to subscription or tenant */ +export interface SharingProfile { + /** This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups** */ + permissions?: GallerySharingPermissionTypes; /** - * The number of all available patches but not going to be installed because it didn't match a - * classification or inclusion list entry. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A list of sharing profile groups. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly notSelectedPatchCount?: number; + readonly groups?: SharingProfileGroup[]; +} + +/** Group of the gallery sharing profile */ +export interface SharingProfileGroup { + /** This property allows you to specify the type of sharing group.

Possible values are:

**Subscriptions**

**AADTenants** */ + type?: SharingProfileGroupTypes; + /** A list of subscription/tenant ids the gallery is aimed to be shared to. */ + ids?: string[]; +} + +/** The Update Resource model definition. */ +export interface UpdateResourceDefinition { /** - * The number of all available patches but excluded explicitly by a customer-specified exclusion - * list match. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly excludedPatchCount?: number; + readonly id?: string; /** - * The number of all available patches expected to be installed over the course of the patch - * installation operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly pendingPatchCount?: number; + readonly name?: string; /** - * The count of patches that successfully installed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly installedPatchCount?: number; + readonly type?: string; + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** This is the gallery image definition identifier. */ +export interface GalleryImageIdentifier { + /** The name of the gallery image definition publisher. */ + publisher: string; + /** The name of the gallery image definition offer. */ + offer: string; + /** The name of the gallery image definition SKU. */ + sku: string; +} + +/** The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. */ +export interface RecommendedMachineConfiguration { + /** Describes the resource range. */ + vCPUs?: ResourceRange; + /** Describes the resource range. */ + memory?: ResourceRange; +} + +/** Describes the resource range. */ +export interface ResourceRange { + /** The minimum number of the resource. */ + min?: number; + /** The maximum number of the resource. */ + max?: number; +} + +/** Describes the disallowed disk types. */ +export interface Disallowed { + /** A list of disk types. */ + diskTypes?: string[]; +} + +/** Describes the gallery image definition purchase plan. This is used by marketplace images. */ +export interface ImagePurchasePlan { + /** The plan ID. */ + name?: string; + /** The publisher ID. */ + publisher?: string; + /** The product ID. */ + product?: string; +} + +/** A feature for gallery image. */ +export interface GalleryImageFeature { + /** The name of the gallery image feature. */ + name?: string; + /** The value of the gallery image feature. */ + value?: string; +} + +/** Describes the basic gallery artifact publishing profile. */ +export interface GalleryArtifactPublishingProfileBase { + /** The target regions where the Image Version is going to be replicated to. This property is updatable. */ + targetRegions?: TargetRegion[]; + /** The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. */ + replicaCount?: number; + /** If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. */ + excludeFromLatest?: boolean; /** - * The count of patches that failed installation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The timestamp for when the gallery image version is published. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly failedPatchCount?: number; + readonly publishedDate?: Date; + /** The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; + /** Specifies the storage account type to be used to store the image. This property is not updatable. */ + storageAccountType?: StorageAccountType; +} + +/** Describes the target region information. */ +export interface TargetRegion { + /** The name of the region. */ + name: string; + /** The number of replicas of the Image Version to be created per region. This property is updatable. */ + regionalReplicaCount?: number; + /** Specifies the storage account type to be used to store the image. This property is not updatable. */ + storageAccountType?: StorageAccountType; + /** Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. */ + encryption?: EncryptionImages; +} + +/** Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. */ +export interface EncryptionImages { + /** Contains encryption settings for an OS disk image. */ + osDiskImage?: OSDiskImageEncryption; + /** A list of encryption specifications for data disk images. */ + dataDiskImages?: DataDiskImageEncryption[]; +} + +/** This is the disk image encryption base class. */ +export interface DiskImageEncryption { + /** A relative URI containing the resource ID of the disk encryption set. */ + diskEncryptionSetId?: string; +} + +/** This is the storage profile of a Gallery Image Version. */ +export interface GalleryImageVersionStorageProfile { + /** The gallery artifact version source. */ + source?: GalleryArtifactVersionSource; + /** This is the OS disk image. */ + osDiskImage?: GalleryOSDiskImage; + /** A list of data disk images. */ + dataDiskImages?: GalleryDataDiskImage[]; +} + +/** The gallery artifact version source. */ +export interface GalleryArtifactVersionSource { + /** The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. */ + id?: string; + /** The uri of the gallery artifact version source. Currently used to specify vhd/blob source. */ + uri?: string; +} + +/** This is the disk image base class. */ +export interface GalleryDiskImage { /** - * The UTC timestamp when the operation began. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * This property indicates the size of the VHD to be created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly sizeInGB?: number; + /** The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' */ + hostCaching?: HostCaching; + /** The gallery artifact version source. */ + source?: GalleryArtifactVersionSource; +} + +/** This is the replication status of the gallery image version. */ +export interface ReplicationStatus { /** - * The UTC timestamp when the operation began. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * This is the aggregated replication status based on all the regional replication status flags. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastModifiedTime?: Date; + readonly aggregatedState?: AggregatedReplicationState; /** - * The errors that were encountered during execution of the operation. The details array contains - * the list of them. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * This is a summary of replication status for each region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly error?: ApiError; + readonly summary?: RegionalReplicationStatus[]; } -/** - * The status of virtual machine patch operations. - */ -export interface VirtualMachinePatchStatus { +/** This is the regional replication status. */ +export interface RegionalReplicationStatus { /** - * The available patch summary of the latest assessment operation for the virtual machine. + * The region to which the gallery image version is being replicated to. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - availablePatchSummary?: AvailablePatchSummary; + readonly region?: string; /** - * The installation summary of the latest installation operation for the virtual machine. + * This is the regional replication state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastPatchInstallationSummary?: LastPatchInstallationSummary; + readonly state?: ReplicationState; /** - * The enablement status of the specified patchMode - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The details of the replication status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly configurationStatuses?: InstanceViewStatus[]; + readonly details?: string; + /** + * It indicates progress of the replication job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly progress?: number; } -/** - * The instance view of a virtual machine. - */ -export interface VirtualMachineInstanceView { +/** The source image from which the Image Version is going to be created. */ +export interface UserArtifactSource { + /** Required. The mediaLink of the artifact, must be a readable storage page blob. */ + mediaLink: string; + /** Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. */ + defaultConfigurationLink?: string; +} + +export interface UserArtifactManage { + /** Required. The path and arguments to install the gallery application. This is limited to 4096 characters. */ + install: string; + /** Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. */ + remove: string; + /** Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. */ + update?: string; +} + +/** The List Galleries operation response. */ +export interface GalleryList { + /** A list of galleries. */ + value: Gallery[]; + /** The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries. */ + nextLink?: string; +} + +/** The List Gallery Images operation response. */ +export interface GalleryImageList { + /** A list of Shared Image Gallery images. */ + value: GalleryImage[]; + /** The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery image definitions. */ + nextLink?: string; +} + +/** The List Gallery Image version operation response. */ +export interface GalleryImageVersionList { + /** A list of gallery image versions. */ + value: GalleryImageVersion[]; + /** The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image versions. */ + nextLink?: string; +} + +/** The List Gallery Applications operation response. */ +export interface GalleryApplicationList { + /** A list of Gallery Applications. */ + value: GalleryApplication[]; + /** The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions. */ + nextLink?: string; +} + +/** The List Gallery Application version operation response. */ +export interface GalleryApplicationVersionList { + /** A list of gallery Application Versions. */ + value: GalleryApplicationVersion[]; + /** The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions. */ + nextLink?: string; +} + +/** Specifies information about the gallery sharing profile update. */ +export interface SharingUpdate { + /** This property allows you to specify the operation type of gallery sharing update.

Possible values are:

**Add**

**Remove**

**Reset** */ + operationType: SharingUpdateOperationTypes; + /** A list of sharing profile groups. */ + groups?: SharingProfileGroup[]; +} + +/** The List Shared Galleries operation response. */ +export interface SharedGalleryList { + /** A list of shared galleries. */ + value: SharedGallery[]; + /** The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the next page of shared galleries. */ + nextLink?: string; +} + +/** The Resource model definition. */ +export interface PirResource { /** - * Specifies the update domain of the virtual machine. + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformUpdateDomain?: number; + readonly name?: string; /** - * Specifies the fault domain of the virtual machine. + * Resource location + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformFaultDomain?: number; + readonly location?: string; +} + +/** The List Shared Gallery Images operation response. */ +export interface SharedGalleryImageList { + /** A list of shared gallery images. */ + value: SharedGalleryImage[]; + /** The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch the next page of shared gallery images. */ + nextLink?: string; +} + +/** The List Shared Gallery Image versions operation response. */ +export interface SharedGalleryImageVersionList { + /** A list of shared gallery images versions. */ + value: SharedGalleryImageVersion[]; + /** The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to fetch the next page of shared gallery image versions. */ + nextLink?: string; +} + +export interface RoleInstance { /** - * The computer name assigned to the virtual machine. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - computerName?: string; + readonly id?: string; /** - * The Operating System running on the virtual machine. + * Resource Name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osName?: string; + readonly name?: string; /** - * The version of Operating System running on the virtual machine. + * Resource Type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osVersion?: string; + readonly type?: string; /** - * Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'V1', - * 'V2' + * Resource Location. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hyperVGeneration?: HyperVGenerationType; + readonly location?: string; /** - * The Remote desktop certificate thumbprint. + * Resource tags. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - rdpThumbPrint?: string; + readonly tags?: { [propertyName: string]: string }; + sku?: InstanceSku; + properties?: RoleInstanceProperties; +} + +export interface InstanceSku { /** - * The VM Agent running on the virtual machine. + * The sku name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - vmAgent?: VirtualMachineAgentInstanceView; + readonly name?: string; /** - * The Maintenance Operation status on the virtual machine. + * The tier of the cloud service role instance. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maintenanceRedeployStatus?: MaintenanceRedeployStatus; + readonly tier?: string; +} + +export interface RoleInstanceProperties { + /** Describes the network profile for the role instance. */ + networkProfile?: RoleInstanceNetworkProfile; + /** The instance view of the role instance. */ + instanceView?: RoleInstanceView; +} + +/** Describes the network profile for the role instance. */ +export interface RoleInstanceNetworkProfile { /** - * The virtual machine disk information. + * Specifies the list of resource Ids for the network interfaces associated with the role instance. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - disks?: DiskInstanceView[]; + readonly networkInterfaces?: SubResource[]; +} + +/** The instance view of the role instance. */ +export interface RoleInstanceView { /** - * The extensions information. + * The Update Domain. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - extensions?: VirtualMachineExtensionInstanceView[]; + readonly platformUpdateDomain?: number; /** - * The health status for the VM. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Fault Domain. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmHealth?: VirtualMachineHealthStatus; + readonly platformFaultDomain?: number; /** - * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot - * to diagnose VM status.

You can easily view the output of your console log.

- * Azure also enables you to see a screenshot of the VM from the hypervisor. + * Specifies a unique identifier generated internally for the cloud service associated with this role instance.

NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - bootDiagnostics?: BootDiagnosticsInstanceView; + readonly privateId?: string; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly statuses?: ResourceInstanceViewStatus[]; +} + +/** Instance view status. */ +export interface ResourceInstanceViewStatus { /** - * Resource id of the dedicated host, on which the virtual machine is allocated through automatic - * placement, when the virtual machine is associated with a dedicated host group that has - * automatic placement enabled.

Minimum api-version: 2020-06-01. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The status code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly assignedHost?: string; + readonly code?: string; /** - * The resource status information. + * The short localizable label for the status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - statuses?: InstanceViewStatus[]; + readonly displayStatus?: string; /** - * [Preview Feature] The status of virtual machine patch operations. + * The detailed status message, including for alerts and error messages. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - patchStatus?: VirtualMachinePatchStatus; -} - -/** - * An interface representing TerminateNotificationProfile. - */ -export interface TerminateNotificationProfile { - /** - * Configurable length of time a Virtual Machine being deleted will have to potentially approve - * the Terminate Scheduled Event before the event is auto approved (timed out). The configuration - * must be specified in ISO 8601 format, the default value is 5 minutes (PT5M) - */ - notBeforeTimeout?: string; + readonly message?: string; /** - * Specifies whether the Terminate Scheduled event is enabled or disabled. + * The time of the status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enable?: boolean; + readonly time?: Date; + /** The level code. */ + level?: StatusLevelTypes; } -/** - * An interface representing ScheduledEventsProfile. - */ -export interface ScheduledEventsProfile { - /** - * Specifies Terminate Scheduled Event related configurations. - */ - terminateNotificationProfile?: TerminateNotificationProfile; +export interface RoleInstanceListResult { + value: RoleInstance[]; + nextLink?: string; } -/** - * Describes a Virtual Machine. - */ -export interface VirtualMachine extends Resource { +/** Describes a role of the cloud service. */ +export interface CloudServiceRole { /** - * Specifies information about the marketplace image used to create the virtual machine. This - * element is only used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, find the - * marketplace image that you want to use and then click **Want to deploy programmatically, Get - * Started ->**. Enter any required information and then click **Save**. + * Resource id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - plan?: Plan; + readonly id?: string; /** - * Specifies the hardware settings for the virtual machine. + * Resource name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hardwareProfile?: HardwareProfile; + readonly name?: string; /** - * Specifies the storage settings for the virtual machine disks. + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageProfile?: StorageProfile; + readonly type?: string; /** - * Specifies additional capabilities enabled or disabled on the virtual machine. + * Resource location + * NOTE: This property will not be serialized. It can only be populated by the server. */ - additionalCapabilities?: AdditionalCapabilities; + readonly location?: string; + /** Describes the cloud service role sku. */ + sku?: CloudServiceRoleSku; + properties?: CloudServiceRoleProperties; +} + +/** Describes the cloud service role sku. */ +export interface CloudServiceRoleSku { + /** The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku. */ + name?: string; + /** Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic** */ + tier?: string; + /** Specifies the number of role instances in the cloud service. */ + capacity?: number; +} + +export interface CloudServiceRoleProperties { /** - * Specifies the operating system settings used while creating the virtual machine. Some of the - * settings cannot be changed once VM is provisioned. + * Specifies the ID which uniquely identifies a cloud service role. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osProfile?: OSProfile; + readonly uniqueId?: string; +} + +export interface CloudServiceRoleListResult { + value: CloudServiceRole[]; + nextLink?: string; +} + +/** Describes the cloud service. */ +export interface CloudService { /** - * Specifies the network interfaces of the virtual machine. + * Resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - networkProfile?: NetworkProfile; + readonly id?: string; /** - * Specifies the Security related profile settings for the virtual machine. + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - securityProfile?: SecurityProfile; + readonly name?: string; /** - * Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diagnosticsProfile?: DiagnosticsProfile; + readonly type?: string; + /** Resource location. */ + location: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Cloud service properties */ + properties?: CloudServiceProperties; +} + +/** Cloud service properties */ +export interface CloudServiceProperties { /** - * Specifies information about the availability set that the virtual machine should be assigned - * to. Virtual machines specified in the same availability set are allocated to different nodes - * to maximize availability. For more information about availability sets, see [Availability sets - * overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). - *

For more information on Azure planned maintenance, see [Maintenance and updates for - * Virtual Machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

- * Currently, a VM can only be added to availability set at creation time. The availability set - * to which the VM is being added should be under the same resource group as the availability set - * resource. An existing VM cannot be added to an availability set.

This property cannot - * exist along with a non-null properties.virtualMachineScaleSet reference. + * Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + * This is a write-only property and is not returned in GET calls. */ - availabilitySet?: SubResource; + packageUrl?: string; + /** Specifies the XML service configuration (.cscfg) for the cloud service. */ + configuration?: string; /** - * Specifies information about the virtual machine scale set that the virtual machine should be - * assigned to. Virtual machines specified in the same virtual machine scale set are allocated to - * different nodes to maximize availability. Currently, a VM can only be added to virtual machine - * scale set at creation time. An existing VM cannot be added to a virtual machine scale set. - *

This property cannot exist along with a non-null properties.availabilitySet reference. - *

Minimum api‐version: 2019‐03‐01 + * Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + * This is a write-only property and is not returned in GET calls. */ - virtualMachineScaleSet?: SubResource; + configurationUrl?: string; /** - * Specifies information about the proximity placement group that the virtual machine should be - * assigned to.

Minimum api-version: 2018-04-01. + * (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. + * If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. */ - proximityPlacementGroup?: SubResource; + startCloudService?: boolean; /** - * Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. - * Possible values include: 'Regular', 'Low', 'Spot' + * (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. + * The default value is `false`. */ - priority?: VirtualMachinePriorityTypes; + allowModelOverride?: boolean; /** - * Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. - *

For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the - * minimum api-version is 2019-03-01.

For Azure Spot scale sets, both 'Deallocate' and - * 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values - * include: 'Deallocate', 'Delete' + * Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. + * Possible Values are

**Auto**

**Manual**

**Simultaneous**

+ * If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. */ - evictionPolicy?: VirtualMachineEvictionPolicyTypes; + upgradeMode?: CloudServiceUpgradeMode; + /** Describes the role profile for the cloud service. */ + roleProfile?: CloudServiceRoleProfile; + /** Describes the OS profile for the cloud service. */ + osProfile?: CloudServiceOsProfile; + /** Network Profile for the cloud service. */ + networkProfile?: CloudServiceNetworkProfile; + /** Describes a cloud service extension profile. */ + extensionProfile?: CloudServiceExtensionProfile; /** - * Specifies the billing related details of a Azure Spot virtual machine.

Minimum - * api-version: 2019-03-01. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - billingProfile?: BillingProfile; + readonly provisioningState?: string; /** - * Specifies information about the dedicated host that the virtual machine resides in. - *

Minimum api-version: 2018-10-01. + * The unique identifier for the cloud service. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - host?: SubResource; + readonly uniqueId?: string; +} + +/** Describes the role profile for the cloud service. */ +export interface CloudServiceRoleProfile { + /** List of roles for the cloud service. */ + roles?: CloudServiceRoleProfileProperties[]; +} + +/** Describes the role properties. */ +export interface CloudServiceRoleProfileProperties { + /** Resource name. */ + name?: string; + /** Describes the cloud service role sku. */ + sku?: CloudServiceRoleSku; +} + +/** Describes the OS profile for the cloud service. */ +export interface CloudServiceOsProfile { + /** Specifies set of certificates that should be installed onto the role instances. */ + secrets?: CloudServiceVaultSecretGroup[]; +} + +/** Describes a set of certificates which are all in the same Key Vault. */ +export interface CloudServiceVaultSecretGroup { + /** The relative URL of the Key Vault containing all of the certificates in VaultCertificates. */ + sourceVault?: SubResource; + /** The list of key vault references in SourceVault which contain certificates. */ + vaultCertificates?: CloudServiceVaultCertificate[]; +} + +/** Describes a single certificate reference in a Key Vault, and where the certificate should reside on the role instance. */ +export interface CloudServiceVaultCertificate { + /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. */ + certificateUrl?: string; +} + +/** Network Profile for the cloud service. */ +export interface CloudServiceNetworkProfile { + /** List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. */ + loadBalancerConfigurations?: LoadBalancerConfiguration[]; + /** The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. */ + swappableCloudService?: SubResource; +} + +/** Describes the load balancer configuration. */ +export interface LoadBalancerConfiguration { + /** Resource Id */ + id?: string; + /** The name of the Load balancer */ + name: string; + /** Properties of the load balancer configuration. */ + properties: LoadBalancerConfigurationProperties; +} + +export interface LoadBalancerConfigurationProperties { + /** Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. */ + frontendIPConfigurations: LoadBalancerFrontendIPConfiguration[]; +} + +export interface LoadBalancerFrontendIPConfiguration { + /** The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. */ + name: string; + /** Properties of load balancer frontend ip configuration. */ + properties: LoadBalancerFrontendIPConfigurationProperties; +} + +/** Describes a cloud service IP Configuration */ +export interface LoadBalancerFrontendIPConfigurationProperties { + /** The reference to the public ip address resource. */ + publicIPAddress?: SubResource; + /** The reference to the virtual network subnet resource. */ + subnet?: SubResource; + /** The virtual network private IP address of the IP configuration. */ + privateIPAddress?: string; +} + +/** Describes a cloud service extension profile. */ +export interface CloudServiceExtensionProfile { + /** List of extensions for the cloud service. */ + extensions?: Extension[]; +} + +/** Describes a cloud service Extension. */ +export interface Extension { + /** The name of the extension. */ + name?: string; + /** Extension Properties. */ + properties?: CloudServiceExtensionProperties; +} + +/** Extension Properties. */ +export interface CloudServiceExtensionProperties { + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension. */ + type?: string; + /** Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. */ + typeHandlerVersion?: string; + /** Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. */ + autoUpgradeMinorVersion?: boolean; + /** Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. */ + settings?: string; + /** Protected settings for the extension which are encrypted before sent to the role instance. */ + protectedSettings?: string; + protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; /** - * Specifies information about the dedicated host group that the virtual machine resides in. - *

Minimum api-version: 2020-06-01.

NOTE: User cannot specify both host and - * hostGroup properties. + * Tag to force apply the provided public and protected settings. + * Changing the tag value allows for re-running the extension without changing any of the public or protected settings. + * If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. + * If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and + * it is up to handler implementation whether to re-run it or not */ - hostGroup?: SubResource; + forceUpdateTag?: string; /** * The provisioning state, which only appears in the response. - * **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 provisioningState?: string; + /** Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. */ + rolesAppliedTo?: string[]; +} + +export interface CloudServiceVaultAndSecretReference { + sourceVault?: SubResource; + secretUrl?: string; +} + +export interface CloudServiceUpdate { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** InstanceView of CloudService as a whole */ +export interface CloudServiceInstanceView { + /** Instance view statuses. */ + roleInstance?: InstanceViewStatusesSummary; /** - * The virtual machine instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instanceView?: VirtualMachineInstanceView; - /** - * Specifies that the image or disk that is being used was licensed on-premises.

- * Possible values for Windows Server operating system are:

Windows_Client

- * Windows_Server

Possible values for Linux Server operating system are:

- * RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure - * Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) - *

[Azure Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) - *

Minimum api-version: 2015-06-15 + * The version of the SDK that was used to generate the package for the cloud service. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - licenseType?: string; + readonly sdkVersion?: string; /** - * Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all - * Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Specifies a list of unique identifiers generated internally for the cloud service.

NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmId?: string; + readonly privateIds?: string[]; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly statuses?: ResourceInstanceViewStatus[]; +} + +/** Instance view statuses. */ +export interface InstanceViewStatusesSummary { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly statusesSummary?: StatusCodeCount[]; +} + +export interface StatusCodeCount { /** - * Specifies the time alloted for all extensions to start. The time duration should be between 15 - * minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default - * value is 90 minutes (PT1H30M).

Minimum api-version: 2020-06-01 + * The instance view status code + * NOTE: This property will not be serialized. It can only be populated by the server. */ - extensionsTimeBudget?: string; + readonly code?: string; /** - * Specifies the scale set logical fault domain into which the Virtual Machine will be created. - * By default, the Virtual Machine will by automatically assigned to a fault domain that best - * maintains balance across available fault domains.
  • This is applicable only if the - * 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale - * Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot - * be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in - * the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 + * Number of instances having this status code + * NOTE: This property will not be serialized. It can only be populated by the server. */ - platformFaultDomain?: number; + readonly count?: number; +} + +export interface CloudServiceListResult { + value: CloudService[]; + nextLink?: string; +} + +/** Specifies a list of role instances from the cloud service. */ +export interface RoleInstances { + /** List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service. */ + roleInstances: string[]; +} + +/** Defines an update domain for the cloud service. */ +export interface UpdateDomain { /** - * Specifies Scheduled Event related configurations. + * Resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - scheduledEventsProfile?: ScheduledEventsProfile; + readonly id?: string; /** - * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in - * here.

    Minimum api-version: 2021-03-01 + * Resource Name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - userData?: string; + readonly name?: string; +} + +export interface UpdateDomainListResult { + value: UpdateDomain[]; + nextLink?: string; +} + +/** Describes a cloud service OS version. */ +export interface OSVersion { /** - * The virtual machine child extension resources. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resources?: VirtualMachineExtension[]; + readonly id?: string; /** - * The identity of the virtual machine, if configured. + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - identity?: VirtualMachineIdentity; + readonly name?: string; /** - * The virtual machine zones. + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zones?: string[]; + readonly type?: string; /** - * The extended location of the Virtual Machine. + * Resource location. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - extendedLocation?: ExtendedLocation; + readonly location?: string; + /** OS version properties. */ + properties?: OSVersionProperties; } -/** - * Describes a Virtual Machine Update. - */ -export interface VirtualMachineUpdate extends UpdateResource { +/** OS version properties. */ +export interface OSVersionProperties { /** - * Specifies information about the marketplace image used to create the virtual machine. This - * element is only used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, find the - * marketplace image that you want to use and then click **Want to deploy programmatically, Get - * Started ->**. Enter any required information and then click **Save**. + * The family of this OS version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - plan?: Plan; + readonly family?: string; /** - * Specifies the hardware settings for the virtual machine. + * The family label of this OS version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hardwareProfile?: HardwareProfile; + readonly familyLabel?: string; /** - * Specifies the storage settings for the virtual machine disks. + * The OS version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageProfile?: StorageProfile; + readonly version?: string; /** - * Specifies additional capabilities enabled or disabled on the virtual machine. + * The OS version label. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - additionalCapabilities?: AdditionalCapabilities; + readonly label?: string; /** - * Specifies the operating system settings used while creating the virtual machine. Some of the - * settings cannot be changed once VM is provisioned. + * Specifies whether this is the default OS version for its family. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osProfile?: OSProfile; + readonly isDefault?: boolean; /** - * Specifies the network interfaces of the virtual machine. + * Specifies whether this OS version is active. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - networkProfile?: NetworkProfile; + readonly isActive?: boolean; +} + +export interface OSVersionListResult { + value: OSVersion[]; + nextLink?: string; +} + +/** Describes a cloud service OS family. */ +export interface OSFamily { /** - * Specifies the Security related profile settings for the virtual machine. + * Resource Id. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - securityProfile?: SecurityProfile; + readonly id?: string; /** - * Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diagnosticsProfile?: DiagnosticsProfile; + readonly name?: string; /** - * Specifies information about the availability set that the virtual machine should be assigned - * to. Virtual machines specified in the same availability set are allocated to different nodes - * to maximize availability. For more information about availability sets, see [Availability sets - * overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). - *

    For more information on Azure planned maintenance, see [Maintenance and updates for - * Virtual Machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    - * Currently, a VM can only be added to availability set at creation time. The availability set - * to which the VM is being added should be under the same resource group as the availability set - * resource. An existing VM cannot be added to an availability set.

    This property cannot - * exist along with a non-null properties.virtualMachineScaleSet reference. + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - availabilitySet?: SubResource; + readonly type?: string; /** - * Specifies information about the virtual machine scale set that the virtual machine should be - * assigned to. Virtual machines specified in the same virtual machine scale set are allocated to - * different nodes to maximize availability. Currently, a VM can only be added to virtual machine - * scale set at creation time. An existing VM cannot be added to a virtual machine scale set. - *

    This property cannot exist along with a non-null properties.availabilitySet reference. - *

    Minimum api‐version: 2019‐03‐01 + * Resource location. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - virtualMachineScaleSet?: SubResource; + readonly location?: string; + /** OS family properties. */ + properties?: OSFamilyProperties; +} + +/** OS family properties. */ +export interface OSFamilyProperties { /** - * Specifies information about the proximity placement group that the virtual machine should be - * assigned to.

    Minimum api-version: 2018-04-01. + * The OS family name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - proximityPlacementGroup?: SubResource; + readonly name?: string; /** - * Specifies the priority for the virtual machine.

    Minimum api-version: 2019-03-01. - * Possible values include: 'Regular', 'Low', 'Spot' + * The OS family label. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - priority?: VirtualMachinePriorityTypes; + readonly label?: string; /** - * Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. - *

    For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the - * minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and - * 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values - * include: 'Deallocate', 'Delete' + * List of OS versions belonging to this family. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - evictionPolicy?: VirtualMachineEvictionPolicyTypes; + readonly versions?: OSVersionPropertiesBase[]; +} + +/** Configuration view of an OS version. */ +export interface OSVersionPropertiesBase { /** - * Specifies the billing related details of a Azure Spot virtual machine.

    Minimum - * api-version: 2019-03-01. + * The OS version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - billingProfile?: BillingProfile; + readonly version?: string; /** - * Specifies information about the dedicated host that the virtual machine resides in. - *

    Minimum api-version: 2018-10-01. + * The OS version label. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - host?: SubResource; + readonly label?: string; /** - * Specifies information about the dedicated host group that the virtual machine resides in. - *

    Minimum api-version: 2020-06-01.

    NOTE: User cannot specify both host and - * hostGroup properties. + * Specifies whether this is the default OS version for its family. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hostGroup?: SubResource; + readonly isDefault?: boolean; /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Specifies whether this OS version is active. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly isActive?: boolean; +} + +export interface OSFamilyListResult { + value: OSFamily[]; + nextLink?: string; +} + +/** The source image from which the Image Version is going to be created. */ +export interface GalleryArtifactSource { + /** The managed artifact. */ + managedImage: ManagedArtifact; +} + +/** The managed artifact. */ +export interface ManagedArtifact { + /** The managed artifact id. */ + id: string; +} + +/** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. */ +export type AvailabilitySet = Resource & { + /** Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. */ + sku?: Sku; + /** Update Domain count. */ + platformUpdateDomainCount?: number; + /** Fault Domain count. */ + platformFaultDomainCount?: number; + /** A list of references to all virtual machines in the availability set. */ + virtualMachines?: SubResource[]; + /** Specifies information about the proximity placement group that the availability set should be assigned to.

    Minimum api-version: 2018-04-01. */ + proximityPlacementGroup?: SubResource; /** - * The virtual machine instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The resource status information. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceView?: VirtualMachineInstanceView; + readonly statuses?: InstanceViewStatus[]; +}; + +/** Specifies information about the proximity placement group. */ +export type ProximityPlacementGroup = Resource & { + /** Specifies the type of the proximity placement group.

    Possible values are:

    **Standard** : Co-locate resources within an Azure region or Availability Zone.

    **Ultra** : For future use. */ + proximityPlacementGroupType?: ProximityPlacementGroupType; /** - * Specifies that the image or disk that is being used was licensed on-premises.

    - * Possible values for Windows Server operating system are:

    Windows_Client

    - * Windows_Server

    Possible values for Linux Server operating system are:

    - * RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure - * Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) - *

    [Azure Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) - *

    Minimum api-version: 2015-06-15 + * A list of references to all virtual machines in the proximity placement group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - licenseType?: string; + readonly virtualMachines?: SubResourceWithColocationStatus[]; /** - * Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all - * Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A list of references to all virtual machine scale sets in the proximity placement group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly vmId?: string; + readonly virtualMachineScaleSets?: SubResourceWithColocationStatus[]; /** - * Specifies the time alloted for all extensions to start. The time duration should be between 15 - * minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default - * value is 90 minutes (PT1H30M).

    Minimum api-version: 2020-06-01 + * A list of references to all availability sets in the proximity placement group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - extensionsTimeBudget?: string; + readonly availabilitySets?: SubResourceWithColocationStatus[]; + /** Describes colocation status of the Proximity Placement Group. */ + colocationStatus?: InstanceViewStatus; +}; + +/** Specifies information about the dedicated host group that the dedicated hosts should be assigned to.

    Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. */ +export type DedicatedHostGroup = Resource & { + /** Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. */ + zones?: string[]; + /** Number of fault domains that the host group can span. */ + platformFaultDomainCount?: number; + /** + * A list of references to all dedicated hosts in the dedicated host group. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hosts?: SubResourceReadOnly[]; /** - * Specifies the scale set logical fault domain into which the Virtual Machine will be created. - * By default, the Virtual Machine will by automatically assigned to a fault domain that best - * maintains balance across available fault domains.
  • This is applicable only if the - * 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale - * Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot - * be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in - * the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 + * The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly instanceView?: DedicatedHostGroupInstanceView; + /** Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.

    Minimum api-version: 2020-06-01. */ + supportAutomaticPlacement?: boolean; +}; + +/** Specifies information about the Dedicated host. */ +export type DedicatedHost = Resource & { + /** SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. */ + sku: Sku; + /** Fault domain of the dedicated host within a dedicated host group. */ platformFaultDomain?: number; + /** Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. */ + autoReplaceOnFailure?: boolean; /** - * Specifies Scheduled Event related configurations. + * A unique id generated and assigned to the dedicated host by the platform.

    Does not change throughout the lifetime of the host. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - scheduledEventsProfile?: ScheduledEventsProfile; + readonly hostId?: string; /** - * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in - * here.

    Minimum api-version: 2021-03-01 + * A list of references to all virtual machines in the Dedicated Host. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - userData?: string; + readonly virtualMachines?: SubResourceReadOnly[]; + /** Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

    Possible values are:

    **None**

    **Windows_Server_Hybrid**

    **Windows_Server_Perpetual**

    Default: **None** */ + licenseType?: DedicatedHostLicenseTypes; /** - * The identity of the virtual machine, if configured. + * The date when the host was first provisioned. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - identity?: VirtualMachineIdentity; + readonly provisioningTime?: Date; /** - * The virtual machine zones. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zones?: string[]; -} - -/** - * The configuration parameters used for performing automatic OS upgrade. - */ -export interface AutomaticOSUpgradePolicy { + readonly provisioningState?: string; /** - * Indicates whether OS upgrades should automatically be applied to scale set instances in a - * rolling fashion when a newer version of the OS image becomes available. Default value is - * false.

    If this is set to true for Windows based scale sets, - * [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) - * is automatically set to false and cannot be set to true. + * The dedicated host instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableAutomaticOSUpgrade?: boolean; + readonly instanceView?: DedicatedHostInstanceView; +}; + +/** Specifies information about the SSH public key. */ +export type SshPublicKeyResource = Resource & { + /** SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. */ + publicKey?: string; +}; + +/** Describes a Virtual Machine Extension Image. */ +export type VirtualMachineExtensionImage = Resource & { + /** The operating system this extension supports. */ + operatingSystem?: string; + /** The type of role (IaaS or PaaS) this extension supports. */ + computeRole?: string; + /** The schema defined by publisher, where extension consumers should provide settings in a matching schema. */ + handlerSchema?: string; + /** Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. */ + vmScaleSetEnabled?: boolean; + /** Whether the handler can support multiple extensions. */ + supportsMultipleExtensions?: boolean; +}; + +/** Describes a Virtual Machine Extension. */ +export type VirtualMachineExtension = Resource & { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; /** - * Whether OS image rollback feature should be disabled. Default value is false. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - disableAutomaticRollback?: boolean; -} + readonly provisioningState?: string; + /** The virtual machine extension instance view. */ + instanceView?: VirtualMachineExtensionInstanceView; +}; -/** - * The configuration parameters used while performing a rolling upgrade. - */ -export interface RollingUpgradePolicy { +/** Describes a Virtual Machine. */ +export type VirtualMachine = Resource & { + /** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. */ + plan?: Plan; /** - * The maximum percent of total virtual machine instances that will be upgraded simultaneously by - * the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or - * future batches can cause the percentage of instances in a batch to decrease to ensure higher - * reliability. The default value for this parameter is 20%. + * The virtual machine child extension resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maxBatchInstancePercent?: number; + readonly resources?: VirtualMachineExtension[]; + /** The identity of the virtual machine, if configured. */ + identity?: VirtualMachineIdentity; + /** The virtual machine zones. */ + zones?: string[]; + /** The extended location of the Virtual Machine. */ + extendedLocation?: ExtendedLocation; + /** Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: HardwareProfile; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: StorageProfile; + /** Specifies additional capabilities enabled or disabled on the virtual machine. */ + additionalCapabilities?: AdditionalCapabilities; + /** Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. */ + osProfile?: OSProfile; + /** Specifies the network interfaces of the virtual machine. */ + networkProfile?: NetworkProfile; + /** Specifies the Security related profile settings for the virtual machine. */ + securityProfile?: SecurityProfile; + /** Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. */ + diagnosticsProfile?: DiagnosticsProfile; + /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

    This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. */ + availabilitySet?: SubResource; + /** Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

    This property cannot exist along with a non-null properties.availabilitySet reference.

    Minimum api‐version: 2019‐03‐01 */ + virtualMachineScaleSet?: SubResource; + /** Specifies information about the proximity placement group that the virtual machine should be assigned to.

    Minimum api-version: 2018-04-01. */ + proximityPlacementGroup?: SubResource; + /** Specifies the priority for the virtual machine.

    Minimum api-version: 2019-03-01 */ + priority?: VirtualMachinePriorityTypes; + /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

    For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + /** Specifies the billing related details of a Azure Spot virtual machine.

    Minimum api-version: 2019-03-01. */ + billingProfile?: BillingProfile; + /** Specifies information about the dedicated host that the virtual machine resides in.

    Minimum api-version: 2018-10-01. */ + host?: SubResource; + /** Specifies information about the dedicated host group that the virtual machine resides in.

    Minimum api-version: 2020-06-01.

    NOTE: User cannot specify both host and hostGroup properties. */ + hostGroup?: SubResource; /** - * The maximum percentage of the total virtual machine instances in the scale set that can be - * simultaneously unhealthy, either as a result of being upgraded, or by being found in an - * unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This - * constraint will be checked prior to starting any batch. The default value for this parameter - * is 20%. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maxUnhealthyInstancePercent?: number; + readonly provisioningState?: string; /** - * The maximum percentage of upgraded virtual machine instances that can be found to be in an - * unhealthy state. This check will happen after each batch is upgraded. If this percentage is - * ever exceeded, the rolling update aborts. The default value for this parameter is 20%. + * The virtual machine instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - maxUnhealthyUpgradedInstancePercent?: number; + readonly instanceView?: VirtualMachineInstanceView; + /** Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 */ + licenseType?: string; /** - * The wait time between completing the update for all virtual machines in one batch and starting - * the next batch. The time duration should be specified in ISO 8601 format. The default value is - * 0 seconds (PT0S). + * Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - pauseTimeBetweenBatches?: string; + readonly vmId?: string; + /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

    Minimum api-version: 2020-06-01 */ + extensionsTimeBudget?: string; + /** Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.
  • This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 */ + platformFaultDomain?: number; + /** Specifies Scheduled Event related configurations. */ + scheduledEventsProfile?: ScheduledEventsProfile; + /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 */ + userData?: string; +}; + +/** Describes a Virtual Machine Scale Set. */ +export type VirtualMachineScaleSet = Resource & { + /** The virtual machine scale set sku. */ + sku?: Sku; + /** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. */ + plan?: Plan; + /** The identity of the virtual machine scale set, if configured. */ + identity?: VirtualMachineScaleSetIdentity; + /** The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set */ + zones?: string[]; + /** The extended location of the Virtual Machine Scale Set. */ + extendedLocation?: ExtendedLocation; + /** The upgrade policy. */ + upgradePolicy?: UpgradePolicy; + /** Policy for automatic repairs. */ + automaticRepairsPolicy?: AutomaticRepairsPolicy; + /** The virtual machine profile. */ + virtualMachineProfile?: VirtualMachineScaleSetVMProfile; /** - * Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration - * the Update Domain and maxBatchInstancePercent to determine the batch size. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - enableCrossZoneUpgrade?: boolean; + readonly provisioningState?: string; + /** Specifies whether the Virtual Machine Scale Set should be overprovisioned. */ + overprovision?: boolean; + /** When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. */ + doNotRunExtensionsOnOverprovisionedVMs?: boolean; /** - * Upgrade all unhealthy instances in a scale set before any healthy instances. + * Specifies the ID which uniquely identifies a Virtual Machine Scale Set. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - prioritizeUnhealthyInstances?: boolean; -} + readonly uniqueId?: string; + /** When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. */ + singlePlacementGroup?: boolean; + /** Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. */ + zoneBalance?: boolean; + /** Fault Domain count for each placement group. */ + platformFaultDomainCount?: number; + /** Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. */ + proximityPlacementGroup?: SubResource; + /** Specifies information about the dedicated host group that the virtual machine scale set resides in.

    Minimum api-version: 2020-06-01. */ + hostGroup?: SubResource; + /** Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. */ + additionalCapabilities?: AdditionalCapabilities; + /** Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. */ + scaleInPolicy?: ScaleInPolicy; + /** Specifies the orchestration mode for the virtual machine scale set. */ + orchestrationMode?: OrchestrationMode; +}; -/** - * Describes an upgrade policy - automatic, manual, or rolling. - */ -export interface UpgradePolicy { +/** The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. */ +export type Image = Resource & { + /** The extended location of the Image. */ + extendedLocation?: ExtendedLocation; + /** The source virtual machine from which Image is created. */ + sourceVirtualMachine?: SubResource; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: ImageStorageProfile; /** - * Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible - * values are:

    **Manual** - You control the application of updates to virtual - * machines in the scale set. You do this by using the manualUpgrade action.

    - * **Automatic** - All virtual machines in the scale set are automatically updated at the same - * time. Possible values include: 'Automatic', 'Manual', 'Rolling' + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - mode?: UpgradeMode; + readonly provisioningState?: string; + /** Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. */ + hyperVGeneration?: HyperVGenerationTypes; +}; + +/** Create or update Restore Point collection parameters. */ +export type RestorePointCollection = Resource & { + /** The properties of the source resource that this restore point collection is created from. */ + source?: RestorePointCollectionSourceProperties; /** - * The configuration parameters used while performing a rolling upgrade. + * The provisioning state of the restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - rollingUpgradePolicy?: RollingUpgradePolicy; + readonly provisioningState?: string; /** - * Configuration parameters used for performing automatic OS Upgrade. + * The unique id of the restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy; -} - -/** - * Describes a scale-in policy for a virtual machine scale set. - */ -export interface ScaleInPolicy { + readonly restorePointCollectionId?: string; /** - * The rules to be followed when scaling-in a virtual machine scale set.

    Possible values - * are:

    **Default** When a virtual machine scale set is scaled in, the scale set will - * first be balanced across zones if it is a zonal scale set. Then, it will be balanced across - * Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for - * removal will be the newest ones that are not protected from scale-in.

    **OldestVM** - * When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not - * protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the - * scale set will first be balanced across zones. Within each zone, the oldest virtual machines - * that are not protected will be chosen for removal.

    **NewestVM** When a virtual - * machine scale set is being scaled-in, the newest virtual machines that are not protected from - * scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will - * first be balanced across zones. Within each zone, the newest virtual machines that are not - * protected will be chosen for removal.

    + * A list containing all restore points created under this restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - rules?: VirtualMachineScaleSetScaleInRules[]; -} + readonly restorePoints?: RestorePoint[]; +}; -/** - * Describes a image disk. - */ -export interface ImageDisk { +/** The status of the latest virtual machine scale set rolling upgrade. */ +export type RollingUpgradeStatusInfo = Resource & { /** - * The snapshot. + * The rolling upgrade policies applied for this upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - snapshot?: SubResource; + readonly policy?: RollingUpgradePolicy; /** - * The managedDisk. + * Information about the current running state of the overall upgrade. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - managedDisk?: SubResource; + readonly runningStatus?: RollingUpgradeRunningStatus; /** - * The Virtual Hard Disk. + * Information about the number of virtual machine instances in each upgrade state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - blobUri?: string; + readonly progress?: RollingUpgradeProgressInfo; /** - * Specifies the caching requirements.

    Possible values are:

    **None**

    - * **ReadOnly**

    **ReadWrite**

    Default: **None for Standard storage. ReadOnly - * for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * Error details for this upgrade, if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - caching?: CachingTypes; + readonly error?: ApiError; +}; + +/** Describes a virtual machine scale set virtual machine. */ +export type VirtualMachineScaleSetVM = Resource & { /** - * Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the - * name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB + * The virtual machine instance ID. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diskSizeGB?: number; + readonly instanceId?: string; /** - * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used - * with data disks, it cannot be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS' + * The virtual machine SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageAccountType?: StorageAccountTypes; + readonly sku?: Sku; + /** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. */ + plan?: Plan; /** - * Specifies the customer managed disk encryption set resource id for the managed image disk. + * The virtual machine child extension resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diskEncryptionSet?: DiskEncryptionSetParameters; -} - -/** - * Describes an Operating System disk. - */ -export interface ImageOSDisk extends ImageDisk { + readonly resources?: VirtualMachineExtension[]; /** - * This property allows you to specify the type of the OS that is included in the disk if - * creating a VM from a custom image.

    Possible values are:

    **Windows**

    - * **Linux**. Possible values include: 'Windows', 'Linux' + * The virtual machine zones. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osType: OperatingSystemTypes; + readonly zones?: string[]; /** - * The OS State. Possible values include: 'Generalized', 'Specialized' + * Specifies whether the latest model has been applied to the virtual machine. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osState: OperatingSystemStateTypes; -} - -/** - * Describes a data disk. - */ -export interface ImageDataDisk extends ImageDisk { + readonly latestModelApplied?: boolean; /** - * Specifies the logical unit number of the data disk. This value is used to identify data disks - * within the VM and therefore must be unique for each data disk attached to a VM. + * Azure VM unique ID. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lun: number; -} - -/** - * Describes a storage profile. - */ -export interface ImageStorageProfile { + readonly vmId?: string; /** - * Specifies information about the operating system disk used by the virtual machine.

    - * For more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * The virtual machine instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - osDisk?: ImageOSDisk; + readonly instanceView?: VirtualMachineScaleSetVMInstanceView; + /** Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: HardwareProfile; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: StorageProfile; + /** Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. */ + additionalCapabilities?: AdditionalCapabilities; + /** Specifies the operating system settings for the virtual machine. */ + osProfile?: OSProfile; + /** Specifies the Security related profile settings for the virtual machine. */ + securityProfile?: SecurityProfile; + /** Specifies the network interfaces of the virtual machine. */ + networkProfile?: NetworkProfile; + /** Specifies the network profile configuration of the virtual machine. */ + networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; + /** Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. */ + diagnosticsProfile?: DiagnosticsProfile; + /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. */ + availabilitySet?: SubResource; /** - * Specifies the parameters that are used to add a data disk to a virtual machine.

    For - * more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dataDisks?: ImageDataDisk[]; + readonly provisioningState?: string; + /** Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 */ + licenseType?: string; /** - * Specifies whether an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zoneResilient?: boolean; -} + readonly modelDefinitionApplied?: string; + /** Specifies the protection policy of the virtual machine. */ + protectionPolicy?: VirtualMachineScaleSetVMProtectionPolicy; + /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 */ + userData?: string; +}; -/** - * The source user image virtual hard disk. The virtual hard disk will be copied before being - * attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive - * must not exist. - */ -export interface Image extends Resource { +/** Describes a Virtual Machine run command. */ +export type VirtualMachineRunCommand = Resource & { + /** The source of the run command script. */ + source?: VirtualMachineRunCommandScriptSource; + /** The parameters used by the script. */ + parameters?: RunCommandInputParameter[]; + /** The parameters used by the script. */ + protectedParameters?: RunCommandInputParameter[]; + /** Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. */ + asyncExecution?: boolean; + /** Specifies the user account on the VM when executing the run command. */ + runAsUser?: string; + /** Specifies the user account password on the VM when executing the run command. */ + runAsPassword?: string; + /** The timeout in seconds to execute the run command. */ + timeoutInSeconds?: number; + /** Specifies the Azure storage blob where script output stream will be uploaded. */ + outputBlobUri?: string; + /** Specifies the Azure storage blob where script error stream will be uploaded. */ + errorBlobUri?: string; /** - * The source virtual machine from which Image is created. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceVirtualMachine?: SubResource; + readonly provisioningState?: string; /** - * Specifies the storage settings for the virtual machine disks. + * The virtual machine run command instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageProfile?: ImageStorageProfile; + readonly instanceView?: VirtualMachineRunCommandInstanceView; +}; + +/** Disk resource. */ +export type Disk = Resource & { /** - * The provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A relative URI containing the ID of the VM that has the disk attached. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly managedBy?: string; /** - * Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API - * Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, - * if the source is managed resource like disk or snapshot, we may require the user to specify - * the property if we cannot deduce it from the source managed resource. Possible values include: - * 'V1', 'V2' + * List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hyperVGeneration?: HyperVGenerationTypes; + readonly managedByExtended?: string[]; + /** The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. */ + sku?: DiskSku; + /** The Logical zone list for Disk. */ + zones?: string[]; + /** The extended location where the disk will be created. Extended location cannot be changed. */ + extendedLocation?: ExtendedLocation; /** - * The extended location of the Image. + * The time when the disk was created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - extendedLocation?: ExtendedLocation; -} - -/** - * The source user image virtual hard disk. Only tags may be updated. - */ -export interface ImageUpdate extends UpdateResource { + readonly timeCreated?: Date; + /** The Operating System type. */ + osType?: OperatingSystemTypes; + /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ + hyperVGeneration?: HyperVGeneration; + /** Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} */ + purchasePlan?: PurchasePlanAutoGenerated; + /** Disk source information. CreationData information cannot be changed after the disk has been created. */ + creationData?: CreationData; + /** If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. */ + diskSizeGB?: number; /** - * The source virtual machine from which Image is created. + * The size of the disk in bytes. This field is read only. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceVirtualMachine?: SubResource; + readonly diskSizeBytes?: number; /** - * Specifies the storage settings for the virtual machine disks. + * Unique Guid identifying the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageProfile?: ImageStorageProfile; + readonly uniqueId?: string; + /** Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. */ + encryptionSettingsCollection?: EncryptionSettingsCollection; /** - * The provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The disk provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; + /** The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. */ + diskIopsReadWrite?: number; + /** The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. */ + diskMBpsReadWrite?: number; + /** The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. */ + diskIopsReadOnly?: number; + /** The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. */ + diskMBpsReadOnly?: number; /** - * Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API - * Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, - * if the source is managed resource like disk or snapshot, we may require the user to specify - * the property if we cannot deduce it from the source managed resource. Possible values include: - * 'V1', 'V2' + * The state of the disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hyperVGeneration?: HyperVGenerationTypes; -} - -/** - * An interface representing VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. - */ -export interface VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue { + readonly diskState?: DiskState; + /** Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. */ + encryption?: Encryption; + /** The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. */ + maxShares?: number; /** - * The principal id of user assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly shareInfo?: ShareInfoElement[]; + /** Policy for accessing the disk via network. */ + networkAccessPolicy?: NetworkAccessPolicy; + /** ARM id of the DiskAccess resource for using private endpoints on disks. */ + diskAccessId?: string; + /** Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. */ + tier?: string; + /** Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. */ + burstingEnabled?: boolean; /** - * The client id of user assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Properties of the disk for which update is pending. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; -} + readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; + /** Indicates the OS on a disk supports hibernation. */ + supportsHibernation?: boolean; + /** Contains the security related information for the resource. */ + securityProfile?: DiskSecurityProfile; +}; -/** - * Identity for the virtual machine scale set. - */ -export interface VirtualMachineScaleSetIdentity { - /** - * The principal id of virtual machine scale set identity. This property will only be provided - * for a system assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly principalId?: string; +/** Snapshot resource. */ +export type Snapshot = Resource & { /** - * The tenant id associated with the virtual machine scale set. This property will only be - * provided for a system assigned identity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Unused. Always Null. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; + readonly managedBy?: string; + /** The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot */ + sku?: SnapshotSku; + /** The extended location where the snapshot will be created. Extended location cannot be changed. */ + extendedLocation?: ExtendedLocation; /** - * The type of identity used for the virtual machine scale set. The type 'SystemAssigned, - * UserAssigned' includes both an implicitly created identity and a set of user assigned - * identities. The type 'None' will remove any identities from the virtual machine scale set. - * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' + * The time when the snapshot was created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: ResourceIdentityType; + readonly timeCreated?: Date; + /** The Operating System type. */ + osType?: OperatingSystemTypes; + /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ + hyperVGeneration?: HyperVGeneration; + /** Purchase plan information for the image from which the source disk for the snapshot was originally created. */ + purchasePlan?: PurchasePlanAutoGenerated; + /** Disk source information. CreationData information cannot be changed after the disk has been created. */ + creationData?: CreationData; + /** If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. */ + diskSizeGB?: number; /** - * The list of user identities associated with the virtual machine scale set. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * The size of the disk in bytes. This field is read only. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - userAssignedIdentities?: { - [propertyName: string]: VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue; - }; -} - -/** - * Describes a virtual machine scale set OS profile. - */ -export interface VirtualMachineScaleSetOSProfile { + readonly diskSizeBytes?: number; /** - * Specifies the computer name prefix for all of the virtual machines in the scale set. Computer - * name prefixes must be 1 to 15 characters long. + * The state of the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - computerNamePrefix?: string; + readonly diskState?: DiskState; /** - * Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot - * end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", - * "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", - * "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", - * "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length - * (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length - * (Windows):** 20 characters + * Unique Guid identifying the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - adminUsername?: string; + readonly uniqueId?: string; + /** Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. */ + encryptionSettingsCollection?: EncryptionSettingsCollection; /** - * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 - * characters

    **Minimum-length (Linux):** 6 characters

    **Max-length - * (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    - * **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower - * characters
    Has upper characters
    Has a digit
    Has a special character (Regex match - * [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For - * resetting the password, see [How to reset the Remote Desktop service or its login password in - * a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) - *

    For resetting root password, see [Manage users, SSH, and check or repair disks on - * Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + * The disk provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - adminPassword?: string; + readonly provisioningState?: string; + /** Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. */ + incremental?: boolean; + /** Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. */ + encryption?: Encryption; + /** Policy for accessing the disk via network. */ + networkAccessPolicy?: NetworkAccessPolicy; + /** ARM id of the DiskAccess resource for using private endpoints on disks. */ + diskAccessId?: string; + /** Indicates the OS on a snapshot supports hibernation. */ + supportsHibernation?: boolean; +}; + +/** disk encryption set resource. */ +export type DiskEncryptionSet = Resource & { + /** The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. */ + identity?: EncryptionSetIdentity; + /** The type of key used to encrypt the data of the disk. */ + encryptionType?: DiskEncryptionSetType; + /** The key vault key which is currently used by this disk encryption set. */ + activeKey?: KeyForDiskEncryptionSet; /** - * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum length of the binary - * array is 65535 bytes.

    For using cloud-init for your VM, see [Using cloud-init to - * customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) + * A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - customData?: string; + readonly previousKeys?: KeyForDiskEncryptionSet[]; /** - * Specifies Windows operating system settings on the virtual machine. + * The disk encryption set provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - windowsConfiguration?: WindowsConfiguration; + readonly provisioningState?: string; + /** Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. */ + rotationToLatestKeyVersionEnabled?: boolean; /** - * Specifies the Linux operating system settings on the virtual machine.

    For a list of - * supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + * The time when the active key of this disk encryption set was updated. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - linuxConfiguration?: LinuxConfiguration; + readonly lastKeyRotationTimestamp?: Date; +}; + +/** disk access resource. */ +export type DiskAccess = Resource & { /** - * Specifies set of certificates that should be installed onto the virtual machines in the scale - * set. + * A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - secrets?: VaultSecretGroup[]; -} - -/** - * Describes a virtual machine scale set OS profile. - */ -export interface VirtualMachineScaleSetUpdateOSProfile { + readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** - * A base-64 encoded string of custom data. + * The disk access resource provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - customData?: string; + readonly provisioningState?: string; /** - * The Windows Configuration of the OS profile. + * The time when the disk access was created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - windowsConfiguration?: WindowsConfiguration; + readonly timeCreated?: Date; +}; + +/** Specifies information about the Shared Image Gallery that you want to create or update. */ +export type Gallery = Resource & { + /** The description of this Shared Image Gallery resource. This property is updatable. */ + description?: string; + /** Describes the gallery unique name. */ + identifier?: GalleryIdentifier; /** - * The Linux Configuration of the OS profile. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - linuxConfiguration?: LinuxConfiguration; + readonly provisioningState?: GalleryPropertiesProvisioningState; + /** Profile for gallery sharing to subscription or tenant */ + sharingProfile?: SharingProfile; +}; + +/** Specifies information about the gallery image definition that you want to create or update. */ +export type GalleryImage = Resource & { + /** The description of this gallery image definition resource. This property is updatable. */ + description?: string; + /** The Eula agreement for the gallery image definition. */ + eula?: string; + /** The privacy statement uri. */ + privacyStatementUri?: string; + /** The release note uri. */ + releaseNoteUri?: string; + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux** */ + osType?: OperatingSystemTypes; + /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ + osState?: OperatingSystemStateTypes; + /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ + hyperVGeneration?: HyperVGeneration; + /** The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; + /** This is the gallery image definition identifier. */ + identifier?: GalleryImageIdentifier; + /** The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. */ + recommended?: RecommendedMachineConfiguration; + /** Describes the disallowed disk types. */ + disallowed?: Disallowed; + /** Describes the gallery image definition purchase plan. This is used by marketplace images. */ + purchasePlan?: ImagePurchasePlan; /** - * The List of certificates for addition to the VM. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - secrets?: VaultSecretGroup[]; -} + readonly provisioningState?: GalleryImagePropertiesProvisioningState; + /** A list of gallery image features. */ + features?: GalleryImageFeature[]; +}; -/** - * Describes the parameters of a ScaleSet managed disk. - */ -export interface VirtualMachineScaleSetManagedDiskParameters { +/** Specifies information about the gallery image version that you want to create or update. */ +export type GalleryImageVersion = Resource & { + /** The publishing profile of a gallery image Version. */ + publishingProfile?: GalleryImageVersionPublishingProfile; /** - * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used - * with data disks, it cannot be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS' + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageAccountType?: StorageAccountTypes; + readonly provisioningState?: GalleryImageVersionPropertiesProvisioningState; + /** This is the storage profile of a Gallery Image Version. */ + storageProfile?: GalleryImageVersionStorageProfile; /** - * Specifies the customer managed disk encryption set resource id for the managed disk. + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - diskEncryptionSet?: DiskEncryptionSetParameters; -} + readonly replicationStatus?: ReplicationStatus; +}; -/** - * Describes a virtual machine scale set operating system disk. - */ -export interface VirtualMachineScaleSetOSDisk { +/** Specifies information about the gallery Application Definition that you want to create or update. */ +export type GalleryApplication = Resource & { + /** The description of this gallery Application Definition resource. This property is updatable. */ + description?: string; + /** The Eula agreement for the gallery Application Definition. */ + eula?: string; + /** The privacy statement uri. */ + privacyStatementUri?: string; + /** The release note uri. */ + releaseNoteUri?: string; + /** The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; + /** This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux** */ + supportedOSType?: OperatingSystemTypes; +}; + +/** Specifies information about the gallery Application Version that you want to create or update. */ +export type GalleryApplicationVersion = Resource & { + /** The publishing profile of a gallery image version. */ + publishingProfile?: GalleryApplicationVersionPublishingProfile; /** - * The disk name. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly provisioningState?: GalleryApplicationVersionPropertiesProvisioningState; /** - * Specifies the caching requirements.

    Possible values are:

    **None**

    - * **ReadOnly**

    **ReadWrite**

    Default: **None for Standard storage. ReadOnly - * for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - caching?: CachingTypes; + readonly replicationStatus?: ReplicationStatus; +}; + +export type SubResourceWithColocationStatus = SubResource & { + /** Describes colocation status of a resource in the Proximity Placement Group. */ + colocationStatus?: InstanceViewStatus; +}; + +/** Virtual machine image resource information. */ +export type VirtualMachineImageResource = SubResource & { + /** The name of the resource. */ + name: string; + /** The supported Azure location of the resource. */ + location: string; + /** Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). */ + tags?: { [propertyName: string]: string }; + /** The extended location of the Virtual Machine. */ + extendedLocation?: ExtendedLocation; +}; + +/** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. */ +export type ImageReference = SubResource & { + /** The image publisher. */ + publisher?: string; + /** Specifies the offer of the platform image or marketplace image used to create the virtual machine. */ + offer?: string; + /** The image SKU. */ + sku?: string; + /** Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. */ + version?: string; /** - * Specifies whether writeAccelerator should be enabled or disabled on the disk. + * Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - writeAcceleratorEnabled?: boolean; - /** - * Specifies how the virtual machines in the scale set should be created.

    The only - * allowed value is: **FromImage** \u2013 This value is used when you are using an image to - * create the virtual machine. If you are using a platform image, you also use the imageReference - * element described above. If you are using a marketplace image, you also use the plan element - * previously described. Possible values include: 'FromImage', 'Empty', 'Attach' - */ - createOption: DiskCreateOptionTypes; - /** - * Specifies the ephemeral disk Settings for the operating system disk used by the virtual - * machine scale set. - */ - diffDiskSettings?: DiffDiskSettings; - /** - * Specifies the size of the operating system disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This value cannot be - * larger than 1023 GB - */ - diskSizeGB?: number; - /** - * This property allows you to specify the type of the OS that is included in the disk if - * creating a VM from user-image or a specialized VHD.

    Possible values are:

    - * **Windows**

    **Linux**. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemTypes; - /** - * Specifies information about the unmanaged user image to base the scale set on. - */ - image?: VirtualHardDisk; - /** - * Specifies the container urls that are used to store operating system disks for the scale set. - */ - vhdContainers?: string[]; - /** - * The managed disk parameters. - */ - managedDisk?: VirtualMachineScaleSetManagedDiskParameters; -} - -/** - * Describes virtual machine scale set operating system disk Update Object. This should be used for - * Updating VMSS OS Disk. - */ -export interface VirtualMachineScaleSetUpdateOSDisk { - /** - * The caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - */ - caching?: CachingTypes; - /** - * Specifies whether writeAccelerator should be enabled or disabled on the disk. - */ - writeAcceleratorEnabled?: boolean; - /** - * Specifies the size of the operating system disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This value cannot be - * larger than 1023 GB - */ - diskSizeGB?: number; - /** - * The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to - * attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk - * should not exist. - */ - image?: VirtualHardDisk; - /** - * The list of virtual hard disk container uris. - */ - vhdContainers?: string[]; - /** - * The managed disk parameters. - */ - managedDisk?: VirtualMachineScaleSetManagedDiskParameters; -} - -/** - * Describes a virtual machine scale set data disk. - */ -export interface VirtualMachineScaleSetDataDisk { - /** - * The disk name. - */ - name?: string; - /** - * Specifies the logical unit number of the data disk. This value is used to identify data disks - * within the VM and therefore must be unique for each data disk attached to a VM. - */ - lun: number; - /** - * Specifies the caching requirements.

    Possible values are:

    **None**

    - * **ReadOnly**

    **ReadWrite**

    Default: **None for Standard storage. ReadOnly - * for Premium storage**. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - */ - caching?: CachingTypes; - /** - * Specifies whether writeAccelerator should be enabled or disabled on the disk. - */ - writeAcceleratorEnabled?: boolean; - /** - * The create option. Possible values include: 'FromImage', 'Empty', 'Attach' - */ - createOption: DiskCreateOptionTypes; - /** - * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite - * the size of the disk in a virtual machine image.

    This value cannot be larger than - * 1023 GB - */ - diskSizeGB?: number; - /** - * The managed disk parameters. - */ - managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - /** - * Specifies the Read-Write IOPS for the managed disk. Should be used only when - * StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based - * on diskSizeGB. - */ - diskIOPSReadWrite?: number; - /** - * Specifies the bandwidth in MB per second for the managed disk. Should be used only when - * StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based - * on diskSizeGB. - */ - diskMBpsReadWrite?: number; -} + readonly exactVersion?: string; +}; -/** - * Describes a virtual machine scale set storage profile. - */ -export interface VirtualMachineScaleSetStorageProfile { - /** - * Specifies information about the image to use. You can specify information about platform - * images, marketplace images, or virtual machine images. This element is required when you want - * to use a platform image, marketplace image, or virtual machine image, but is not used in other - * creation operations. - */ - imageReference?: ImageReference; - /** - * Specifies information about the operating system disk used by the virtual machines in the - * scale set.

    For more information about disks, see [About disks and VHDs for Azure - * virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - */ - osDisk?: VirtualMachineScaleSetOSDisk; - /** - * Specifies the parameters that are used to add data disks to the virtual machines in the scale - * set.

    For more information about disks, see [About disks and VHDs for Azure virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). - */ - dataDisks?: VirtualMachineScaleSetDataDisk[]; -} +/** Describes the parameter of customer managed disk encryption set resource id that can be specified for disk.

    NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. */ +export type DiskEncryptionSetParameters = SubResource & {}; -/** - * Describes a virtual machine scale set storage profile. - */ -export interface VirtualMachineScaleSetUpdateStorageProfile { - /** - * The image reference. - */ - imageReference?: ImageReference; - /** - * The OS disk. - */ - osDisk?: VirtualMachineScaleSetUpdateOSDisk; - /** - * The data disks. - */ - dataDisks?: VirtualMachineScaleSetDataDisk[]; -} +/** The parameters of a managed disk. */ +export type ManagedDiskParameters = SubResource & { + /** Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. */ + storageAccountType?: StorageAccountTypes; + /** Specifies the customer managed disk encryption set resource id for the managed disk. */ + diskEncryptionSet?: DiskEncryptionSetParameters; +}; -/** - * Describes a virtual machines scale sets network configuration's DNS settings. - */ -export interface VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { - /** - * The Domain name label.The concatenation of the domain name label and vm index will be the - * domain name labels of the PublicIPAddress resources that will be created - */ - domainNameLabel: string; -} +/** Describes a network interface reference. */ +export type NetworkInterfaceReference = SubResource & { + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** Specify what happens to the network interface when the VM is deleted */ + deleteOption?: DeleteOptions; +}; -/** - * Contains the IP tag associated with the public IP address. - */ -export interface VirtualMachineScaleSetIpTag { - /** - * IP tag type. Example: FirstPartyUsage. - */ - ipTagType?: string; - /** - * IP tag associated with the public IP. Example: SQL, Storage etc. - */ - tag?: string; -} +/** Describes a virtual machine scale set network profile's IP configuration. */ +export type VirtualMachineScaleSetIPConfiguration = SubResource & { + /** The IP configuration name. */ + name: string; + /** Specifies the identifier of the subnet. */ + subnet?: ApiEntityReference; + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** The publicIPAddressConfiguration. */ + publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; + /** Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ + privateIPAddressVersion?: IPVersion; + /** Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. */ + applicationGatewayBackendAddressPools?: SubResource[]; + /** Specifies an array of references to application security group. */ + applicationSecurityGroups?: SubResource[]; + /** Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. */ + loadBalancerBackendAddressPools?: SubResource[]; + /** Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. */ + loadBalancerInboundNatPools?: SubResource[]; +}; -/** - * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration - */ -export interface VirtualMachineScaleSetPublicIPAddressConfiguration { - /** - * The publicIP address configuration name. - */ +/** Describes a virtual machine scale set network profile's network configurations. */ +export type VirtualMachineScaleSetNetworkConfiguration = SubResource & { + /** The network configuration name. */ name: string; - /** - * The idle timeout of the public IP address. - */ - idleTimeoutInMinutes?: number; - /** - * The dns settings to be applied on the publicIP addresses . - */ - dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; - /** - * The list of IP tags associated with the public IP address. - */ - ipTags?: VirtualMachineScaleSetIpTag[]; - /** - * The PublicIPPrefix from which to allocate publicIP addresses. - */ - publicIPPrefix?: SubResource; - /** - * Available from Api-Version 2019-07-01 onwards, it represents whether the specific - * ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - * 'IPv6'. Possible values include: 'IPv4', 'IPv6' - */ - publicIPAddressVersion?: IPVersion; - /** - * Specify what happens to the public IP when the VM is deleted. Possible values include: - * 'Delete', 'Detach' - */ + /** Specifies the primary network interface in case the virtual machine has more than 1 network interface. */ + primary?: boolean; + /** Specifies whether the network interface is accelerated networking-enabled. */ + enableAcceleratedNetworking?: boolean; + /** Specifies whether the network interface is FPGA networking-enabled. */ + enableFpga?: boolean; + /** The network security group. */ + networkSecurityGroup?: SubResource; + /** The dns settings to be applied on the network interfaces. */ + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + /** Specifies the IP configurations of the network interface. */ + ipConfigurations?: VirtualMachineScaleSetIPConfiguration[]; + /** Whether IP forwarding enabled on this NIC. */ + enableIPForwarding?: boolean; + /** Specify what happens to the network interface when the VM is deleted */ deleteOption?: DeleteOptions; - sku?: PublicIPAddressSku; -} +}; -/** - * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration - */ -export interface VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { +/** Output of virtual machine capture operation. */ +export type VirtualMachineCaptureResult = SubResource & { /** - * The publicIP address configuration name. + * the schema of the captured virtual machine + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly schema?: string; /** - * The idle timeout of the public IP address. + * the version of the content + * NOTE: This property will not be serialized. It can only be populated by the server. */ - idleTimeoutInMinutes?: number; + readonly contentVersion?: string; /** - * The dns settings to be applied on the publicIP addresses . + * parameters of the captured virtual machine + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + readonly parameters?: Record; /** - * Specify what happens to the public IP when the VM is deleted. Possible values include: - * 'Delete', 'Detach' + * a list of resource items of the captured virtual machine + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deleteOption?: DeleteOptions; -} + readonly resources?: Record[]; +}; -/** - * Describes a virtual machine scale set network profile's IP configuration. - */ -export interface VirtualMachineScaleSetIPConfiguration extends SubResource { - /** - * The IP configuration name. - */ - name: string; - /** - * Specifies the identifier of the subnet. - */ +/** Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network */ +export type VirtualMachineScaleSetUpdateIPConfiguration = SubResource & { + /** The IP configuration name. */ + name?: string; + /** The subnet. */ subnet?: ApiEntityReference; - /** - * Specifies the primary network interface in case the virtual machine has more than 1 network - * interface. - */ + /** Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. */ primary?: boolean; - /** - * The publicIPAddressConfiguration. - */ - publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; - /** - * Available from Api-Version 2017-03-30 onwards, it represents whether the specific - * ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - * 'IPv6'. Possible values include: 'IPv4', 'IPv6' - */ + /** The publicIPAddressConfiguration. */ + publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; + /** Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. */ privateIPAddressVersion?: IPVersion; - /** - * Specifies an array of references to backend address pools of application gateways. A scale set - * can reference backend address pools of multiple application gateways. Multiple scale sets - * cannot use the same application gateway. - */ + /** The application gateway backend address pools. */ applicationGatewayBackendAddressPools?: SubResource[]; - /** - * Specifies an array of references to application security group. - */ + /** Specifies an array of references to application security group. */ applicationSecurityGroups?: SubResource[]; - /** - * Specifies an array of references to backend address pools of load balancers. A scale set can - * reference backend address pools of one public and one internal load balancer. Multiple scale - * sets cannot use the same basic sku load balancer. - */ + /** The load balancer backend address pools. */ loadBalancerBackendAddressPools?: SubResource[]; - /** - * Specifies an array of references to inbound Nat pools of the load balancers. A scale set can - * reference inbound nat pools of one public and one internal load balancer. Multiple scale sets - * cannot use the same basic sku load balancer. - */ + /** The load balancer inbound nat pools. */ loadBalancerInboundNatPools?: SubResource[]; -} +}; -/** - * Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a - * scale set may be modified as long as the original subnet and the new subnet are in the same - * virtual network - */ -export interface VirtualMachineScaleSetUpdateIPConfiguration extends SubResource { - /** - * The IP configuration name. - */ +/** Describes a virtual machine scale set network profile's network configurations. */ +export type VirtualMachineScaleSetUpdateNetworkConfiguration = SubResource & { + /** The network configuration name. */ name?: string; + /** Whether this is a primary NIC on a virtual machine. */ + primary?: boolean; + /** Specifies whether the network interface is accelerated networking-enabled. */ + enableAcceleratedNetworking?: boolean; + /** Specifies whether the network interface is FPGA networking-enabled. */ + enableFpga?: boolean; + /** The network security group. */ + networkSecurityGroup?: SubResource; + /** The dns settings to be applied on the network interfaces. */ + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + /** The virtual machine scale set IP Configuration. */ + ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; + /** Whether IP forwarding enabled on this NIC. */ + enableIPForwarding?: boolean; + /** Specify what happens to the network interface when the VM is deleted */ + deleteOption?: DeleteOptions; +}; + +/** Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated. */ +export type AvailabilitySetUpdate = UpdateResource & { + /** Sku of the availability set */ + sku?: Sku; + /** Update Domain count. */ + platformUpdateDomainCount?: number; + /** Fault Domain count. */ + platformFaultDomainCount?: number; + /** A list of references to all virtual machines in the availability set. */ + virtualMachines?: SubResource[]; + /** Specifies information about the proximity placement group that the availability set should be assigned to.

    Minimum api-version: 2018-04-01. */ + proximityPlacementGroup?: SubResource; /** - * The subnet. + * The resource status information. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - subnet?: ApiEntityReference; + readonly statuses?: InstanceViewStatus[]; +}; + +/** Specifies information about the proximity placement group. */ +export type ProximityPlacementGroupUpdate = UpdateResource & {}; + +/** Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated. */ +export type DedicatedHostGroupUpdate = UpdateResource & { + /** Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. */ + zones?: string[]; + /** Number of fault domains that the host group can span. */ + platformFaultDomainCount?: number; /** - * Specifies the primary IP Configuration in case the network interface has more than one IP - * Configuration. + * A list of references to all dedicated hosts in the dedicated host group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - primary?: boolean; + readonly hosts?: SubResourceReadOnly[]; /** - * The publicIPAddressConfiguration. + * The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; + readonly instanceView?: DedicatedHostGroupInstanceView; + /** Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.

    Minimum api-version: 2020-06-01. */ + supportAutomaticPlacement?: boolean; +}; + +/** Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. */ +export type DedicatedHostUpdate = UpdateResource & { + /** Fault domain of the dedicated host within a dedicated host group. */ + platformFaultDomain?: number; + /** Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. */ + autoReplaceOnFailure?: boolean; /** - * Available from Api-Version 2017-03-30 onwards, it represents whether the specific - * ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - * 'IPv6'. Possible values include: 'IPv4', 'IPv6' + * A unique id generated and assigned to the dedicated host by the platform.

    Does not change throughout the lifetime of the host. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - privateIPAddressVersion?: IPVersion; + readonly hostId?: string; /** - * The application gateway backend address pools. + * A list of references to all virtual machines in the Dedicated Host. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - applicationGatewayBackendAddressPools?: SubResource[]; + readonly virtualMachines?: SubResourceReadOnly[]; + /** Specifies the software license type that will be applied to the VMs deployed on the dedicated host.

    Possible values are:

    **None**

    **Windows_Server_Hybrid**

    **Windows_Server_Perpetual**

    Default: **None** */ + licenseType?: DedicatedHostLicenseTypes; /** - * Specifies an array of references to application security group. + * The date when the host was first provisioned. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - applicationSecurityGroups?: SubResource[]; + readonly provisioningTime?: Date; /** - * The load balancer backend address pools. - */ - loadBalancerBackendAddressPools?: SubResource[]; - /** - * The load balancer inbound nat pools. - */ - loadBalancerInboundNatPools?: SubResource[]; -} - -/** - * Describes a virtual machines scale sets network configuration's DNS settings. - */ -export interface VirtualMachineScaleSetNetworkConfigurationDnsSettings { - /** - * List of DNS servers IP addresses - */ - dnsServers?: string[]; -} - -/** - * Describes a virtual machine scale set network profile's network configurations. - */ -export interface VirtualMachineScaleSetNetworkConfiguration extends SubResource { - /** - * The network configuration name. - */ - name: string; - /** - * Specifies the primary network interface in case the virtual machine has more than 1 network - * interface. - */ - primary?: boolean; - /** - * Specifies whether the network interface is accelerated networking-enabled. - */ - enableAcceleratedNetworking?: boolean; - /** - * Specifies whether the network interface is FPGA networking-enabled. - */ - enableFpga?: boolean; - /** - * The network security group. - */ - networkSecurityGroup?: SubResource; - /** - * The dns settings to be applied on the network interfaces. - */ - dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - /** - * Specifies the IP configurations of the network interface. - */ - ipConfigurations: VirtualMachineScaleSetIPConfiguration[]; - /** - * Whether IP forwarding enabled on this NIC. - */ - enableIPForwarding?: boolean; - /** - * Specify what happens to the network interface when the VM is deleted. Possible values include: - * 'Delete', 'Detach' - */ - deleteOption?: DeleteOptions; -} - -/** - * Describes a virtual machine scale set network profile's network configurations. - */ -export interface VirtualMachineScaleSetUpdateNetworkConfiguration extends SubResource { - /** - * The network configuration name. - */ - name?: string; - /** - * Whether this is a primary NIC on a virtual machine. - */ - primary?: boolean; - /** - * Specifies whether the network interface is accelerated networking-enabled. - */ - enableAcceleratedNetworking?: boolean; - /** - * Specifies whether the network interface is FPGA networking-enabled. - */ - enableFpga?: boolean; - /** - * The network security group. - */ - networkSecurityGroup?: SubResource; - /** - * The dns settings to be applied on the network interfaces. - */ - dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - /** - * The virtual machine scale set IP Configuration. - */ - ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; - /** - * Whether IP forwarding enabled on this NIC. - */ - enableIPForwarding?: boolean; - /** - * Specify what happens to the network interface when the VM is deleted. Possible values include: - * 'Delete', 'Detach' - */ - deleteOption?: DeleteOptions; -} - -/** - * Describes a virtual machine scale set network profile. - */ -export interface VirtualMachineScaleSetNetworkProfile { - /** - * A reference to a load balancer probe used to determine the health of an instance in the - * virtual machine scale set. The reference will be in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - */ - healthProbe?: ApiEntityReference; - /** - * The list of network configurations. - */ - networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; - /** - * specifies the Microsoft.Network API version used when creating networking resources in the - * Network Interface Configurations for Virtual Machine Scale Set with orchestration mode - * 'Flexible'. Possible values include: '2020-11-01' - */ - networkApiVersion?: NetworkApiVersion; -} - -/** - * Describes a virtual machine scale set network profile. - */ -export interface VirtualMachineScaleSetUpdateNetworkProfile { - /** - * A reference to a load balancer probe used to determine the health of an instance in the - * virtual machine scale set. The reference will be in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. - */ - healthProbe?: ApiEntityReference; - /** - * The list of network configurations. - */ - networkInterfaceConfigurations?: VirtualMachineScaleSetUpdateNetworkConfiguration[]; - /** - * specifies the Microsoft.Network API version used when creating networking resources in the - * Network Interface Configurations for Virtual Machine Scale Set with orchestration mode - * 'Flexible'. Possible values include: '2020-11-01' - */ - networkApiVersion?: NetworkApiVersion; -} - -/** - * Describes a Virtual Machine Scale Set Extension. - */ -export interface VirtualMachineScaleSetExtension extends SubResourceReadOnly { - /** - * The name of the extension. - */ - name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * If a value is provided and is different from the previous value, the extension handler will be - * forced to update even if the extension configuration has not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type1?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; - /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - */ - autoUpgradeMinorVersion?: boolean; - /** - * Indicates whether the extension should be automatically upgraded by the platform if there is a - * newer version of the extension available. - */ - enableAutomaticUpgrade?: boolean; - /** - * Json formatted public settings for the extension. - */ - settings?: any; - /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. - */ - protectedSettings?: any; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Collection of extension names after which this extension needs to be provisioned. - */ - provisionAfterExtensions?: string[]; -} - -/** - * Describes a Virtual Machine Scale Set Extension. - */ -export interface VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly { - /** - * The name of the extension. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * If a value is provided and is different from the previous value, the extension handler will be - * forced to update even if the extension configuration has not changed. - */ - forceUpdateTag?: string; - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension; an example is "CustomScriptExtension". - */ - type1?: string; - /** - * Specifies the version of the script handler. - */ - typeHandlerVersion?: string; - /** - * Indicates whether the extension should use a newer minor version if one is available at - * deployment time. Once deployed, however, the extension will not upgrade minor versions unless - * redeployed, even with this property set to true. - */ - autoUpgradeMinorVersion?: boolean; - /** - * Indicates whether the extension should be automatically upgraded by the platform if there is a - * newer version of the extension available. - */ - enableAutomaticUpgrade?: boolean; - /** - * Json formatted public settings for the extension. - */ - settings?: any; - /** - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no - * protected settings at all. - */ - protectedSettings?: any; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; /** - * Collection of extension names after which this extension needs to be provisioned. - */ - provisionAfterExtensions?: string[]; -} - -/** - * Describes a virtual machine scale set extension profile. - */ -export interface VirtualMachineScaleSetExtensionProfile { - /** - * The virtual machine scale set child extension resources. - */ - extensions?: VirtualMachineScaleSetExtension[]; - /** - * Specifies the time alloted for all extensions to start. The time duration should be between 15 - * minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default - * value is 90 minutes (PT1H30M).

    Minimum api-version: 2020-06-01 - */ - extensionsTimeBudget?: string; -} - -/** - * Describes a virtual machine scale set virtual machine profile. - */ -export interface VirtualMachineScaleSetVMProfile { - /** - * Specifies the operating system settings for the virtual machines in the scale set. - */ - osProfile?: VirtualMachineScaleSetOSProfile; - /** - * Specifies the storage settings for the virtual machine disks. - */ - storageProfile?: VirtualMachineScaleSetStorageProfile; - /** - * Specifies properties of the network interfaces of the virtual machines in the scale set. - */ - networkProfile?: VirtualMachineScaleSetNetworkProfile; - /** - * Specifies the Security related profile settings for the virtual machines in the scale set. - */ - securityProfile?: SecurityProfile; - /** - * Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. - */ - diagnosticsProfile?: DiagnosticsProfile; - /** - * Specifies a collection of settings for extensions installed on virtual machines in the scale - * set. - */ - extensionProfile?: VirtualMachineScaleSetExtensionProfile; - /** - * Specifies that the image or disk that is being used was licensed on-premises.

    - * Possible values for Windows Server operating system are:

    Windows_Client

    - * Windows_Server

    Possible values for Linux Server operating system are:

    - * RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure - * Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) - *

    [Azure Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) - *

    Minimum api-version: 2015-06-15 - */ - licenseType?: string; - /** - * Specifies the priority for the virtual machines in the scale set.

    Minimum api-version: - * 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot' - */ - priority?: VirtualMachinePriorityTypes; - /** - * Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. - *

    For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the - * minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and - * 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values - * include: 'Deallocate', 'Delete' - */ - evictionPolicy?: VirtualMachineEvictionPolicyTypes; - /** - * Specifies the billing related details of a Azure Spot VMSS.

    Minimum api-version: - * 2019-03-01. - */ - billingProfile?: BillingProfile; - /** - * Specifies Scheduled Event related configurations. - */ - scheduledEventsProfile?: ScheduledEventsProfile; - /** - * UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer - * should not pass any secrets in here.

    Minimum api-version: 2021-03-01 - */ - userData?: string; -} - -/** - * Describes a virtual machine scale set virtual machine profile. - */ -export interface VirtualMachineScaleSetUpdateVMProfile { - /** - * The virtual machine scale set OS profile. - */ - osProfile?: VirtualMachineScaleSetUpdateOSProfile; - /** - * The virtual machine scale set storage profile. - */ - storageProfile?: VirtualMachineScaleSetUpdateStorageProfile; - /** - * The virtual machine scale set network profile. - */ - networkProfile?: VirtualMachineScaleSetUpdateNetworkProfile; - /** - * The virtual machine scale set Security profile - */ - securityProfile?: SecurityProfile; - /** - * The virtual machine scale set diagnostics profile. - */ - diagnosticsProfile?: DiagnosticsProfile; - /** - * The virtual machine scale set extension profile. - */ - extensionProfile?: VirtualMachineScaleSetExtensionProfile; - /** - * The license type, which is for bring your own license scenario. - */ - licenseType?: string; - /** - * Specifies the billing related details of a Azure Spot VMSS.

    Minimum api-version: - * 2019-03-01. - */ - billingProfile?: BillingProfile; - /** - * Specifies Scheduled Event related configurations. - */ - scheduledEventsProfile?: ScheduledEventsProfile; - /** - * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in - * here.

    Minimum api-version: 2021-03-01 - */ - userData?: string; -} - -/** - * Describes a Virtual Machine Scale Set. - */ -export interface VirtualMachineScaleSet extends Resource { - /** - * The virtual machine scale set sku. - */ - sku?: Sku; - /** - * Specifies information about the marketplace image used to create the virtual machine. This - * element is only used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, find the - * marketplace image that you want to use and then click **Want to deploy programmatically, Get - * Started ->**. Enter any required information and then click **Save**. - */ - plan?: Plan; - /** - * The upgrade policy. - */ - upgradePolicy?: UpgradePolicy; - /** - * Policy for automatic repairs. - */ - automaticRepairsPolicy?: AutomaticRepairsPolicy; - /** - * The virtual machine profile. - */ - virtualMachineProfile?: VirtualMachineScaleSetVMProfile; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Specifies whether the Virtual Machine Scale Set should be overprovisioned. - */ - overprovision?: boolean; - /** - * When Overprovision is enabled, extensions are launched only on the requested number of VMs - * which are finally kept. This property will hence ensure that the extensions do not run on the - * extra overprovisioned VMs. - */ - doNotRunExtensionsOnOverprovisionedVMs?: boolean; - /** - * Specifies the ID which uniquely identifies a Virtual Machine Scale Set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly uniqueId?: string; - /** - * When true this limits the scale set to a single placement group, of max size 100 virtual - * machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if - * singlePlacementGroup is false, it may not be modified to true. - */ - singlePlacementGroup?: boolean; - /** - * Whether to force strictly even Virtual Machine distribution cross x-zones in case there is - * zone outage. - */ - zoneBalance?: boolean; - /** - * Fault Domain count for each placement group. - */ - platformFaultDomainCount?: number; - /** - * Specifies information about the proximity placement group that the virtual machine scale set - * should be assigned to.

    Minimum api-version: 2018-04-01. - */ - proximityPlacementGroup?: SubResource; - /** - * Specifies information about the dedicated host group that the virtual machine scale set - * resides in.

    Minimum api-version: 2020-06-01. - */ - hostGroup?: SubResource; - /** - * Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual - * Machine Scale Set. For instance: whether the Virtual Machines have the capability to support - * attaching managed data disks with UltraSSD_LRS storage account type. - */ - additionalCapabilities?: AdditionalCapabilities; - /** - * Specifies the scale-in policy that decides which virtual machines are chosen for removal when - * a Virtual Machine Scale Set is scaled-in. - */ - scaleInPolicy?: ScaleInPolicy; - /** - * Specifies the orchestration mode for the virtual machine scale set. Possible values include: - * 'Uniform', 'Flexible' - */ - orchestrationMode?: OrchestrationMode; - /** - * The identity of the virtual machine scale set, if configured. - */ - identity?: VirtualMachineScaleSetIdentity; - /** - * The virtual machine scale set zones. NOTE: Availability zones can only be set when you create - * the scale set - */ - zones?: string[]; - /** - * The extended location of the Virtual Machine Scale Set. - */ - extendedLocation?: ExtendedLocation; -} - -/** - * Describes a Virtual Machine Scale Set VM Reimage Parameters. - */ -export interface VirtualMachineScaleSetVMReimageParameters - extends VirtualMachineReimageParameters {} - -/** - * Describes a Virtual Machine Scale Set VM Reimage Parameters. - */ -export interface VirtualMachineScaleSetReimageParameters - extends VirtualMachineScaleSetVMReimageParameters { - /** - * The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual - * machine scale set. - */ - instanceIds?: string[]; -} - -/** - * Describes a Virtual Machine Scale Set. - */ -export interface VirtualMachineScaleSetUpdate extends UpdateResource { - /** - * The virtual machine scale set sku. - */ - sku?: Sku; - /** - * The purchase plan when deploying a virtual machine scale set from VM Marketplace images. - */ - plan?: Plan; - /** - * The upgrade policy. - */ - upgradePolicy?: UpgradePolicy; - /** - * Policy for automatic repairs. - */ - automaticRepairsPolicy?: AutomaticRepairsPolicy; - /** - * The virtual machine profile. - */ - virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; - /** - * Specifies whether the Virtual Machine Scale Set should be overprovisioned. - */ - overprovision?: boolean; - /** - * When Overprovision is enabled, extensions are launched only on the requested number of VMs - * which are finally kept. This property will hence ensure that the extensions do not run on the - * extra overprovisioned VMs. - */ - doNotRunExtensionsOnOverprovisionedVMs?: boolean; - /** - * When true this limits the scale set to a single placement group, of max size 100 virtual - * machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if - * singlePlacementGroup is false, it may not be modified to true. - */ - singlePlacementGroup?: boolean; - /** - * Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual - * Machine Scale Set. For instance: whether the Virtual Machines have the capability to support - * attaching managed data disks with UltraSSD_LRS storage account type. - */ - additionalCapabilities?: AdditionalCapabilities; - /** - * Specifies the scale-in policy that decides which virtual machines are chosen for removal when - * a Virtual Machine Scale Set is scaled-in. - */ - scaleInPolicy?: ScaleInPolicy; - /** - * Specifies information about the proximity placement group that the virtual machine scale set - * should be assigned to.

    Minimum api-version: 2018-04-01. - */ - proximityPlacementGroup?: SubResource; - /** - * The identity of the virtual machine scale set, if configured. - */ - identity?: VirtualMachineScaleSetIdentity; -} - -/** - * Specifies a list of virtual machine instance IDs from the VM scale set. - */ -export interface VirtualMachineScaleSetVMInstanceIDs { - /** - * The virtual machine scale set instance ids. Omitting the virtual machine scale set instance - * ids will result in the operation being performed on all virtual machines in the virtual - * machine scale set. - */ - instanceIds?: string[]; -} - -/** - * Specifies a list of virtual machine instance IDs from the VM scale set. - */ -export interface VirtualMachineScaleSetVMInstanceRequiredIDs { - /** - * The virtual machine scale set instance ids. - */ - instanceIds: string[]; -} - -/** - * The status code and count of the virtual machine scale set instance view status summary. - */ -export interface VirtualMachineStatusCodeCount { - /** - * The instance view status code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * The number of instances having a particular status code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly count?: number; -} - -/** - * Instance view statuses summary for virtual machines of a virtual machine scale set. - */ -export interface VirtualMachineScaleSetInstanceViewStatusesSummary { - /** - * The extensions information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statusesSummary?: VirtualMachineStatusCodeCount[]; -} - -/** - * Extensions summary for virtual machines of a virtual machine scale set. - */ -export interface VirtualMachineScaleSetVMExtensionsSummary { - /** - * The extension name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The extensions information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statusesSummary?: VirtualMachineStatusCodeCount[]; -} - -/** - * Summary for an orchestration service of a virtual machine scale set. - */ -export interface OrchestrationServiceSummary { - /** - * The name of the service. Possible values include: 'AutomaticRepairs', - - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serviceName?: OrchestrationServiceNames; - /** - * The current state of the service. Possible values include: 'NotRunning', 'Running', - * 'Suspended' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serviceState?: OrchestrationServiceState; -} - -/** - * The instance view of a virtual machine scale set. - */ -export interface VirtualMachineScaleSetInstanceView { - /** - * The instance view status summary for the virtual machine scale set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly virtualMachine?: VirtualMachineScaleSetInstanceViewStatusesSummary; - /** - * The extensions information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly extensions?: VirtualMachineScaleSetVMExtensionsSummary[]; - /** - * The resource status information. - */ - statuses?: InstanceViewStatus[]; - /** - * The orchestration services information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly orchestrationServices?: OrchestrationServiceSummary[]; -} - -/** - * Describes scaling information of a sku. - */ -export interface VirtualMachineScaleSetSkuCapacity { - /** - * The minimum capacity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly maximum?: number; - /** - * The default capacity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly defaultCapacity?: number; - /** - * The scale type applicable to the sku. Possible values include: 'Automatic', 'None' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scaleType?: VirtualMachineScaleSetSkuScaleType; -} - -/** - * Describes an available virtual machine scale set sku. - */ -export interface VirtualMachineScaleSetSku { - /** - * The type of resource the sku applies to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: string; - /** - * The Sku. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sku?: Sku; - /** - * Specifies the number of virtual machines in the scale set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly capacity?: VirtualMachineScaleSetSkuCapacity; -} - -/** - * Information about rollback on failed VM instances after a OS Upgrade operation. - */ -export interface RollbackStatusInfo { - /** - * The number of instances which have been successfully rolled back. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly successfullyRolledbackInstanceCount?: number; - /** - * The number of instances which failed to rollback. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly failedRolledbackInstanceCount?: number; - /** - * Error details if OS rollback failed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly rollbackError?: ApiError; -} - -/** - * Information about the current running state of the overall upgrade. - */ -export interface UpgradeOperationHistoryStatus { - /** - * Code indicating the current status of the upgrade. Possible values include: 'RollingForward', - * 'Cancelled', 'Completed', 'Faulted' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: UpgradeState; - /** - * Start time of the upgrade. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly startTime?: Date; - /** - * End time of the upgrade. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly endTime?: Date; -} - -/** - * Information about the number of virtual machine instances in each upgrade state. - */ -export interface RollingUpgradeProgressInfo { - /** - * The number of instances that have been successfully upgraded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly successfulInstanceCount?: number; - /** - * The number of instances that have failed to be upgraded successfully. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly failedInstanceCount?: number; - /** - * The number of instances that are currently being upgraded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly inProgressInstanceCount?: number; - /** - * The number of instances that have not yet begun to be upgraded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly pendingInstanceCount?: number; -} - -/** - * Describes each OS upgrade on the Virtual Machine Scale Set. - */ -export interface UpgradeOperationHistoricalStatusInfoProperties { - /** - * Information about the overall status of the upgrade operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly runningStatus?: UpgradeOperationHistoryStatus; - /** - * Counts of the VMs in each state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly progress?: RollingUpgradeProgressInfo; - /** - * Error Details for this upgrade if there are any. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ApiError; - /** - * Invoker of the Upgrade Operation. Possible values include: 'Unknown', 'User', 'Platform' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly startedBy?: UpgradeOperationInvoker; - /** - * Image Reference details - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly targetImageReference?: ImageReference; - /** - * Information about OS rollback if performed - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly rollbackInfo?: RollbackStatusInfo; -} - -/** - * Virtual Machine Scale Set OS Upgrade History operation response. - */ -export interface UpgradeOperationHistoricalStatusInfo { - /** - * Information about the properties of the upgrade operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly properties?: UpgradeOperationHistoricalStatusInfoProperties; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; -} - -/** - * The instance view of a virtual machine scale set VM. - */ -export interface VirtualMachineScaleSetVMInstanceView { - /** - * The Update Domain count. - */ - platformUpdateDomain?: number; - /** - * The Fault Domain count. - */ - platformFaultDomain?: number; - /** - * The Remote desktop certificate thumbprint. - */ - rdpThumbPrint?: string; - /** - * The VM Agent running on the virtual machine. - */ - vmAgent?: VirtualMachineAgentInstanceView; - /** - * The Maintenance Operation status on the virtual machine. - */ - maintenanceRedeployStatus?: MaintenanceRedeployStatus; - /** - * The disks information. - */ - disks?: DiskInstanceView[]; - /** - * The extensions information. - */ - extensions?: VirtualMachineExtensionInstanceView[]; - /** - * The health status for the VM. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly vmHealth?: VirtualMachineHealthStatus; - /** - * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot - * to diagnose VM status.

    You can easily view the output of your console log.

    - * Azure also enables you to see a screenshot of the VM from the hypervisor. - */ - bootDiagnostics?: BootDiagnosticsInstanceView; - /** - * The resource status information. - */ - statuses?: InstanceViewStatus[]; - /** - * Resource id of the dedicated host, on which the virtual machine is allocated through automatic - * placement, when the virtual machine is associated with a dedicated host group that has - * automatic placement enabled.

    Minimum api-version: 2020-06-01. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly assignedHost?: string; - /** - * The placement group in which the VM is running. If the VM is deallocated it will not have a - * placementGroupId. - */ - placementGroupId?: string; -} - -/** - * Describes a virtual machine scale set VM network profile. - */ -export interface VirtualMachineScaleSetVMNetworkProfileConfiguration { - /** - * The list of network configurations. - */ - networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; -} - -/** - * The protection policy of a virtual machine scale set VM. - */ -export interface VirtualMachineScaleSetVMProtectionPolicy { - /** - * Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a - * scale-in operation. - */ - protectFromScaleIn?: boolean; - /** - * Indicates that model updates or actions (including scale-in) initiated on the virtual machine - * scale set should not be applied to the virtual machine scale set VM. - */ - protectFromScaleSetActions?: boolean; -} - -/** - * Describes a virtual machine scale set virtual machine. - */ -export interface VirtualMachineScaleSetVM extends Resource { - /** - * The virtual machine instance ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instanceId?: string; - /** - * The virtual machine SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sku?: Sku; - /** - * Specifies whether the latest model has been applied to the virtual machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly latestModelApplied?: boolean; - /** - * Azure VM unique ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly vmId?: string; - /** - * The virtual machine instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instanceView?: VirtualMachineScaleSetVMInstanceView; - /** - * Specifies the hardware settings for the virtual machine. - */ - hardwareProfile?: HardwareProfile; - /** - * Specifies the storage settings for the virtual machine disks. - */ - storageProfile?: StorageProfile; - /** - * Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. - * For instance: whether the virtual machine has the capability to support attaching managed data - * disks with UltraSSD_LRS storage account type. - */ - additionalCapabilities?: AdditionalCapabilities; - /** - * Specifies the operating system settings for the virtual machine. - */ - osProfile?: OSProfile; - /** - * Specifies the Security related profile settings for the virtual machine. - */ - securityProfile?: SecurityProfile; - /** - * Specifies the network interfaces of the virtual machine. - */ - networkProfile?: NetworkProfile; - /** - * Specifies the network profile configuration of the virtual machine. - */ - networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; - /** - * Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. - */ - diagnosticsProfile?: DiagnosticsProfile; - /** - * Specifies information about the availability set that the virtual machine should be assigned - * to. Virtual machines specified in the same availability set are allocated to different nodes - * to maximize availability. For more information about availability sets, see [Availability sets - * overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). - *

    For more information on Azure planned maintenance, see [Maintenance and updates for - * Virtual Machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    - * Currently, a VM can only be added to availability set at creation time. An existing VM cannot - * be added to an availability set. - */ - availabilitySet?: SubResource; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Specifies that the image or disk that is being used was licensed on-premises.

    - * Possible values for Windows Server operating system are:

    Windows_Client

    - * Windows_Server

    Possible values for Linux Server operating system are:

    - * RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure - * Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) - *

    [Azure Hybrid Use Benefit for Linux - * Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) - *

    Minimum api-version: 2015-06-15 - */ - licenseType?: string; - /** - * Specifies whether the model applied to the virtual machine is the model of the virtual machine - * scale set or the customized model for the virtual machine. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly modelDefinitionApplied?: string; - /** - * Specifies the protection policy of the virtual machine. - */ - protectionPolicy?: VirtualMachineScaleSetVMProtectionPolicy; - /** - * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in - * here.

    Minimum api-version: 2021-03-01 - */ - userData?: string; - /** - * Specifies information about the marketplace image used to create the virtual machine. This - * element is only used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, find the - * marketplace image that you want to use and then click **Want to deploy programmatically, Get - * Started ->**. Enter any required information and then click **Save**. - */ - plan?: Plan; - /** - * The virtual machine child extension resources. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resources?: VirtualMachineExtension[]; - /** - * The virtual machine zones. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly zones?: string[]; -} - -/** - * Information about the current running state of the overall upgrade. - */ -export interface RollingUpgradeRunningStatus { - /** - * Code indicating the current status of the upgrade. Possible values include: 'RollingForward', - * 'Cancelled', 'Completed', 'Faulted' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: RollingUpgradeStatusCode; - /** - * Start time of the upgrade. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly startTime?: Date; - /** - * The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastAction?: RollingUpgradeActionType; - /** - * Last action time of the upgrade. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastActionTime?: Date; -} - -/** - * The status of the latest virtual machine scale set rolling upgrade. - */ -export interface RollingUpgradeStatusInfo extends Resource { - /** - * The rolling upgrade policies applied for this upgrade. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly policy?: RollingUpgradePolicy; - /** - * Information about the current running state of the overall upgrade. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly runningStatus?: RollingUpgradeRunningStatus; - /** - * Information about the number of virtual machine instances in each upgrade state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly progress?: RollingUpgradeProgressInfo; - /** - * Error details for this upgrade, if there are any. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ApiError; -} - -/** - * Response after calling a manual recovery walk - */ -export interface RecoveryWalkResponse { - /** - * Whether the recovery walk was performed - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly walkPerformed?: boolean; - /** - * The next update domain that needs to be walked. Null means walk spanning all update domains - * has been completed - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextPlatformUpdateDomain?: number; -} - -/** - * Api input base class for LogAnalytics Api. - */ -export interface LogAnalyticsInputBase { - /** - * SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. - */ - blobContainerSasUri: string; - /** - * From time of the query - */ - fromTime: Date; - /** - * To time of the query - */ - toTime: Date; - /** - * Group query result by Throttle Policy applied. - */ - groupByThrottlePolicy?: boolean; - /** - * Group query result by Operation Name. - */ - groupByOperationName?: boolean; - /** - * Group query result by Resource Name. - */ - groupByResourceName?: boolean; - /** - * Group query result by Client Application ID. - */ - groupByClientApplicationId?: boolean; - /** - * Group query result by User Agent. - */ - groupByUserAgent?: boolean; -} - -/** - * Api request input for LogAnalytics getRequestRateByInterval Api. - */ -export interface RequestRateByIntervalInput extends LogAnalyticsInputBase { - /** - * Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: - * 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins' - */ - intervalLength: IntervalInMins; -} - -/** - * Api request input for LogAnalytics getThrottledRequests Api. - */ -export interface ThrottledRequestsInput extends LogAnalyticsInputBase {} - -/** - * LogAnalytics output properties - */ -export interface LogAnalyticsOutput { - /** - * Output file Uri path to blob container. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly output?: string; -} - -/** - * LogAnalytics operation status response - */ -export interface LogAnalyticsOperationResult { - /** - * LogAnalyticsOutput - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly properties?: LogAnalyticsOutput; -} - -/** - * An interface representing VMScaleSetConvertToSinglePlacementGroupInput. - */ -export interface VMScaleSetConvertToSinglePlacementGroupInput { - /** - * Id of the placement group in which you want future virtual machine instances to be placed. To - * query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, - * the platform will choose one with maximum number of virtual machine instances. - */ - activePlacementGroupId?: string; -} - -/** - * The input for OrchestrationServiceState - */ -export interface OrchestrationServiceStateInput { - /** - * The name of the service. Possible values include: 'AutomaticRepairs', - - */ - serviceName: OrchestrationServiceNames; - /** - * The action to be performed. Possible values include: 'Resume', 'Suspend' - */ - action: OrchestrationServiceStateAction; -} - -/** - * Describes the properties of a run command parameter. - */ -export interface RunCommandInputParameter { - /** - * The run command parameter name. - */ - name: string; - /** - * The run command parameter value. - */ - value: string; -} - -/** - * Capture Virtual Machine parameters. - */ -export interface RunCommandInput { - /** - * The run command id. - */ - commandId: string; - /** - * Optional. The script to be executed. When this value is given, the given script will override - * the default script of the command. - */ - script?: string[]; - /** - * The run command parameters. - */ - parameters?: RunCommandInputParameter[]; -} - -/** - * Describes the properties of a run command parameter. - */ -export interface RunCommandParameterDefinition { - /** - * The run command parameter name. - */ - name: string; - /** - * The run command parameter type. - */ - type: string; - /** - * The run command parameter default value. - */ - defaultValue?: string; - /** - * The run command parameter required. Default value: false. - */ - required?: boolean; -} - -/** - * Describes the properties of a Run Command metadata. - */ -export interface RunCommandDocumentBase { - /** - * The VM run command schema. - */ - schema: string; - /** - * The VM run command id. - */ - id: string; - /** - * The Operating System type. Possible values include: 'Windows', 'Linux' - */ - osType: OperatingSystemTypes; - /** - * The VM run command label. - */ - label: string; - /** - * The VM run command description. - */ - description: string; -} - -/** - * Describes the properties of a Run Command. - */ -export interface RunCommandDocument extends RunCommandDocumentBase { - /** - * The script to be executed. - */ - script: string[]; - /** - * The parameters used by the script. - */ - parameters?: RunCommandParameterDefinition[]; -} - -/** - * An interface representing RunCommandResult. - */ -export interface RunCommandResult { - /** - * Run command operation response. - */ - value?: InstanceViewStatus[]; -} - -/** - * The instance view of a virtual machine run command. - */ -export interface VirtualMachineRunCommandInstanceView { - /** - * Script execution status. Possible values include: 'Unknown', 'Pending', 'Running', 'Failed', - * 'Succeeded', 'TimedOut', 'Canceled' - */ - executionState?: ExecutionState; - /** - * Communicate script configuration errors or execution messages. - */ - executionMessage?: string; - /** - * Exit code returned from script execution. - */ - exitCode?: number; - /** - * Script output stream. - */ - output?: string; - /** - * Script error stream. - */ - error?: string; - /** - * Script start time. - */ - startTime?: Date; - /** - * Script end time. - */ - endTime?: Date; - /** - * The resource status information. - */ - statuses?: InstanceViewStatus[]; -} - -/** - * Describes the script sources for run command. - */ -export interface VirtualMachineRunCommandScriptSource { - /** - * Specifies the script content to be executed on the VM. - */ - script?: string; - /** - * Specifies the script download location. - */ - scriptUri?: string; - /** - * Specifies a commandId of predefined built-in script. - */ - commandId?: string; -} - -/** - * Describes a Virtual Machine run command. - */ -export interface VirtualMachineRunCommand extends Resource { - /** - * The source of the run command script. - */ - source?: VirtualMachineRunCommandScriptSource; - /** - * The parameters used by the script. - */ - parameters?: RunCommandInputParameter[]; - /** - * The parameters used by the script. - */ - protectedParameters?: RunCommandInputParameter[]; - /** - * Optional. If set to true, provisioning will complete as soon as the script starts and will not - * wait for script to complete. Default value: false. - */ - asyncExecution?: boolean; - /** - * Specifies the user account on the VM when executing the run command. - */ - runAsUser?: string; - /** - * Specifies the user account password on the VM when executing the run command. - */ - runAsPassword?: string; - /** - * The timeout in seconds to execute the run command. - */ - timeoutInSeconds?: number; - /** - * Specifies the Azure storage blob where script output stream will be uploaded. - */ - outputBlobUri?: string; - /** - * Specifies the Azure storage blob where script error stream will be uploaded. - */ - errorBlobUri?: string; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The virtual machine run command instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instanceView?: VirtualMachineRunCommandInstanceView; -} - -/** - * Describes a Virtual Machine run command. - */ -export interface VirtualMachineRunCommandUpdate extends UpdateResource { - /** - * The source of the run command script. - */ - source?: VirtualMachineRunCommandScriptSource; - /** - * The parameters used by the script. - */ - parameters?: RunCommandInputParameter[]; - /** - * The parameters used by the script. - */ - protectedParameters?: RunCommandInputParameter[]; - /** - * Optional. If set to true, provisioning will complete as soon as the script starts and will not - * wait for script to complete. Default value: false. - */ - asyncExecution?: boolean; - /** - * Specifies the user account on the VM when executing the run command. - */ - runAsUser?: string; - /** - * Specifies the user account password on the VM when executing the run command. - */ - runAsPassword?: string; - /** - * The timeout in seconds to execute the run command. - */ - timeoutInSeconds?: number; - /** - * Specifies the Azure storage blob where script output stream will be uploaded. - */ - outputBlobUri?: string; - /** - * Specifies the Azure storage blob where script error stream will be uploaded. - */ - errorBlobUri?: string; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The virtual machine run command instance view. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly instanceView?: VirtualMachineRunCommandInstanceView; -} - -/** - * Describes scaling information of a SKU. - */ -export interface ResourceSkuCapacity { - /** - * The minimum capacity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly maximum?: number; - /** - * The default capacity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly default?: number; - /** - * The scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scaleType?: ResourceSkuCapacityScaleType; -} - -/** - * Describes metadata for retrieving price info. - */ -export interface ResourceSkuCosts { - /** - * Used for querying price from commerce. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly meterID?: string; - /** - * The multiplier is needed to extend the base metered cost. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly quantity?: number; - /** - * An invariant to show the extended unit. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly extendedUnit?: string; -} - -/** - * Describes The SKU capabilities object. - */ -export interface ResourceSkuCapabilities { - /** - * An invariant to describe the feature. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * An invariant if the feature is measured by quantity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: string; -} - -/** - * Describes The zonal capabilities of a SKU. - */ -export interface ResourceSkuZoneDetails { - /** - * The set of zones that the SKU is available in with the specified capabilities. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string[]; - /** - * A list of capabilities that are available for the SKU in the specified list of zones. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly capabilities?: ResourceSkuCapabilities[]; -} - -/** - * An interface representing ResourceSkuRestrictionInfo. - */ -export interface ResourceSkuRestrictionInfo { - /** - * Locations where the SKU is restricted - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly locations?: string[]; - /** - * List of availability zones where the SKU is restricted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly zones?: string[]; -} - -/** - * Describes scaling information of a SKU. - */ -export interface ResourceSkuRestrictions { - /** - * The type of restrictions. Possible values include: 'Location', 'Zone' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: ResourceSkuRestrictionsType; - /** - * The value of restrictions. If the restriction type is set to location. This would be different - * locations where the SKU is restricted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly values?: string[]; - /** - * The information about the restriction where the SKU cannot be used. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly restrictionInfo?: ResourceSkuRestrictionInfo; - /** - * The reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly reasonCode?: ResourceSkuRestrictionsReasonCode; -} - -/** - * An interface representing ResourceSkuLocationInfo. - */ -export interface ResourceSkuLocationInfo { - /** - * Location of the SKU - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; - /** - * List of availability zones where the SKU is supported. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly zones?: string[]; - /** - * Details of capabilities available to a SKU in specific zones. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly zoneDetails?: ResourceSkuZoneDetails[]; -} - -/** - * Describes an available Compute SKU. - */ -export interface ResourceSku { - /** - * The type of resource the SKU applies to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: string; - /** - * The name of SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tier?: string; - /** - * The Size of the SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly size?: string; - /** - * The Family of this particular SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly family?: string; - /** - * The Kind of resources that are supported in this SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kind?: string; - /** - * Specifies the number of virtual machines in the scale set. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly capacity?: ResourceSkuCapacity; - /** - * The set of locations that the SKU is available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly locations?: string[]; - /** - * A list of locations and availability zones in those locations where the SKU is available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly locationInfo?: ResourceSkuLocationInfo[]; - /** - * The api versions that support this SKU. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly apiVersions?: string[]; - /** - * Metadata for retrieving price info. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly costs?: ResourceSkuCosts[]; - /** - * A name value pair to describe the capability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly capabilities?: ResourceSkuCapabilities[]; - /** - * The restrictions because of which SKU cannot be used. This is empty if there are no - * restrictions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly restrictions?: ResourceSkuRestrictions[]; -} - -/** - * The ProxyOnly Resource model definition. - */ -export interface ProxyOnlyResource { - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, - * Premium_ZRS, or StandardSSD_ZRS. - */ -export interface DiskSku { - /** - * The sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', - * 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS' - */ - name?: DiskStorageAccountTypes; - /** - * The sku tier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tier?: string; -} - -/** - * The source image used for creating the disk. - */ -export interface ImageDiskReference { - /** - * A relative uri containing either a Platform Image Repository or user image reference. - */ - id: string; - /** - * If the disk is created from an image's data disk, this is an index that indicates which of the - * data disks in the image to use. For OS disks, this field is null. - */ - lun?: number; -} - -/** - * Data used when creating a disk. - */ -export interface CreationData { - /** - * This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', - * 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload' - */ - createOption: DiskCreateOption; - /** - * Required if createOption is Import. The Azure Resource Manager identifier of the storage - * account containing the blob to import as a disk. - */ - storageAccountId?: string; - /** - * Disk source information. - */ - imageReference?: ImageDiskReference; - /** - * Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id - * of the shared galley image version from which to create a disk. - */ - galleryImageReference?: ImageDiskReference; - /** - * If createOption is Import, this is the URI of a blob to be imported into a managed disk. - */ - sourceUri?: string; - /** - * If createOption is Copy, this is the ARM id of the source snapshot or disk. - */ - sourceResourceId?: string; - /** - * If this field is set, this is the unique id identifying the source of this resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sourceUniqueId?: string; - /** - * If createOption is Upload, this is the size of the contents of the upload including the VHD - * footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and - * 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). - */ - uploadSizeBytes?: number; - /** - * Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the - * default. - */ - logicalSectorSize?: number; -} - -/** - * The vault id is an Azure Resource Manager Resource id in the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} - */ -export interface SourceVault { - /** - * Resource Id - */ - id?: string; -} - -/** - * Key Vault Secret Url and vault id of the encryption key - */ -export interface KeyVaultAndSecretReference { - /** - * Resource id of the KeyVault containing the key or secret - */ - sourceVault: SourceVault; - /** - * Url pointing to a key or secret in KeyVault - */ - secretUrl: string; -} - -/** - * Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the - * encryptionKey - */ -export interface KeyVaultAndKeyReference { - /** - * Resource id of the KeyVault containing the key or secret - */ - sourceVault: SourceVault; - /** - * Url pointing to a key or secret in KeyVault - */ - keyUrl: string; -} - -/** - * Encryption settings for one disk volume. - */ -export interface EncryptionSettingsElement { - /** - * Key Vault Secret Url and vault id of the disk encryption key - */ - diskEncryptionKey?: KeyVaultAndSecretReference; - /** - * Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and - * when provided is used to unwrap the disk encryption key. - */ - keyEncryptionKey?: KeyVaultAndKeyReference; -} - -/** - * Encryption settings for disk or snapshot - */ -export interface EncryptionSettingsCollection { - /** - * Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable - * encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to - * disable encryption. If EncryptionSettings is null in the request object, the existing settings - * remain unchanged. - */ - enabled: boolean; - /** - * A collection of encryption settings, one for each disk volume. - */ - encryptionSettings?: EncryptionSettingsElement[]; - /** - * Describes what type of encryption is used for the disks. Once this field is set, it cannot be - * overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to - * Azure Disk Encryption. - */ - encryptionSettingsVersion?: string; -} - -/** - * Encryption at rest settings for disk or snapshot - */ -export interface Encryption { - /** - * ResourceId of the disk encryption set to use for enabling encryption at rest. - */ - diskEncryptionSetId?: string; - /** - * Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', - * 'EncryptionAtRestWithPlatformAndCustomerKeys' - */ - type?: EncryptionType; -} - -/** - * An interface representing ShareInfoElement. - */ -export interface ShareInfoElement { - /** - * A relative URI containing the ID of the VM that has the disk attached. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly vmUri?: string; -} - -/** - * Properties of the disk for which update is pending. - */ -export interface PropertyUpdatesInProgress { - /** - * The target performance tier of the disk if a tier change operation is in progress. - */ - targetTier?: string; -} - -/** - * Contains the security related information for the resource. - */ -export interface DiskSecurityProfile { - /** - * Possible values include: 'TrustedLaunch' - */ - securityType?: DiskSecurityTypes; -} - -/** - * Disk resource. - */ -export interface Disk extends Resource { - /** - * A relative URI containing the ID of the VM that has the disk attached. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managedBy?: string; - /** - * List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares - * should be set to a value greater than one for disks to allow attaching them to multiple VMs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managedByExtended?: string[]; - sku?: DiskSku; - /** - * The Logical zone list for Disk. - */ - zones?: string[]; - /** - * The extended location where the disk will be created. Extended location cannot be changed. - */ - extendedLocation?: ExtendedLocation; - /** - * The time when the disk was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly timeCreated?: Date; - /** - * The Operating System type. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemTypes; - /** - * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values - * include: 'V1', 'V2' - */ - hyperVGeneration?: HyperVGeneration; - /** - * Purchase plan information for the the image from which the OS disk was created. E.g. - {name: - * 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} - */ - purchasePlan?: PurchasePlan; - /** - * Disk source information. CreationData information cannot be changed after the disk has been - * created. - */ - creationData: CreationData; - /** - * If creationData.createOption is Empty, this field is mandatory and it indicates the size of - * the disk to create. If this field is present for updates or creation with other options, it - * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and - * can only increase the disk's size. - */ - diskSizeGB?: number; - /** - * The size of the disk in bytes. This field is read only. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly diskSizeBytes?: number; - /** - * Unique Guid identifying the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly uniqueId?: string; - /** - * Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption - * settings per disk or snapshot. - */ - encryptionSettingsCollection?: EncryptionSettingsCollection; - /** - * The disk provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can - * transfer between 4k and 256k bytes. - */ - diskIOPSReadWrite?: number; - /** - * The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of - * bytes per second - MB here uses the ISO notation, of powers of 10. - */ - diskMBpsReadWrite?: number; - /** - * The total number of IOPS that will be allowed across all VMs mounting the shared disk as - * ReadOnly. One operation can transfer between 4k and 256k bytes. - */ - diskIOPSReadOnly?: number; - /** - * The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as - * ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers - * of 10. - */ - diskMBpsReadOnly?: number; - /** - * The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', - * 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' - */ - diskState?: DiskState; - /** - * Encryption property can be used to encrypt data at rest with customer managed keys or platform - * managed keys. - */ - encryption?: Encryption; - /** - * The maximum number of VMs that can attach to the disk at the same time. Value greater than one - * indicates a disk that can be mounted on multiple VMs at the same time. - */ - maxShares?: number; - /** - * Details of the list of all VMs that have the disk attached. maxShares should be set to a value - * greater than one for disks to allow attaching them to multiple VMs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly shareInfo?: ShareInfoElement[]; - /** - * Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' - */ - networkAccessPolicy?: NetworkAccessPolicy; - /** - * ARM id of the DiskAccess resource for using private endpoints on disks. - */ - diskAccessId?: string; - /** - * Performance tier of the disk (e.g, P4, S10) as described here: - * https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra - * disks. - */ - tier?: string; - /** - * Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting - * is disabled by default. Does not apply to Ultra disks. - */ - burstingEnabled?: boolean; - /** - * Properties of the disk for which update is pending. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; - /** - * Indicates the OS on a disk supports hibernation. - */ - supportsHibernation?: boolean; - /** - * Contains the security related information for the resource. - */ - securityProfile?: DiskSecurityProfile; -} - -/** - * Disk update resource. - */ -export interface DiskUpdate { - /** - * the Operating System type. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemTypes; - /** - * If creationData.createOption is Empty, this field is mandatory and it indicates the size of - * the disk to create. If this field is present for updates or creation with other options, it - * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and - * can only increase the disk's size. - */ - diskSizeGB?: number; - /** - * Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption - * settings per disk or snapshot. - */ - encryptionSettingsCollection?: EncryptionSettingsCollection; - /** - * The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can - * transfer between 4k and 256k bytes. - */ - diskIOPSReadWrite?: number; - /** - * The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of - * bytes per second - MB here uses the ISO notation, of powers of 10. - */ - diskMBpsReadWrite?: number; - /** - * The total number of IOPS that will be allowed across all VMs mounting the shared disk as - * ReadOnly. One operation can transfer between 4k and 256k bytes. - */ - diskIOPSReadOnly?: number; - /** - * The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as - * ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers - * of 10. - */ - diskMBpsReadOnly?: number; - /** - * The maximum number of VMs that can attach to the disk at the same time. Value greater than one - * indicates a disk that can be mounted on multiple VMs at the same time. - */ - maxShares?: number; - /** - * Encryption property can be used to encrypt data at rest with customer managed keys or platform - * managed keys. - */ - encryption?: Encryption; - /** - * Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' - */ - networkAccessPolicy?: NetworkAccessPolicy; - /** - * ARM id of the DiskAccess resource for using private endpoints on disks. - */ - diskAccessId?: string; - /** - * Performance tier of the disk (e.g, P4, S10) as described here: - * https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra - * disks. - */ - tier?: string; - /** - * Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting - * is disabled by default. Does not apply to Ultra disks. - */ - burstingEnabled?: boolean; - /** - * Purchase plan information to be added on the OS disk - */ - purchasePlan?: PurchasePlan; - /** - * Properties of the disk for which update is pending. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress; - /** - * Indicates the OS on a disk supports hibernation. - */ - supportsHibernation?: boolean; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - sku?: DiskSku; -} - -/** - * The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional - * parameter for incremental snapshot and the default behavior is the SKU will be set to the same - * sku as the previous snapshot - */ -export interface SnapshotSku { - /** - * The sku name. Possible values include: 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' - */ - name?: SnapshotStorageAccountTypes; - /** - * The sku tier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tier?: string; -} - -/** - * Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots - */ -export interface KeyForDiskEncryptionSet { - /** - * Resource id of the KeyVault containing the key or secret. This property is optional and cannot - * be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription. - */ - sourceVault?: SourceVault; - /** - * Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required - * regardless of rotationToLatestKeyVersionEnabled value. - */ - keyUrl: string; -} - -/** - * Data used for requesting a SAS. - */ -export interface GrantAccessData { - /** - * Possible values include: 'None', 'Read', 'Write' - */ - access: AccessLevel; - /** - * Time duration in seconds until the SAS access expires. - */ - durationInSeconds: number; -} - -/** - * A disk access SAS uri. - */ -export interface AccessUri { - /** - * A SAS uri for accessing a disk. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly accessSAS?: string; -} - -/** - * Snapshot resource. - */ -export interface Snapshot extends Resource { - /** - * Unused. Always Null. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly managedBy?: string; - sku?: SnapshotSku; - /** - * The extended location where the snapshot will be created. Extended location cannot be changed. - */ - extendedLocation?: ExtendedLocation; - /** - * The time when the snapshot was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly timeCreated?: Date; - /** - * The Operating System type. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemTypes; - /** - * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values - * include: 'V1', 'V2' - */ - hyperVGeneration?: HyperVGeneration; - /** - * Purchase plan information for the image from which the source disk for the snapshot was - * originally created. - */ - purchasePlan?: PurchasePlan; - /** - * Disk source information. CreationData information cannot be changed after the disk has been - * created. - */ - creationData: CreationData; - /** - * If creationData.createOption is Empty, this field is mandatory and it indicates the size of - * the disk to create. If this field is present for updates or creation with other options, it - * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and - * can only increase the disk's size. - */ - diskSizeGB?: number; - /** - * The size of the disk in bytes. This field is read only. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly diskSizeBytes?: number; - /** - * The state of the snapshot. Possible values include: 'Unattached', 'Attached', 'Reserved', - * 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' - */ - diskState?: DiskState; - /** - * Unique Guid identifying the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly uniqueId?: string; - /** - * Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption - * settings per disk or snapshot. - */ - encryptionSettingsCollection?: EncryptionSettingsCollection; - /** - * The disk provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space - * than full snapshots and can be diffed. - */ - incremental?: boolean; - /** - * Encryption property can be used to encrypt data at rest with customer managed keys or platform - * managed keys. - */ - encryption?: Encryption; - /** - * Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' - */ - networkAccessPolicy?: NetworkAccessPolicy; - /** - * ARM id of the DiskAccess resource for using private endpoints on disks. - */ - diskAccessId?: string; - /** - * Indicates the OS on a snapshot supports hibernation. - */ - supportsHibernation?: boolean; -} - -/** - * Snapshot update resource. - */ -export interface SnapshotUpdate { - /** - * the Operating System type. Possible values include: 'Windows', 'Linux' - */ - osType?: OperatingSystemTypes; - /** - * If creationData.createOption is Empty, this field is mandatory and it indicates the size of - * the disk to create. If this field is present for updates or creation with other options, it - * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and - * can only increase the disk's size. - */ - diskSizeGB?: number; - /** - * Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption - * settings per disk or snapshot. - */ - encryptionSettingsCollection?: EncryptionSettingsCollection; - /** - * Encryption property can be used to encrypt data at rest with customer managed keys or platform - * managed keys. - */ - encryption?: Encryption; - /** - * Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' - */ - networkAccessPolicy?: NetworkAccessPolicy; - /** - * ARM id of the DiskAccess resource for using private endpoints on disks. - */ - diskAccessId?: string; - /** - * Indicates the OS on a snapshot supports hibernation. - */ - supportsHibernation?: boolean; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - sku?: SnapshotSku; -} - -/** - * The managed identity for the disk encryption set. It should be given permission on the key vault - * before it can be used to encrypt disks. - */ -export interface EncryptionSetIdentity { - /** - * The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported - * for new creations. Disk Encryption Sets can be updated with Identity type None during - * migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted - * resources to lose access to the keys. Possible values include: 'SystemAssigned', 'None' - */ - type?: DiskEncryptionSetIdentityType; - /** - * The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the - * x-ms-identity-principal-id header in the PUT request if the resource has a - * systemAssigned(implicit) identity - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly principalId?: string; - /** - * The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the - * x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) - * identity - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tenantId?: string; -} - -/** - * disk encryption set resource. - */ -export interface DiskEncryptionSet extends Resource { - identity?: EncryptionSetIdentity; - /** - * Possible values include: 'EncryptionAtRestWithCustomerKey', - * 'EncryptionAtRestWithPlatformAndCustomerKeys' - */ - encryptionType?: DiskEncryptionSetType; - /** - * The key vault key which is currently used by this disk encryption set. - */ - activeKey?: KeyForDiskEncryptionSet; - /** - * A readonly collection of key vault keys previously used by this disk encryption set while a - * key rotation is in progress. It will be empty if there is no ongoing key rotation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly previousKeys?: KeyForDiskEncryptionSet[]; - /** - * The disk encryption set provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Set this flag to true to enable auto-updating of this disk encryption set to the latest key - * version. - */ - rotationToLatestKeyVersionEnabled?: boolean; - /** - * The time when the active key of this disk encryption set was updated. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastKeyRotationTimestamp?: Date; -} - -/** - * disk encryption set update resource. - */ -export interface DiskEncryptionSetUpdate { - /** - * Possible values include: 'EncryptionAtRestWithCustomerKey', - * 'EncryptionAtRestWithPlatformAndCustomerKeys' - */ - encryptionType?: DiskEncryptionSetType; - activeKey?: KeyForDiskEncryptionSet; - /** - * Set this flag to true to enable auto-updating of this disk encryption set to the latest key - * version. - */ - rotationToLatestKeyVersionEnabled?: boolean; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - identity?: EncryptionSetIdentity; -} - -/** - * The Private Endpoint resource. - */ -export interface PrivateEndpoint { - /** - * The ARM identifier for Private Endpoint - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; -} - -/** - * A collection of information about the state of the connection between service consumer and - * provider. - */ -export interface PrivateLinkServiceConnectionState { - /** - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. Possible values include: 'Pending', 'Approved', 'Rejected' - */ - status?: PrivateEndpointServiceConnectionStatus; - /** - * The reason for approval/rejection of the connection. - */ - description?: string; - /** - * A message indicating if changes on the service provider require any updates on the consumer. - */ - actionsRequired?: string; -} - -/** - * The Private Endpoint Connection resource. - */ -export interface PrivateEndpointConnection extends BaseResource { - /** - * The resource of private end point. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly privateEndpoint?: PrivateEndpoint; - /** - * A collection of information about the state of the connection between DiskAccess and Virtual - * Network. - */ - privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. Possible values include: - * 'Succeeded', 'Creating', 'Deleting', 'Failed' - */ - provisioningState?: PrivateEndpointConnectionProvisioningState; - /** - * private endpoint connection Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * private endpoint connection name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * private endpoint connection type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * disk access resource. - */ -export interface DiskAccess extends Resource { - /** - * A readonly collection of private endpoint connections created on the disk. Currently only one - * endpoint connection is supported. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - /** - * The disk access resource provisioning state. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The time when the disk access was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly timeCreated?: Date; -} - -/** - * Used for updating a disk access resource. - */ -export interface DiskAccessUpdate { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * A private link resource - */ -export interface PrivateLinkResource { - /** - * The private link resource group id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly groupId?: string; - /** - * The private link resource required member names. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly requiredMembers?: string[]; - /** - * The private link resource DNS zone name. - */ - requiredZoneNames?: string[]; - /** - * private link resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * private link resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * private link resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * Properties of disk restore point - */ -export interface DiskRestorePoint extends ProxyOnlyResource { - /** - * The timestamp of restorePoint creation - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly timeCreated?: Date; - /** - * arm id of source disk - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sourceResourceId?: string; - /** - * The Operating System type. Possible values include: 'Windows', 'Linux' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly osType?: OperatingSystemTypes; - /** - * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values - * include: 'V1', 'V2' - */ - hyperVGeneration?: HyperVGeneration; - /** - * Purchase plan information for the the image from which the OS disk was created. - */ - purchasePlan?: PurchasePlan; - /** - * id of the backing snapshot's MIS family - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly familyId?: string; - /** - * unique incarnation id of the source disk - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sourceUniqueId?: string; - /** - * Encryption property can be used to encrypt data at rest with customer managed keys or platform - * managed keys. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly encryption?: Encryption; - /** - * Indicates the OS on a disk supports hibernation. - */ - supportsHibernation?: boolean; -} - -/** - * A list of private link resources - */ -export interface PrivateLinkResourceListResult { - /** - * Array of private link resources - */ - value?: PrivateLinkResource[]; -} - -/** - * Describes the gallery unique name. - */ -export interface GalleryIdentifier { - /** - * The unique name of the Shared Image Gallery. This name is generated automatically by Azure. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly uniqueName?: string; -} - -/** - * Group of the gallery sharing profile - */ -export interface SharingProfileGroup { - /** - * This property allows you to specify the type of sharing group.

    Possible values are: - *

    **Subscriptions**

    **AADTenants**. Possible values include: 'Subscriptions', - * 'AADTenants' - */ - type?: SharingProfileGroupTypes; - /** - * A list of subscription/tenant ids the gallery is aimed to be shared to. - */ - ids?: string[]; -} - -/** - * Profile for gallery sharing to subscription or tenant - */ -export interface SharingProfile { - /** - * This property allows you to specify the permission of sharing gallery.

    Possible - * values are:

    **Private**

    **Groups**. Possible values include: 'Private', - * 'Groups' - */ - permissions?: GallerySharingPermissionTypes; - /** - * A list of sharing profile groups. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly groups?: SharingProfileGroup[]; -} - -/** - * Specifies information about the Shared Image Gallery that you want to create or update. - */ -export interface Gallery extends Resource { - /** - * The description of this Shared Image Gallery resource. This property is updatable. - */ - description?: string; - identifier?: GalleryIdentifier; - /** - * The current state of the gallery. The provisioning state, which only appears in the response. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - * 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; - sharingProfile?: SharingProfile; -} - -/** - * The Update Resource model definition. - */ -export interface UpdateResourceDefinition extends BaseResource { - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Specifies information about the Shared Image Gallery that you want to update. - */ -export interface GalleryUpdate extends UpdateResourceDefinition { - /** - * The description of this Shared Image Gallery resource. This property is updatable. - */ - description?: string; - identifier?: GalleryIdentifier; - /** - * The current state of the gallery. The provisioning state, which only appears in the response. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', - * 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; - sharingProfile?: SharingProfile; -} - -/** - * Specifies information about the gallery Application Definition that you want to create or - * update. - */ -export interface GalleryApplication extends Resource { - /** - * The description of this gallery Application Definition resource. This property is updatable. - */ - description?: string; - /** - * The Eula agreement for the gallery Application Definition. - */ - eula?: string; - /** - * The privacy statement uri. - */ - privacyStatementUri?: string; - /** - * The release note uri. - */ - releaseNoteUri?: string; - /** - * The end of life date of the gallery Application Definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; - /** - * This property allows you to specify the supported type of the OS that application is built - * for.

    Possible values are:

    **Windows**

    **Linux**. Possible values - * include: 'Windows', 'Linux' - */ - supportedOSType: OperatingSystemTypes; -} - -/** - * Specifies information about the gallery Application Definition that you want to update. - */ -export interface GalleryApplicationUpdate extends UpdateResourceDefinition { - /** - * The description of this gallery Application Definition resource. This property is updatable. - */ - description?: string; - /** - * The Eula agreement for the gallery Application Definition. - */ - eula?: string; - /** - * The privacy statement uri. - */ - privacyStatementUri?: string; - /** - * The release note uri. - */ - releaseNoteUri?: string; - /** - * The end of life date of the gallery Application Definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; - /** - * This property allows you to specify the supported type of the OS that application is built - * for.

    Possible values are:

    **Windows**

    **Linux**. Possible values - * include: 'Windows', 'Linux' - */ - supportedOSType: OperatingSystemTypes; -} - -/** - * The source image from which the Image Version is going to be created. - */ -export interface UserArtifactSource { - /** - * Required. The mediaLink of the artifact, must be a readable storage page blob. - */ - mediaLink: string; - /** - * Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. - */ - defaultConfigurationLink?: string; -} - -/** - * An interface representing UserArtifactManage. - */ -export interface UserArtifactManage { - /** - * Required. The path and arguments to install the gallery application. This is limited to 4096 - * characters. - */ - install: string; - /** - * Required. The path and arguments to remove the gallery application. This is limited to 4096 - * characters. - */ - remove: string; - /** - * Optional. The path and arguments to update the gallery application. If not present, then - * update operation will invoke remove command on the previous version and install command on the - * current version of the gallery application. This is limited to 4096 characters. - */ - update?: string; -} - -/** - * Describes the basic gallery artifact publishing profile. - */ -export interface GalleryArtifactPublishingProfileBase { - /** - * The target regions where the Image Version is going to be replicated to. This property is - * updatable. - */ - targetRegions?: TargetRegion[]; - /** - * The number of replicas of the Image Version to be created per region. This property would take - * effect for a region when regionalReplicaCount is not specified. This property is updatable. - */ - replicaCount?: number; - /** - * If set to true, Virtual Machines deployed from the latest version of the Image Definition - * won't use this Image Version. - */ - excludeFromLatest?: boolean; - /** - * The timestamp for when the gallery image version is published. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly publishedDate?: Date; - /** - * The end of life date of the gallery image version. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; - /** - * Specifies the storage account type to be used to store the image. This property is not - * updatable. Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Premium_LRS' - */ - storageAccountType?: StorageAccountType; -} - -/** - * The publishing profile of a gallery image version. - */ -export interface GalleryApplicationVersionPublishingProfile - extends GalleryArtifactPublishingProfileBase { - source: UserArtifactSource; - manageActions?: UserArtifactManage; - /** - * Optional. Whether or not this application reports health. - */ - enableHealthCheck?: boolean; -} - -/** - * This is the regional replication status. - */ -export interface RegionalReplicationStatus { - /** - * The region to which the gallery image version is being replicated to. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly region?: string; - /** - * This is the regional replication state. Possible values include: 'Unknown', 'Replicating', - * 'Completed', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly state?: ReplicationState; - /** - * The details of the replication status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly details?: string; - /** - * It indicates progress of the replication job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly progress?: number; -} - -/** - * This is the replication status of the gallery image version. - */ -export interface ReplicationStatus { - /** - * This is the aggregated replication status based on all the regional replication status flags. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly aggregatedState?: AggregatedReplicationState; - /** - * This is a summary of replication status for each region. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly summary?: RegionalReplicationStatus[]; -} - -/** - * Specifies information about the gallery Application Version that you want to create or update. - */ -export interface GalleryApplicationVersion extends Resource { - publishingProfile: GalleryApplicationVersionPublishingProfile; - /** - * The current state of the gallery Application Version. The provisioning state, which only - * appears in the response. Possible values include: 'Creating', 'Updating', 'Failed', - * 'Succeeded', 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState1; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly replicationStatus?: ReplicationStatus; -} - -/** - * Specifies information about the gallery Application Version that you want to update. - */ -export interface GalleryApplicationVersionUpdate extends UpdateResourceDefinition { - publishingProfile: GalleryApplicationVersionPublishingProfile; - /** - * The current state of the gallery Application Version. The provisioning state, which only - * appears in the response. Possible values include: 'Creating', 'Updating', 'Failed', - * 'Succeeded', 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState1; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly replicationStatus?: ReplicationStatus; -} - -/** - * This is the gallery image definition identifier. - */ -export interface GalleryImageIdentifier { - /** - * The name of the gallery image definition publisher. - */ - publisher: string; - /** - * The name of the gallery image definition offer. - */ - offer: string; - /** - * The name of the gallery image definition SKU. - */ - sku: string; -} - -/** - * Describes the resource range. - */ -export interface ResourceRange { - /** - * The minimum number of the resource. - */ - min?: number; - /** - * The maximum number of the resource. - */ - max?: number; -} - -/** - * The properties describe the recommended machine configuration for this Image Definition. These - * properties are updatable. - */ -export interface RecommendedMachineConfiguration { - vCPUs?: ResourceRange; - memory?: ResourceRange; -} - -/** - * Describes the disallowed disk types. - */ -export interface Disallowed { - /** - * A list of disk types. - */ - diskTypes?: string[]; -} - -/** - * Describes the gallery image definition purchase plan. This is used by marketplace images. - */ -export interface ImagePurchasePlan { - /** - * The plan ID. - */ - name?: string; - /** - * The publisher ID. - */ - publisher?: string; - /** - * The product ID. - */ - product?: string; -} - -/** - * A feature for gallery image. - */ -export interface GalleryImageFeature { - /** - * The name of the gallery image feature. - */ - name?: string; - /** - * The value of the gallery image feature. - */ - value?: string; -} - -/** - * Specifies information about the gallery image definition that you want to create or update. - */ -export interface GalleryImage extends Resource { - /** - * The description of this gallery image definition resource. This property is updatable. - */ - description?: string; - /** - * The Eula agreement for the gallery image definition. - */ - eula?: string; - /** - * The privacy statement uri. - */ - privacyStatementUri?: string; - /** - * The release note uri. - */ - releaseNoteUri?: string; - /** - * This property allows you to specify the type of the OS that is included in the disk when - * creating a VM from a managed image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - */ - osType: OperatingSystemTypes; - /** - * This property allows the user to specify whether the virtual machines created under this image - * are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized' - */ - osState: OperatingSystemStateTypes; - /** - * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values - * include: 'V1', 'V2' - */ - hyperVGeneration?: HyperVGeneration; - /** - * The end of life date of the gallery image definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; - identifier: GalleryImageIdentifier; - recommended?: RecommendedMachineConfiguration; - disallowed?: Disallowed; - purchasePlan?: ImagePurchasePlan; - /** - * The current state of the gallery image definition. The provisioning state, which only appears - * in the response. Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - * 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState2; - /** - * A list of gallery image features. - */ - features?: GalleryImageFeature[]; -} - -/** - * Specifies information about the gallery image definition that you want to update. - */ -export interface GalleryImageUpdate extends UpdateResourceDefinition { - /** - * The description of this gallery image definition resource. This property is updatable. - */ - description?: string; - /** - * The Eula agreement for the gallery image definition. - */ - eula?: string; - /** - * The privacy statement uri. - */ - privacyStatementUri?: string; - /** - * The release note uri. - */ - releaseNoteUri?: string; - /** - * This property allows you to specify the type of the OS that is included in the disk when - * creating a VM from a managed image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - */ - osType: OperatingSystemTypes; - /** - * This property allows the user to specify whether the virtual machines created under this image - * are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized' - */ - osState: OperatingSystemStateTypes; - /** - * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values - * include: 'V1', 'V2' - */ - hyperVGeneration?: HyperVGeneration; - /** - * The end of life date of the gallery image definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; - identifier: GalleryImageIdentifier; - recommended?: RecommendedMachineConfiguration; - disallowed?: Disallowed; - purchasePlan?: ImagePurchasePlan; - /** - * The current state of the gallery image definition. The provisioning state, which only appears - * in the response. Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - * 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState2; - /** - * A list of gallery image features. - */ - features?: GalleryImageFeature[]; -} - -/** - * The publishing profile of a gallery image Version. - */ -export interface GalleryImageVersionPublishingProfile - extends GalleryArtifactPublishingProfileBase {} - -/** - * The gallery artifact version source. - */ -export interface GalleryArtifactVersionSource { - /** - * The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user - * image or storage account resource. - */ - id?: string; - /** - * The uri of the gallery artifact version source. Currently used to specify vhd/blob source. - */ - uri?: string; -} - -/** - * This is the disk image base class. - */ -export interface GalleryDiskImage { - /** - * This property indicates the size of the VHD to be created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sizeInGB?: number; - /** - * The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible - * values include: 'None', 'ReadOnly', 'ReadWrite' - */ - hostCaching?: HostCaching; - source?: GalleryArtifactVersionSource; -} - -/** - * This is the OS disk image. - */ -export interface GalleryOSDiskImage extends GalleryDiskImage {} - -/** - * This is the data disk image. - */ -export interface GalleryDataDiskImage extends GalleryDiskImage { - /** - * This property specifies the logical unit number of the data disk. This value is used to - * identify data disks within the Virtual Machine and therefore must be unique for each data disk - * attached to the Virtual Machine. - */ - lun: number; -} - -/** - * This is the storage profile of a Gallery Image Version. - */ -export interface GalleryImageVersionStorageProfile { - source?: GalleryArtifactVersionSource; - osDiskImage?: GalleryOSDiskImage; - /** - * A list of data disk images. - */ - dataDiskImages?: GalleryDataDiskImage[]; -} - -/** - * Specifies information about the gallery image version that you want to create or update. - */ -export interface GalleryImageVersion extends Resource { - publishingProfile?: GalleryImageVersionPublishingProfile; - /** - * The current state of the gallery image version. The provisioning state, which only appears in - * the response. Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - * 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState3; - storageProfile: GalleryImageVersionStorageProfile; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly replicationStatus?: ReplicationStatus; -} - -/** - * Specifies information about the gallery image version that you want to update. - */ -export interface GalleryImageVersionUpdate extends UpdateResourceDefinition { - publishingProfile?: GalleryImageVersionPublishingProfile; - /** - * The current state of the gallery image version. The provisioning state, which only appears in - * the response. Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', - * 'Deleting', 'Migrating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState3; - storageProfile: GalleryImageVersionStorageProfile; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly replicationStatus?: ReplicationStatus; -} - -/** - * This is the disk image encryption base class. - */ -export interface DiskImageEncryption { - /** - * A relative URI containing the resource ID of the disk encryption set. - */ - diskEncryptionSetId?: string; -} - -/** - * Contains encryption settings for an OS disk image. - */ -export interface OSDiskImageEncryption extends DiskImageEncryption {} - -/** - * Contains encryption settings for a data disk image. - */ -export interface DataDiskImageEncryption extends DiskImageEncryption { - /** - * This property specifies the logical unit number of the data disk. This value is used to - * identify data disks within the Virtual Machine and therefore must be unique for each data disk - * attached to the Virtual Machine. - */ - lun: number; -} - -/** - * Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in - * the gallery artifact. - */ -export interface EncryptionImages { - osDiskImage?: OSDiskImageEncryption; - /** - * A list of encryption specifications for data disk images. - */ - dataDiskImages?: DataDiskImageEncryption[]; -} - -/** - * Describes the target region information. - */ -export interface TargetRegion { - /** - * The name of the region. - */ - name: string; - /** - * The number of replicas of the Image Version to be created per region. This property is - * updatable. - */ - regionalReplicaCount?: number; - /** - * Specifies the storage account type to be used to store the image. This property is not - * updatable. Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Premium_LRS' - */ - storageAccountType?: StorageAccountType; - encryption?: EncryptionImages; -} - -/** - * The managed artifact. - */ -export interface ManagedArtifact { - /** - * The managed artifact id. - */ - id: string; -} - -/** - * The source image from which the Image Version is going to be created. - */ -export interface GalleryArtifactSource { - managedImage: ManagedArtifact; -} - -/** - * Specifies information about the gallery sharing profile update. - */ -export interface SharingUpdate extends BaseResource { - /** - * This property allows you to specify the operation type of gallery sharing update.

    - * Possible values are:

    **Add**

    **Remove**

    **Reset**. Possible values - * include: 'Add', 'Remove', 'Reset' - */ - operationType: SharingUpdateOperationTypes; - /** - * A list of sharing profile groups. - */ - groups?: SharingProfileGroup[]; -} - -/** - * The Resource model definition. - */ -export interface PirResource { - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource location - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; -} - -/** - * Base information about the shared gallery resource in pir. - */ -export interface PirSharedGalleryResource extends PirResource { - /** - * The unique id of this shared gallery. - */ - uniqueId?: string; -} - -/** - * Specifies information about the Shared Gallery that you want to create or update. - */ -export interface SharedGallery extends PirSharedGalleryResource {} - -/** - * Specifies information about the gallery image definition that you want to create or update. - */ -export interface SharedGalleryImage extends PirSharedGalleryResource { - /** - * This property allows you to specify the type of the OS that is included in the disk when - * creating a VM from a managed image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - */ - osType: OperatingSystemTypes; - /** - * This property allows the user to specify whether the virtual machines created under this image - * are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized' - */ - osState: OperatingSystemStateTypes; - /** - * The end of life date of the gallery image definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; - identifier: GalleryImageIdentifier; - recommended?: RecommendedMachineConfiguration; - disallowed?: Disallowed; - /** - * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values - * include: 'V1', 'V2' - */ - hyperVGeneration?: HyperVGeneration; - /** - * A list of gallery image features. - */ - features?: GalleryImageFeature[]; - purchasePlan?: ImagePurchasePlan; -} - -/** - * Specifies information about the gallery image version that you want to create or update. - */ -export interface SharedGalleryImageVersion extends PirSharedGalleryResource { - /** - * The published date of the gallery image version Definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - publishedDate?: Date; - /** - * The end of life date of the gallery image version Definition. This property can be used for - * decommissioning purposes. This property is updatable. - */ - endOfLifeDate?: Date; -} - -/** - * An interface representing InstanceSku. - */ -export interface InstanceSku { - /** - * The sku name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The tier of the cloud service role instance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tier?: string; -} - -/** - * Describes the network profile for the role instance. - */ -export interface RoleInstanceNetworkProfile { - /** - * Specifies the list of resource Ids for the network interfaces associated with the role - * instance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly networkInterfaces?: SubResource[]; -} - -/** - * Instance view status. - */ -export interface ResourceInstanceViewStatus { - /** - * The status code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * The short localizable label for the status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly displayStatus?: string; - /** - * The detailed status message, including for alerts and error messages. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; - /** - * The time of the status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly time?: Date; - /** - * The level code. Possible values include: 'Info', 'Warning', 'Error' - */ - level?: StatusLevelTypes; -} - -/** - * The instance view of the role instance. - */ -export interface RoleInstanceInstanceView { - /** - * The Update Domain. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly platformUpdateDomain?: number; - /** - * The Fault Domain. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly platformFaultDomain?: number; - /** - * Specifies a unique identifier generated internally for the cloud service associated with this - * role instance.

    NOTE: If you are using Azure Diagnostics extension, this property - * can be used as 'DeploymentId' for querying details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly privateId?: string; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statuses?: ResourceInstanceViewStatus[]; -} - -/** - * An interface representing RoleInstanceProperties. - */ -export interface RoleInstanceProperties { - networkProfile?: RoleInstanceNetworkProfile; - instanceView?: RoleInstanceInstanceView; -} - -/** - * An interface representing RoleInstance. - */ -export interface RoleInstance { - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource Name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource Type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource Location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; - /** - * Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; - sku?: InstanceSku; - properties?: RoleInstanceProperties; -} - -/** - * Describes the cloud service role sku. - */ -export interface CloudServiceRoleSku { - /** - * The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is - * currently on, you need to delete and recreate the cloud service or move back to the old sku. - */ - name?: string; - /** - * Specifies the tier of the cloud service. Possible Values are

    **Standard**

    **Basic** - */ - tier?: string; - /** - * Specifies the number of role instances in the cloud service. - */ - capacity?: number; -} - -/** - * An interface representing CloudServiceRoleProperties. - */ -export interface CloudServiceRoleProperties { - /** - * Specifies the ID which uniquely identifies a cloud service role. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly uniqueId?: string; -} - -/** - * Describes a role of the cloud service. - */ -export interface CloudServiceRole { - /** - * Resource id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; - sku?: CloudServiceRoleSku; - properties?: CloudServiceRoleProperties; -} - -/** - * Describes the role properties. - */ -export interface CloudServiceRoleProfileProperties { - /** - * Resource name. - */ - name?: string; - sku?: CloudServiceRoleSku; -} - -/** - * Describes the role profile for the cloud service. - */ -export interface CloudServiceRoleProfile { - /** - * List of roles for the cloud service. - */ - roles?: CloudServiceRoleProfileProperties[]; -} - -/** - * Describes a single certificate reference in a Key Vault, and where the certificate should reside - * on the role instance. - */ -export interface CloudServiceVaultCertificate { - /** - * This is the URL of a certificate that has been uploaded to Key Vault as a secret. - */ - certificateUrl?: string; -} - -/** - * Describes a set of certificates which are all in the same Key Vault. - */ -export interface CloudServiceVaultSecretGroup { - /** - * The relative URL of the Key Vault containing all of the certificates in VaultCertificates. - */ - sourceVault?: SubResource; - /** - * The list of key vault references in SourceVault which contain certificates. - */ - vaultCertificates?: CloudServiceVaultCertificate[]; -} - -/** - * Describes the OS profile for the cloud service. - */ -export interface CloudServiceOsProfile { - /** - * Specifies set of certificates that should be installed onto the role instances. - */ - secrets?: CloudServiceVaultSecretGroup[]; -} - -/** - * Describes a cloud service IP Configuration - */ -export interface LoadBalancerFrontendIPConfigurationProperties { - /** - * The reference to the public ip address resource. - */ - publicIPAddress?: SubResource; - /** - * The reference to the virtual network subnet resource. - */ - subnet?: SubResource; - /** - * The virtual network private IP address of the IP configuration. - */ - privateIPAddress?: string; -} - -/** - * An interface representing LoadBalancerFrontendIPConfiguration. - */ -export interface LoadBalancerFrontendIPConfiguration { - /** - * The name of the resource that is unique within the set of frontend IP configurations used by - * the load balancer. This name can be used to access the resource. - */ - name: string; - /** - * Properties of load balancer frontend ip configuration. - */ - properties: LoadBalancerFrontendIPConfigurationProperties; -} - -/** - * An interface representing LoadBalancerConfigurationProperties. - */ -export interface LoadBalancerConfigurationProperties { - /** - * Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is - * supported. Each load balancer configuration must have exactly one frontend IP configuration. - */ - frontendIPConfigurations: LoadBalancerFrontendIPConfiguration[]; -} - -/** - * Describes the load balancer configuration. - */ -export interface LoadBalancerConfiguration { - /** - * Resource Id - */ - id?: string; - /** - * The name of the Load balancer - */ - name: string; - /** - * Properties of the load balancer configuration. - */ - properties: LoadBalancerConfigurationProperties; -} - -/** - * Network Profile for the cloud service. - */ -export interface CloudServiceNetworkProfile { - /** - * List of Load balancer configurations. Cloud service can have up to two load balancer - * configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. - */ - loadBalancerConfigurations?: LoadBalancerConfiguration[]; - /** - * The id reference of the cloud service containing the target IP with which the subject cloud - * service can perform a swap. This property cannot be updated once it is set. The swappable - * cloud service referred by this id must be present otherwise an error will be thrown. - */ - swappableCloudService?: SubResource; -} - -/** - * An interface representing CloudServiceVaultAndSecretReference. - */ -export interface CloudServiceVaultAndSecretReference { - sourceVault?: SubResource; - secretUrl?: string; -} - -/** - * Extension Properties. - */ -export interface CloudServiceExtensionProperties { - /** - * The name of the extension handler publisher. - */ - publisher?: string; - /** - * Specifies the type of the extension. - */ - type?: string; - /** - * Specifies the version of the extension. Specifies the version of the extension. If this - * element is not specified or an asterisk (*) is used as the value, the latest version of the - * extension is used. If the value is specified with a major version number and an asterisk as - * the minor version number (X.), the latest minor version of the specified major version is - * selected. If a major version number and a minor version number are specified (X.Y), the - * specific extension version is selected. If a version is specified, an auto-upgrade is - * performed on the role instance. - */ - typeHandlerVersion?: string; - /** - * Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher - * minor versions when they become available. - */ - autoUpgradeMinorVersion?: boolean; - /** - * Public settings for the extension. For JSON extensions, this is the JSON settings for the - * extension. For XML Extension (like RDP), this is the XML setting for the extension. - */ - settings?: string; - /** - * Protected settings for the extension which are encrypted before sent to the role instance. - */ - protectedSettings?: string; - protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; - /** - * Tag to force apply the provided public and protected settings. - * Changing the tag value allows for re-running the extension without changing any of the public - * or protected settings. - * If forceUpdateTag is not changed, updates to public or protected settings would still be - * applied by the handler. - * If neither forceUpdateTag nor any of public or protected settings change, extension would flow - * to the role instance with the same sequence-number, and - * it is up to handler implementation whether to re-run it or not - */ - forceUpdateTag?: string; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * Optional list of roles to apply this extension. If property is not specified or '*' is - * specified, extension is applied to all roles in the cloud service. - */ - rolesAppliedTo?: string[]; -} - -/** - * Describes a cloud service Extension. - */ -export interface Extension { - /** - * The name of the extension. - */ - name?: string; - properties?: CloudServiceExtensionProperties; -} - -/** - * Describes a cloud service extension profile. - */ -export interface CloudServiceExtensionProfile { - /** - * List of extensions for the cloud service. - */ - extensions?: Extension[]; -} - -/** - * Cloud service properties - */ -export interface CloudServiceProperties { - /** - * Specifies a URL that refers to the location of the service package in the Blob service. The - * service package URL can be Shared Access Signature (SAS) URI from any storage account. - * This is a write-only property and is not returned in GET calls. - */ - packageUrl?: string; - /** - * Specifies the XML service configuration (.cscfg) for the cloud service. - */ - configuration?: string; - /** - * Specifies a URL that refers to the location of the service configuration in the Blob service. - * The service package URL can be Shared Access Signature (SAS) URI from any storage account. - * This is a write-only property and is not returned in GET calls. - */ - configurationUrl?: string; - /** - * (Optional) Indicates whether to start the cloud service immediately after it is created. The - * default value is `true`. - * If false, the service model is still deployed, but the code is not run immediately. Instead, - * the service is PoweredOff until you call Start, at which time the service will be started. A - * deployed service still incurs charges, even if it is poweredoff. - */ - startCloudService?: boolean; - /** - * (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the - * model/template should override the role instance count and vm size specified in the .cscfg and - * .csdef respectively. - * The default value is `false`. - */ - allowModelOverride?: boolean; - /** - * Possible values include: 'Auto', 'Manual', 'Simultaneous' - */ - upgradeMode?: CloudServiceUpgradeMode; - roleProfile?: CloudServiceRoleProfile; - osProfile?: CloudServiceOsProfile; - networkProfile?: CloudServiceNetworkProfile; - extensionProfile?: CloudServiceExtensionProfile; - /** - * The provisioning state, which only appears in the response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; - /** - * The unique identifier for the cloud service. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly uniqueId?: string; -} - -/** - * Describes the cloud service. - */ -export interface CloudService extends BaseResource { - /** - * Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location. - */ - location: string; - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - properties?: CloudServiceProperties; -} - -/** - * An interface representing CloudServiceUpdate. - */ -export interface CloudServiceUpdate { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * An interface representing StatusCodeCount. - */ -export interface StatusCodeCount { - /** - * The instance view status code - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * Number of instances having this status code - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly count?: number; -} - -/** - * Instance view statuses. - */ -export interface InstanceViewStatusesSummary { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statusesSummary?: StatusCodeCount[]; -} - -/** - * InstanceView of CloudService as a whole - */ -export interface CloudServiceInstanceView { - roleInstance?: InstanceViewStatusesSummary; - /** - * The version of the SDK that was used to generate the package for the cloud service. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sdkVersion?: string; - /** - * Specifies a list of unique identifiers generated internally for the cloud service.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as - * 'DeploymentId' for querying details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly privateIds?: string[]; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly statuses?: ResourceInstanceViewStatus[]; -} - -/** - * Specifies a list of role instances from the cloud service. - */ -export interface RoleInstances { - /** - * List of cloud service role instance names. Value of '*' will signify all role instances of the - * cloud service. - */ - roleInstances: string[]; -} - -/** - * Defines an update domain for the cloud service. - */ -export interface UpdateDomain { - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource Name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; -} - -/** - * OS version properties. - */ -export interface OSVersionProperties { - /** - * The family of this OS version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly family?: string; - /** - * The family label of this OS version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly familyLabel?: string; - /** - * The OS version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; - /** - * The OS version label. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly label?: string; - /** - * Specifies whether this is the default OS version for its family. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isDefault?: boolean; - /** - * Specifies whether this OS version is active. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isActive?: boolean; -} - -/** - * Describes a cloud service OS version. - */ -export interface OSVersion { - /** - * Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; - properties?: OSVersionProperties; -} - -/** - * Configuration view of an OS version. - */ -export interface OSVersionPropertiesBase { - /** - * The OS version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: string; - /** - * The OS version label. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly label?: string; - /** - * Specifies whether this is the default OS version for its family. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isDefault?: boolean; - /** - * Specifies whether this OS version is active. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isActive?: boolean; -} - -/** - * OS family properties. - */ -export interface OSFamilyProperties { - /** - * The OS family name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The OS family label. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly label?: string; - /** - * List of OS versions belonging to this family. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly versions?: OSVersionPropertiesBase[]; -} - -/** - * Describes a cloud service OS family. - */ -export interface OSFamily { - /** - * Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; - properties?: OSFamilyProperties; -} - -/** - * Optional Parameters. - */ -export interface AvailabilitySetsListBySubscriptionOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply to the operation. Allowed values are 'instanceView'. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface AvailabilitySetsListBySubscriptionNextOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply to the operation. Allowed values are 'instanceView'. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface ProximityPlacementGroupsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * includeColocationStatus=true enables fetching the colocation status of all the resources in - * the proximity placement group. - */ - includeColocationStatus?: string; -} - -/** - * Optional Parameters. - */ -export interface DedicatedHostGroupsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of - * instance views of the dedicated hosts under the dedicated host group. 'UserData' is not - * supported for dedicated host group. Possible values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface DedicatedHostsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of - * instance views of the dedicated host. 'UserData' is not supported for dedicated host. Possible - * values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineExtensionImagesListVersionsOptionalParams - extends msRest.RequestOptionsBase { - /** - * The filter to apply on the operation. - */ - filter?: string; - top?: number; - orderby?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineExtensionsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineExtensionsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineImagesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; - top?: number; - orderby?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineImagesEdgeZoneListOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; - /** - * An integer value specifying the number of images to return that matches supplied values. - */ - top?: number; - /** - * Specifies the order of the results returned. Formatted as an OData query. - */ - orderby?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete virtual machines.(Feature in Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the - * runtime properties of the virtual machine that is managed by the platform and can change - * outside of control plane operations. 'UserData' retrieves the UserData property as part of the - * VM model view that was provided by the user during the VM Create/Update operation. Possible - * values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesListAllOptionalParams extends msRest.RequestOptionsBase { - /** - * statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. - */ - statusOnly?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesPowerOffOptionalParams extends msRest.RequestOptionsBase { - /** - * The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false - * if not specified. Default value: false. - */ - skipShutdown?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesReimageOptionalParams extends msRest.RequestOptionsBase { - /** - * Parameters supplied to the Reimage Virtual Machine operation. - */ - parameters?: VirtualMachineReimageParameters; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams - extends msRest.RequestOptionsBase { - /** - * Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. - *

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration - * of 120 minutes. - */ - sasUriExpirationTimeInMinutes?: number; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete virtual machines.(Feature in Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesBeginPowerOffOptionalParams extends msRest.RequestOptionsBase { - /** - * The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false - * if not specified. Default value: false. - */ - skipShutdown?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesBeginReimageOptionalParams extends msRest.RequestOptionsBase { - /** - * Parameters supplied to the Reimage Virtual Machine operation. - */ - parameters?: VirtualMachineReimageParameters; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachinesListAllNextOptionalParams extends msRest.RequestOptionsBase { - /** - * statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. - */ - statusOnly?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsDeleteMethodOptionalParams - extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete a VM scale set. (Feature in Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. 'UserData' retrieves the UserData property of - * the VM scale set that was provided by the user during the VM scale set Create/Update - * operation. Possible values include: 'userData' - */ - expand?: ExpandTypesForGetVMScaleSets; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsDeallocateOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsDeleteInstancesOptionalParams - extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete virtual machines from the VM scale set. (Feature in - * Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsPowerOffOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; - /** - * The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false - * if not specified. Default value: false. - */ - skipShutdown?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsRestartOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsStartOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsRedeployOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsPerformMaintenanceOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsReimageOptionalParams extends msRest.RequestOptionsBase { - /** - * Parameters for Reimaging VM ScaleSet. - */ - vmScaleSetReimageInput?: VirtualMachineScaleSetReimageParameters; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsReimageAllOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginDeleteMethodOptionalParams - extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete a VM scale set. (Feature in Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginDeallocateOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginDeleteInstancesOptionalParams - extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete virtual machines from the VM scale set. (Feature in - * Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginPowerOffOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; - /** - * The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false - * if not specified. Default value: false. - */ - skipShutdown?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginRestartOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginStartOptionalParams extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginRedeployOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginPerformMaintenanceOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginReimageOptionalParams - extends msRest.RequestOptionsBase { - /** - * Parameters for Reimaging VM ScaleSet. - */ - vmScaleSetReimageInput?: VirtualMachineScaleSetReimageParameters; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetsBeginReimageAllOptionalParams - extends msRest.RequestOptionsBase { - /** - * A list of virtual machine instance IDs from the VM scale set. - */ - vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; -} - -/** - * Optional Parameters. - */ -export interface ImagesGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface RestorePointCollectionsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. If expand=restorePoints, server will return - * all contained restore points in the restorePointCollection. Possible values include: - * 'restorePoints' - */ - expand?: RestorePointCollectionExpandOptions; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetExtensionsGetOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMExtensionsGetOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMExtensionsListOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsReimageOptionalParams extends msRest.RequestOptionsBase { - /** - * Parameters for the Reimaging Virtual machine in ScaleSet. - */ - vmScaleSetVMReimageInput?: VirtualMachineScaleSetVMReimageParameters; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsDeleteMethodOptionalParams - extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. 'InstanceView' will retrieve the instance - * view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine. - * Possible values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. Allowed values are - * 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied - * eq true', 'properties/latestModelApplied eq false'. - */ - filter?: string; - /** - * The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. - */ - select?: string; - /** - * The expand expression to apply to the operation. Allowed values are 'instanceView'. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsPowerOffOptionalParams extends msRest.RequestOptionsBase { - /** - * The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false - * if not specified. Default value: false. - */ - skipShutdown?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams - extends msRest.RequestOptionsBase { - /** - * Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. - *

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration - * of 120 minutes. - */ - sasUriExpirationTimeInMinutes?: number; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsBeginReimageOptionalParams - extends msRest.RequestOptionsBase { - /** - * Parameters for the Reimaging Virtual machine in ScaleSet. - */ - vmScaleSetVMReimageInput?: VirtualMachineScaleSetVMReimageParameters; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsBeginDeleteMethodOptionalParams - extends msRest.RequestOptionsBase { - /** - * Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview) - */ - forceDeletion?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsBeginPowerOffOptionalParams - extends msRest.RequestOptionsBase { - /** - * The parameter to request non-graceful VM shutdown. True value for this flag indicates - * non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false - * if not specified. Default value: false. - */ - skipShutdown?: boolean; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMsListNextOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. Allowed values are - * 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied - * eq true', 'properties/latestModelApplied eq false'. - */ - filter?: string; - /** - * The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. - */ - select?: string; - /** - * The expand expression to apply to the operation. Allowed values are 'instanceView'. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineRunCommandsGetByVirtualMachineOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineRunCommandsListByVirtualMachineOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMRunCommandsGetOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMRunCommandsListOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface VirtualMachineScaleSetVMRunCommandsListNextOptionalParams - extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. - */ - expand?: string; -} - -/** - * Optional Parameters. - */ -export interface ResourceSkusListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply on the operation. Only **location** filter is supported currently. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface ResourceSkusListNextOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply on the operation. Only **location** filter is supported currently. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface GalleriesGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The select expression to apply on the operation. Possible values include: 'Permissions' - */ - select?: SelectPermissions; -} - -/** - * Optional Parameters. - */ -export interface GalleryImageVersionsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' - */ - expand?: ReplicationStatusTypes; -} - -/** - * Optional Parameters. - */ -export interface GalleryApplicationVersionsGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply on the operation. Possible values include: 'ReplicationStatus' - */ - expand?: ReplicationStatusTypes; -} - -/** - * Optional Parameters. - */ -export interface SharedGalleriesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - * Possible values include: 'tenant' - */ - sharedTo?: SharedToValues; -} - -/** - * Optional Parameters. - */ -export interface SharedGalleriesListNextOptionalParams extends msRest.RequestOptionsBase { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - * Possible values include: 'tenant' - */ - sharedTo?: SharedToValues; -} - -/** - * Optional Parameters. - */ -export interface SharedGalleryImagesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - * Possible values include: 'tenant' - */ - sharedTo?: SharedToValues; -} - -/** - * Optional Parameters. - */ -export interface SharedGalleryImagesListNextOptionalParams extends msRest.RequestOptionsBase { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - * Possible values include: 'tenant' - */ - sharedTo?: SharedToValues; -} - -/** - * Optional Parameters. - */ -export interface SharedGalleryImageVersionsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - * Possible values include: 'tenant' - */ - sharedTo?: SharedToValues; -} - -/** - * Optional Parameters. - */ -export interface SharedGalleryImageVersionsListNextOptionalParams - extends msRest.RequestOptionsBase { - /** - * The query parameter to decide what shared galleries to fetch when doing listing operations. - * Possible values include: 'tenant' - */ - sharedTo?: SharedToValues; -} - -/** - * Optional Parameters. - */ -export interface CloudServiceRoleInstancesGetOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply to the operation. 'UserData' is not supported for cloud - * services. Possible values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface CloudServiceRoleInstancesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply to the operation. 'UserData' is not supported for cloud - * services. Possible values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface CloudServiceRoleInstancesListNextOptionalParams extends msRest.RequestOptionsBase { - /** - * The expand expression to apply to the operation. 'UserData' is not supported for cloud - * services. Possible values include: 'instanceView', 'userData' - */ - expand?: InstanceViewTypes; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * The cloud service object. - */ - parameters?: CloudService; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * The cloud service object. - */ - parameters?: CloudServiceUpdate; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesRestartOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesReimageOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesRebuildOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesDeleteInstancesOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * The cloud service object. - */ - parameters?: CloudService; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * The cloud service object. - */ - parameters?: CloudServiceUpdate; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesBeginRestartOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesBeginReimageOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesBeginRebuildOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * Optional Parameters. - */ -export interface CloudServicesBeginDeleteInstancesOptionalParams extends msRest.RequestOptionsBase { - /** - * List of cloud service role instance names. - */ - parameters?: RoleInstances; -} - -/** - * An interface representing ComputeManagementClientOptions. - */ -export interface ComputeManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} - -/** - * @interface - * The List Compute Operation operation response. - * @extends Array - */ -export interface ComputeOperationListResult extends Array {} - -/** - * @interface - * The List Availability Set operation response. - * @extends Array - */ -export interface AvailabilitySetListResult extends Array { - /** - * The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the - * next page of AvailabilitySets. - */ - nextLink?: string; -} - -/** - * @interface - * The List Virtual Machine operation response. - * @extends Array - */ -export interface VirtualMachineSizeListResult extends Array {} - -/** - * @interface - * The List Proximity Placement Group operation response. - * @extends Array - */ -export interface ProximityPlacementGroupListResult extends Array { - /** - * The URI to fetch the next page of proximity placement groups. - */ - nextLink?: string; -} - -/** - * @interface - * The List Dedicated Host Group with resource group response. - * @extends Array - */ -export interface DedicatedHostGroupListResult extends Array { - /** - * The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to - * fetch the next page of Dedicated Host Groups. - */ - nextLink?: string; -} - -/** - * @interface - * The list dedicated host operation response. - * @extends Array - */ -export interface DedicatedHostListResult extends Array { - /** - * The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the - * next page of dedicated hosts. - */ - nextLink?: string; -} - -/** - * @interface - * The list SSH public keys operation response. - * @extends Array - */ -export interface SshPublicKeysGroupListResult extends Array { - /** - * The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the - * next page of SSH public keys. - */ - nextLink?: string; -} - -/** - * @interface - * The List Usages operation response. - * @extends Array - */ -export interface ListUsagesResult extends Array { - /** - * The URI to fetch the next page of compute resource usage information. Call ListNext() with - * this to fetch the next page of compute resource usage information. - */ - nextLink?: string; -} - -/** - * @interface - * The List Virtual Machine operation response. - * @extends Array - */ -export interface VirtualMachineListResult extends Array { - /** - * The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of - * Virtual Machines. - */ - nextLink?: string; -} - -/** - * @interface - * The List Virtual Machine operation response. - * @extends Array - */ -export interface VirtualMachineScaleSetListResult extends Array { - /** - * The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to - * fetch the next page of VMSS. - */ - nextLink?: string; -} - -/** - * @interface - * The List Virtual Machine operation response. - * @extends Array - */ -export interface VirtualMachineScaleSetListWithLinkResult extends Array { - /** - * The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to - * fetch the next page of Virtual Machine Scale Sets. - */ - nextLink?: string; -} - -/** - * @interface - * The Virtual Machine Scale Set List Skus operation response. - * @extends Array - */ -export interface VirtualMachineScaleSetListSkusResult extends Array { - /** - * The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to - * fetch the next page of VMSS Skus. - */ - nextLink?: string; -} - -/** - * @interface - * List of Virtual Machine Scale Set OS Upgrade History operation response. - * @extends Array - */ -export interface VirtualMachineScaleSetListOSUpgradeHistory - extends Array { - /** - * The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the - * next page of history of upgrades. - */ - nextLink?: string; -} - -/** - * @interface - * The List Image operation response. - * @extends Array - */ -export interface ImageListResult extends Array { - /** - * The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of - * Images. - */ - nextLink?: string; -} - -/** - * @interface - * The List restore point collection operation response. - * @extends Array - */ -export interface RestorePointCollectionListResult extends Array { - /** - * The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch - * the next page of RestorePointCollections - */ - nextLink?: string; -} - -/** - * @interface - * The List VM scale set extension operation response. - * @extends Array - */ -export interface VirtualMachineScaleSetExtensionListResult - extends Array { - /** - * The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch - * the next page of VM scale set extensions. - */ - nextLink?: string; -} - -/** - * @interface - * The List Virtual Machine Scale Set VMs operation response. - * @extends Array - */ -export interface VirtualMachineScaleSetVMListResult extends Array { - /** - * The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to - * fetch the next page of VMSS VMs - */ - nextLink?: string; -} - -/** - * @interface - * The List Virtual Machine operation response. - * @extends Array - */ -export interface RunCommandListResult extends Array { - /** - * The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next - * page of run commands. - */ - nextLink?: string; -} - -/** - * @interface - * The List run command operation response - * @extends Array - */ -export interface VirtualMachineRunCommandsListResult extends Array { - /** - * The uri to fetch the next page of run commands. - */ - nextLink?: string; -} - -/** - * @interface - * The List Resource Skus operation response. - * @extends Array - */ -export interface ResourceSkusResult extends Array { - /** - * The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the - * next page of Resource Skus - */ - nextLink?: string; -} - -/** - * @interface - * The List Disks operation response. - * @extends Array - */ -export interface DiskList extends Array { - /** - * The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of - * disks. - */ - nextLink?: string; -} - -/** - * @interface - * The List Snapshots operation response. - * @extends Array - */ -export interface SnapshotList extends Array { - /** - * The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page - * of snapshots. - */ - nextLink?: string; -} - -/** - * @interface - * The List disk encryption set operation response. - * @extends Array - */ -export interface DiskEncryptionSetList extends Array { - /** - * The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the - * next page of disk encryption sets. - */ - nextLink?: string; -} - -/** - * @interface - * The List resources which are encrypted with the disk encryption set. - * @extends Array - */ -export interface ResourceUriList extends Array { - /** - * The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the - * next page of encrypted resources. - */ - nextLink?: string; -} - -/** - * @interface - * The List disk access operation response. - * @extends Array - */ -export interface DiskAccessList extends Array { - /** - * The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch - * the next page of disk access resources. - */ - nextLink?: string; -} - -/** - * @interface - * A list of private link resources - * @extends Array - */ -export interface PrivateEndpointConnectionListResult extends Array { - /** - * The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page - * of snapshots. - */ - nextLink?: string; -} - -/** - * @interface - * The List Disk Restore Points operation response. - * @extends Array - */ -export interface DiskRestorePointList extends Array { - /** - * The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the - * next page of disk restore points. - */ - nextLink?: string; -} - -/** - * @interface - * The List Galleries operation response. - * @extends Array - */ -export interface GalleryList extends Array { - /** - * The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page - * of galleries. - */ - nextLink?: string; -} - -/** - * @interface - * The List Gallery Images operation response. - * @extends Array - */ -export interface GalleryImageList extends Array { - /** - * The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call - * ListNext() with this to fetch the next page of gallery image definitions. - */ - nextLink?: string; -} - -/** - * @interface - * The List Gallery Image version operation response. - * @extends Array - */ -export interface GalleryImageVersionList extends Array { - /** - * The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch - * the next page of gallery image versions. - */ - nextLink?: string; -} - -/** - * @interface - * The List Gallery Applications operation response. - * @extends Array - */ -export interface GalleryApplicationList extends Array { - /** - * The uri to fetch the next page of Application Definitions in the Application Gallery. Call - * ListNext() with this to fetch the next page of gallery Application Definitions. - */ - nextLink?: string; -} - -/** - * @interface - * The List Gallery Application version operation response. - * @extends Array - */ -export interface GalleryApplicationVersionList extends Array { - /** - * The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to - * fetch the next page of gallery Application Versions. - */ - nextLink?: string; -} - -/** - * @interface - * The List Shared Galleries operation response. - * @extends Array - */ -export interface SharedGalleryList extends Array { - /** - * The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the - * next page of shared galleries. - */ - nextLink?: string; -} - -/** - * @interface - * The List Shared Gallery Images operation response. - * @extends Array - */ -export interface SharedGalleryImageList extends Array { - /** - * The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch - * the next page of shared gallery images. - */ - nextLink?: string; -} - -/** - * @interface - * The List Shared Gallery Image versions operation response. - * @extends Array - */ -export interface SharedGalleryImageVersionList extends Array { - /** - * The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to - * fetch the next page of shared gallery image versions. - */ - nextLink?: string; -} - -/** - * @interface - * An interface representing the RoleInstanceListResult. - * @extends Array - */ -export interface RoleInstanceListResult extends Array { - nextLink?: string; -} - -/** - * @interface - * An interface representing the CloudServiceRoleListResult. - * @extends Array - */ -export interface CloudServiceRoleListResult extends Array { - nextLink?: string; -} - -/** - * @interface - * An interface representing the CloudServiceListResult. - * @extends Array - */ -export interface CloudServiceListResult extends Array { - nextLink?: string; -} - -/** - * @interface - * An interface representing the UpdateDomainListResult. - * @extends Array - */ -export interface UpdateDomainListResult extends Array { - nextLink?: string; -} - -/** - * @interface - * An interface representing the OSVersionListResult. - * @extends Array - */ -export interface OSVersionListResult extends Array { - nextLink?: string; -} - -/** - * @interface - * An interface representing the OSFamilyListResult. - * @extends Array - */ -export interface OSFamilyListResult extends Array { - nextLink?: string; -} - -/** - * Defines values for VirtualMachineSizeTypes. - * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', - * 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', - * 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', - * 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', - * 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', - * 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', - * 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - * 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', - * 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', - * 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', - * 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', - * 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - * 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', - * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - * 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', - * 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', - * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', - * 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', - * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - * 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', - * 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', - * 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', - * 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', - * 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', - * 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', - * 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', - * 'Standard_NV24' - * @readonly - * @enum {string} - */ -export type VirtualMachineSizeTypes = - | "Basic_A0" - | "Basic_A1" - | "Basic_A2" - | "Basic_A3" - | "Basic_A4" - | "Standard_A0" - | "Standard_A1" - | "Standard_A2" - | "Standard_A3" - | "Standard_A4" - | "Standard_A5" - | "Standard_A6" - | "Standard_A7" - | "Standard_A8" - | "Standard_A9" - | "Standard_A10" - | "Standard_A11" - | "Standard_A1_v2" - | "Standard_A2_v2" - | "Standard_A4_v2" - | "Standard_A8_v2" - | "Standard_A2m_v2" - | "Standard_A4m_v2" - | "Standard_A8m_v2" - | "Standard_B1s" - | "Standard_B1ms" - | "Standard_B2s" - | "Standard_B2ms" - | "Standard_B4ms" - | "Standard_B8ms" - | "Standard_D1" - | "Standard_D2" - | "Standard_D3" - | "Standard_D4" - | "Standard_D11" - | "Standard_D12" - | "Standard_D13" - | "Standard_D14" - | "Standard_D1_v2" - | "Standard_D2_v2" - | "Standard_D3_v2" - | "Standard_D4_v2" - | "Standard_D5_v2" - | "Standard_D2_v3" - | "Standard_D4_v3" - | "Standard_D8_v3" - | "Standard_D16_v3" - | "Standard_D32_v3" - | "Standard_D64_v3" - | "Standard_D2s_v3" - | "Standard_D4s_v3" - | "Standard_D8s_v3" - | "Standard_D16s_v3" - | "Standard_D32s_v3" - | "Standard_D64s_v3" - | "Standard_D11_v2" - | "Standard_D12_v2" - | "Standard_D13_v2" - | "Standard_D14_v2" - | "Standard_D15_v2" - | "Standard_DS1" - | "Standard_DS2" - | "Standard_DS3" - | "Standard_DS4" - | "Standard_DS11" - | "Standard_DS12" - | "Standard_DS13" - | "Standard_DS14" - | "Standard_DS1_v2" - | "Standard_DS2_v2" - | "Standard_DS3_v2" - | "Standard_DS4_v2" - | "Standard_DS5_v2" - | "Standard_DS11_v2" - | "Standard_DS12_v2" - | "Standard_DS13_v2" - | "Standard_DS14_v2" - | "Standard_DS15_v2" - | "Standard_DS13-4_v2" - | "Standard_DS13-2_v2" - | "Standard_DS14-8_v2" - | "Standard_DS14-4_v2" - | "Standard_E2_v3" - | "Standard_E4_v3" - | "Standard_E8_v3" - | "Standard_E16_v3" - | "Standard_E32_v3" - | "Standard_E64_v3" - | "Standard_E2s_v3" - | "Standard_E4s_v3" - | "Standard_E8s_v3" - | "Standard_E16s_v3" - | "Standard_E32s_v3" - | "Standard_E64s_v3" - | "Standard_E32-16_v3" - | "Standard_E32-8s_v3" - | "Standard_E64-32s_v3" - | "Standard_E64-16s_v3" - | "Standard_F1" - | "Standard_F2" - | "Standard_F4" - | "Standard_F8" - | "Standard_F16" - | "Standard_F1s" - | "Standard_F2s" - | "Standard_F4s" - | "Standard_F8s" - | "Standard_F16s" - | "Standard_F2s_v2" - | "Standard_F4s_v2" - | "Standard_F8s_v2" - | "Standard_F16s_v2" - | "Standard_F32s_v2" - | "Standard_F64s_v2" - | "Standard_F72s_v2" - | "Standard_G1" - | "Standard_G2" - | "Standard_G3" - | "Standard_G4" - | "Standard_G5" - | "Standard_GS1" - | "Standard_GS2" - | "Standard_GS3" - | "Standard_GS4" - | "Standard_GS5" - | "Standard_GS4-8" - | "Standard_GS4-4" - | "Standard_GS5-16" - | "Standard_GS5-8" - | "Standard_H8" - | "Standard_H16" - | "Standard_H8m" - | "Standard_H16m" - | "Standard_H16r" - | "Standard_H16mr" - | "Standard_L4s" - | "Standard_L8s" - | "Standard_L16s" - | "Standard_L32s" - | "Standard_M64s" - | "Standard_M64ms" - | "Standard_M128s" - | "Standard_M128ms" - | "Standard_M64-32ms" - | "Standard_M64-16ms" - | "Standard_M128-64ms" - | "Standard_M128-32ms" - | "Standard_NC6" - | "Standard_NC12" - | "Standard_NC24" - | "Standard_NC24r" - | "Standard_NC6s_v2" - | "Standard_NC12s_v2" - | "Standard_NC24s_v2" - | "Standard_NC24rs_v2" - | "Standard_NC6s_v3" - | "Standard_NC12s_v3" - | "Standard_NC24s_v3" - | "Standard_NC24rs_v3" - | "Standard_ND6s" - | "Standard_ND12s" - | "Standard_ND24s" - | "Standard_ND24rs" - | "Standard_NV6" - | "Standard_NV12" - | "Standard_NV24"; - -/** - * Defines values for OperatingSystemType. - * Possible values include: 'Windows', 'Linux' - * @readonly - * @enum {string} - */ -export type OperatingSystemType = "Windows" | "Linux"; - -/** - * Defines values for CachingTypes. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * @readonly - * @enum {string} - */ -export type CachingTypes = "None" | "ReadOnly" | "ReadWrite"; - -/** - * Defines values for StorageAccountTypes. - * Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', - * 'Premium_ZRS', 'StandardSSD_ZRS' - * @readonly - * @enum {string} - */ -export type StorageAccountTypes = - | "Standard_LRS" - | "Premium_LRS" - | "StandardSSD_LRS" - | "UltraSSD_LRS" - | "Premium_ZRS" - | "StandardSSD_ZRS"; - -/** - * Defines values for PassNames. - * Possible values include: 'OobeSystem' - * @readonly - * @enum {string} - */ -export type PassNames = "OobeSystem"; - -/** - * Defines values for ComponentNames. - * Possible values include: 'Microsoft-Windows-Shell-Setup' - * @readonly - * @enum {string} - */ -export type ComponentNames = "Microsoft-Windows-Shell-Setup"; - -/** - * Defines values for SettingNames. - * Possible values include: 'AutoLogon', 'FirstLogonCommands' - * @readonly - * @enum {string} - */ -export type SettingNames = "AutoLogon" | "FirstLogonCommands"; - -/** - * Defines values for WindowsVMGuestPatchMode. - * Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' - * @readonly - * @enum {string} - */ -export type WindowsVMGuestPatchMode = "Manual" | "AutomaticByOS" | "AutomaticByPlatform"; - -/** - * Defines values for WindowsPatchAssessmentMode. - * Possible values include: 'ImageDefault', 'AutomaticByPlatform' - * @readonly - * @enum {string} - */ -export type WindowsPatchAssessmentMode = "ImageDefault" | "AutomaticByPlatform"; - -/** - * Defines values for ProtocolTypes. - * Possible values include: 'Http', 'Https' - * @readonly - * @enum {string} - */ -export type ProtocolTypes = "Http" | "Https"; - -/** - * Defines values for LinuxVMGuestPatchMode. - * Possible values include: 'ImageDefault', 'AutomaticByPlatform' - * @readonly - * @enum {string} - */ -export type LinuxVMGuestPatchMode = "ImageDefault" | "AutomaticByPlatform"; - -/** - * Defines values for LinuxPatchAssessmentMode. - * Possible values include: 'ImageDefault', 'AutomaticByPlatform' - * @readonly - * @enum {string} - */ -export type LinuxPatchAssessmentMode = "ImageDefault" | "AutomaticByPlatform"; - -/** - * Defines values for SecurityTypes. - * Possible values include: 'TrustedLaunch' - * @readonly - * @enum {string} - */ -export type SecurityTypes = "TrustedLaunch"; - -/** - * Defines values for ConsistencyModeTypes. - * Possible values include: 'CrashConsistent', 'FileSystemConsistent', 'ApplicationConsistent' - * @readonly - * @enum {string} - */ -export type ConsistencyModeTypes = - | "CrashConsistent" - | "FileSystemConsistent" - | "ApplicationConsistent"; - -/** - * Defines values for VmDiskTypes. - * Possible values include: 'None', 'Unmanaged' - * @readonly - * @enum {string} - */ -export type VmDiskTypes = "None" | "Unmanaged"; - -/** - * Defines values for HyperVGenerationTypes. - * Possible values include: 'V1', 'V2' - * @readonly - * @enum {string} - */ -export type HyperVGenerationTypes = "V1" | "V2"; - -/** - * Defines values for StatusLevelTypes. - * Possible values include: 'Info', 'Warning', 'Error' - * @readonly - * @enum {string} - */ -export type StatusLevelTypes = "Info" | "Warning" | "Error"; - -/** - * Defines values for AvailabilitySetSkuTypes. - * Possible values include: 'Classic', 'Aligned' - * @readonly - * @enum {string} - */ -export type AvailabilitySetSkuTypes = "Classic" | "Aligned"; - -/** - * Defines values for ProximityPlacementGroupType. - * Possible values include: 'Standard', 'Ultra' - * @readonly - * @enum {string} - */ -export type ProximityPlacementGroupType = "Standard" | "Ultra"; - -/** - * Defines values for DedicatedHostLicenseTypes. - * Possible values include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual' - * @readonly - * @enum {string} - */ -export type DedicatedHostLicenseTypes = - | "None" - | "Windows_Server_Hybrid" - | "Windows_Server_Perpetual"; - -/** - * Defines values for ExtendedLocationTypes. - * Possible values include: 'EdgeZone' - * @readonly - * @enum {string} - */ -export type ExtendedLocationTypes = "EdgeZone"; - -/** - * Defines values for VMGuestPatchRebootBehavior. - * Possible values include: 'Unknown', 'NeverReboots', 'AlwaysRequiresReboot', 'CanRequestReboot' - * @readonly - * @enum {string} - */ -export type VMGuestPatchRebootBehavior = - | "Unknown" - | "NeverReboots" - | "AlwaysRequiresReboot" - | "CanRequestReboot"; - -/** - * Defines values for PatchAssessmentState. - * Possible values include: 'Unknown', 'Available' - * @readonly - * @enum {string} - */ -export type PatchAssessmentState = "Unknown" | "Available"; - -/** - * Defines values for PatchOperationStatus. - * Possible values include: 'Unknown', 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' - * @readonly - * @enum {string} - */ -export type PatchOperationStatus = - | "Unknown" - | "InProgress" - | "Failed" - | "Succeeded" - | "CompletedWithWarnings"; - -/** - * Defines values for VMGuestPatchRebootSetting. - * Possible values include: 'IfRequired', 'Never', 'Always' - * @readonly - * @enum {string} - */ -export type VMGuestPatchRebootSetting = "IfRequired" | "Never" | "Always"; - -/** - * Defines values for VMGuestPatchClassificationWindows. - * Possible values include: 'Critical', 'Security', 'UpdateRollUp', 'FeaturePack', 'ServicePack', - * 'Definition', 'Tools', 'Updates' - * @readonly - * @enum {string} - */ -export type VMGuestPatchClassificationWindows = - | "Critical" - | "Security" - | "UpdateRollUp" - | "FeaturePack" - | "ServicePack" - | "Definition" - | "Tools" - | "Updates"; - -/** - * Defines values for VMGuestPatchClassificationLinux. - * Possible values include: 'Critical', 'Security', 'Other' - * @readonly - * @enum {string} - */ -export type VMGuestPatchClassificationLinux = "Critical" | "Security" | "Other"; - -/** - * Defines values for VMGuestPatchRebootStatus. - * Possible values include: 'Unknown', 'NotNeeded', 'Required', 'Started', 'Failed', 'Completed' - * @readonly - * @enum {string} - */ -export type VMGuestPatchRebootStatus = - | "Unknown" - | "NotNeeded" - | "Required" - | "Started" - | "Failed" - | "Completed"; - -/** - * Defines values for PatchInstallationState. - * Possible values include: 'Unknown', 'Installed', 'Failed', 'Excluded', 'NotSelected', 'Pending' - * @readonly - * @enum {string} - */ -export type PatchInstallationState = - | "Unknown" - | "Installed" - | "Failed" - | "Excluded" - | "NotSelected" - | "Pending"; - -/** - * Defines values for OperatingSystemTypes. - * Possible values include: 'Windows', 'Linux' - * @readonly - * @enum {string} - */ -export type OperatingSystemTypes = "Windows" | "Linux"; - -/** - * Defines values for DiskCreateOptionTypes. - * Possible values include: 'FromImage', 'Empty', 'Attach' - * @readonly - * @enum {string} - */ -export type DiskCreateOptionTypes = "FromImage" | "Empty" | "Attach"; - -/** - * Defines values for DiskDetachOptionTypes. - * Possible values include: 'ForceDetach' - * @readonly - * @enum {string} - */ -export type DiskDetachOptionTypes = "ForceDetach"; - -/** - * Defines values for DiskDeleteOptionTypes. - * Possible values include: 'Delete', 'Detach' - * @readonly - * @enum {string} - */ -export type DiskDeleteOptionTypes = "Delete" | "Detach"; - -/** - * Defines values for DiffDiskOptions. - * Possible values include: 'Local' - * @readonly - * @enum {string} - */ -export type DiffDiskOptions = "Local"; - -/** - * Defines values for DiffDiskPlacement. - * Possible values include: 'CacheDisk', 'ResourceDisk' - * @readonly - * @enum {string} - */ -export type DiffDiskPlacement = "CacheDisk" | "ResourceDisk"; - -/** - * Defines values for DeleteOptions. - * Possible values include: 'Delete', 'Detach' - * @readonly - * @enum {string} - */ -export type DeleteOptions = "Delete" | "Detach"; - -/** - * Defines values for IPVersions. - * Possible values include: 'IPv4', 'IPv6' - * @readonly - * @enum {string} - */ -export type IPVersions = "IPv4" | "IPv6"; - -/** - * Defines values for PublicIPAllocationMethod. - * Possible values include: 'Dynamic', 'Static' - * @readonly - * @enum {string} - */ -export type PublicIPAllocationMethod = "Dynamic" | "Static"; - -/** - * Defines values for PublicIPAddressSkuName. - * Possible values include: 'Basic', 'Standard' - * @readonly - * @enum {string} - */ -export type PublicIPAddressSkuName = "Basic" | "Standard"; - -/** - * Defines values for PublicIPAddressSkuTier. - * Possible values include: 'Regional', 'Global' - * @readonly - * @enum {string} - */ -export type PublicIPAddressSkuTier = "Regional" | "Global"; - -/** - * Defines values for NetworkApiVersion. - * Possible values include: '2020-11-01' - * @readonly - * @enum {string} - */ -export type NetworkApiVersion = "2020-11-01"; - -/** - * Defines values for VirtualMachinePriorityTypes. - * Possible values include: 'Regular', 'Low', 'Spot' - * @readonly - * @enum {string} - */ -export type VirtualMachinePriorityTypes = "Regular" | "Low" | "Spot"; - -/** - * Defines values for VirtualMachineEvictionPolicyTypes. - * Possible values include: 'Deallocate', 'Delete' - * @readonly - * @enum {string} - */ -export type VirtualMachineEvictionPolicyTypes = "Deallocate" | "Delete"; - -/** - * Defines values for ResourceIdentityType. - * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' - * @readonly - * @enum {string} - */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned, UserAssigned" - | "None"; - -/** - * Defines values for MaintenanceOperationResultCodeTypes. - * Possible values include: 'None', 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted' - * @readonly - * @enum {string} - */ -export type MaintenanceOperationResultCodeTypes = - | "None" - | "RetryLater" - | "MaintenanceAborted" - | "MaintenanceCompleted"; - -/** - * Defines values for HyperVGenerationType. - * Possible values include: 'V1', 'V2' - * @readonly - * @enum {string} - */ -export type HyperVGenerationType = "V1" | "V2"; - -/** - * Defines values for UpgradeMode. - * Possible values include: 'Automatic', 'Manual', 'Rolling' - * @readonly - * @enum {string} - */ -export type UpgradeMode = "Automatic" | "Manual" | "Rolling"; - -/** - * Defines values for VirtualMachineScaleSetScaleInRules. - * Possible values include: 'Default', 'OldestVM', 'NewestVM' - * @readonly - * @enum {string} - */ -export type VirtualMachineScaleSetScaleInRules = "Default" | "OldestVM" | "NewestVM"; - -/** - * Defines values for OrchestrationMode. - * Possible values include: 'Uniform', 'Flexible' - * @readonly - * @enum {string} - */ -export type OrchestrationMode = "Uniform" | "Flexible"; - -/** - * Defines values for OperatingSystemStateTypes. - * Possible values include: 'Generalized', 'Specialized' - * @readonly - * @enum {string} - */ -export type OperatingSystemStateTypes = "Generalized" | "Specialized"; - -/** - * Defines values for IPVersion. - * Possible values include: 'IPv4', 'IPv6' - * @readonly - * @enum {string} - */ -export type IPVersion = "IPv4" | "IPv6"; - -/** - * Defines values for OrchestrationServiceNames. - * Possible values include: 'AutomaticRepairs' - * @readonly - * @enum {string} - */ -export type OrchestrationServiceNames = "AutomaticRepairs"; - -/** - * Defines values for OrchestrationServiceState. - * Possible values include: 'NotRunning', 'Running', 'Suspended' - * @readonly - * @enum {string} - */ -export type OrchestrationServiceState = "NotRunning" | "Running" | "Suspended"; - -/** - * Defines values for VirtualMachineScaleSetSkuScaleType. - * Possible values include: 'Automatic', 'None' - * @readonly - * @enum {string} - */ -export type VirtualMachineScaleSetSkuScaleType = "Automatic" | "None"; - -/** - * Defines values for UpgradeState. - * Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - * @readonly - * @enum {string} - */ -export type UpgradeState = "RollingForward" | "Cancelled" | "Completed" | "Faulted"; - -/** - * Defines values for UpgradeOperationInvoker. - * Possible values include: 'Unknown', 'User', 'Platform' - * @readonly - * @enum {string} - */ -export type UpgradeOperationInvoker = "Unknown" | "User" | "Platform"; - -/** - * Defines values for RollingUpgradeStatusCode. - * Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' - * @readonly - * @enum {string} - */ -export type RollingUpgradeStatusCode = "RollingForward" | "Cancelled" | "Completed" | "Faulted"; - -/** - * Defines values for RollingUpgradeActionType. - * Possible values include: 'Start', 'Cancel' - * @readonly - * @enum {string} - */ -export type RollingUpgradeActionType = "Start" | "Cancel"; - -/** - * Defines values for IntervalInMins. - * Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins' - * @readonly - * @enum {string} - */ -export type IntervalInMins = "ThreeMins" | "FiveMins" | "ThirtyMins" | "SixtyMins"; - -/** - * Defines values for OrchestrationServiceStateAction. - * Possible values include: 'Resume', 'Suspend' - * @readonly - * @enum {string} - */ -export type OrchestrationServiceStateAction = "Resume" | "Suspend"; - -/** - * Defines values for ExecutionState. - * Possible values include: 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded', 'TimedOut', - * 'Canceled' - * @readonly - * @enum {string} - */ -export type ExecutionState = - | "Unknown" - | "Pending" - | "Running" - | "Failed" - | "Succeeded" - | "TimedOut" - | "Canceled"; - -/** - * Defines values for ResourceSkuCapacityScaleType. - * Possible values include: 'Automatic', 'Manual', 'None' - * @readonly - * @enum {string} - */ -export type ResourceSkuCapacityScaleType = "Automatic" | "Manual" | "None"; - -/** - * Defines values for ResourceSkuRestrictionsType. - * Possible values include: 'Location', 'Zone' - * @readonly - * @enum {string} - */ -export type ResourceSkuRestrictionsType = "Location" | "Zone"; - -/** - * Defines values for ResourceSkuRestrictionsReasonCode. - * Possible values include: 'QuotaId', 'NotAvailableForSubscription' - * @readonly - * @enum {string} - */ -export type ResourceSkuRestrictionsReasonCode = "QuotaId" | "NotAvailableForSubscription"; - -/** - * Defines values for DiskStorageAccountTypes. - * Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', - * 'Premium_ZRS', 'StandardSSD_ZRS' - * @readonly - * @enum {string} - */ -export type DiskStorageAccountTypes = - | "Standard_LRS" - | "Premium_LRS" - | "StandardSSD_LRS" - | "UltraSSD_LRS" - | "Premium_ZRS" - | "StandardSSD_ZRS"; - -/** - * Defines values for HyperVGeneration. - * Possible values include: 'V1', 'V2' - * @readonly - * @enum {string} - */ -export type HyperVGeneration = "V1" | "V2"; - -/** - * Defines values for DiskCreateOption. - * Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload' - * @readonly - * @enum {string} - */ -export type DiskCreateOption = - | "Empty" - | "Attach" - | "FromImage" - | "Import" - | "Copy" - | "Restore" - | "Upload"; - -/** - * Defines values for DiskState. - * Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', - * 'ActiveUpload' - * @readonly - * @enum {string} - */ -export type DiskState = - | "Unattached" - | "Attached" - | "Reserved" - | "ActiveSAS" - | "ReadyToUpload" - | "ActiveUpload"; - -/** - * Defines values for EncryptionType. - * Possible values include: 'EncryptionAtRestWithPlatformKey', 'EncryptionAtRestWithCustomerKey', - * 'EncryptionAtRestWithPlatformAndCustomerKeys' - * @readonly - * @enum {string} - */ -export type EncryptionType = - | "EncryptionAtRestWithPlatformKey" - | "EncryptionAtRestWithCustomerKey" - | "EncryptionAtRestWithPlatformAndCustomerKeys"; - -/** - * Defines values for NetworkAccessPolicy. - * Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' - * @readonly - * @enum {string} - */ -export type NetworkAccessPolicy = "AllowAll" | "AllowPrivate" | "DenyAll"; - -/** - * Defines values for DiskSecurityTypes. - * Possible values include: 'TrustedLaunch' - * @readonly - * @enum {string} - */ -export type DiskSecurityTypes = "TrustedLaunch"; - -/** - * Defines values for SnapshotStorageAccountTypes. - * Possible values include: 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' - * @readonly - * @enum {string} - */ -export type SnapshotStorageAccountTypes = "Standard_LRS" | "Premium_LRS" | "Standard_ZRS"; - -/** - * Defines values for DiskEncryptionSetType. - * Possible values include: 'EncryptionAtRestWithCustomerKey', - * 'EncryptionAtRestWithPlatformAndCustomerKeys' - * @readonly - * @enum {string} - */ -export type DiskEncryptionSetType = - | "EncryptionAtRestWithCustomerKey" - | "EncryptionAtRestWithPlatformAndCustomerKeys"; - -/** - * Defines values for AccessLevel. - * Possible values include: 'None', 'Read', 'Write' - * @readonly - * @enum {string} - */ -export type AccessLevel = "None" | "Read" | "Write"; - -/** - * Defines values for DiskEncryptionSetIdentityType. - * Possible values include: 'SystemAssigned', 'None' - * @readonly - * @enum {string} - */ -export type DiskEncryptionSetIdentityType = "SystemAssigned" | "None"; - -/** - * Defines values for PrivateEndpointServiceConnectionStatus. - * Possible values include: 'Pending', 'Approved', 'Rejected' - * @readonly - * @enum {string} - */ -export type PrivateEndpointServiceConnectionStatus = "Pending" | "Approved" | "Rejected"; - -/** - * Defines values for PrivateEndpointConnectionProvisioningState. - * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' - * @readonly - * @enum {string} - */ -export type PrivateEndpointConnectionProvisioningState = - | "Succeeded" - | "Creating" - | "Deleting" - | "Failed"; - -/** - * Defines values for GallerySharingPermissionTypes. - * Possible values include: 'Private', 'Groups' - * @readonly - * @enum {string} - */ -export type GallerySharingPermissionTypes = "Private" | "Groups"; - -/** - * Defines values for SharingProfileGroupTypes. - * Possible values include: 'Subscriptions', 'AADTenants' - * @readonly - * @enum {string} - */ -export type SharingProfileGroupTypes = "Subscriptions" | "AADTenants"; - -/** - * Defines values for AggregatedReplicationState. - * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' - * @readonly - * @enum {string} - */ -export type AggregatedReplicationState = "Unknown" | "InProgress" | "Completed" | "Failed"; - -/** - * Defines values for ReplicationState. - * Possible values include: 'Unknown', 'Replicating', 'Completed', 'Failed' - * @readonly - * @enum {string} - */ -export type ReplicationState = "Unknown" | "Replicating" | "Completed" | "Failed"; - -/** - * Defines values for StorageAccountType. - * Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Premium_LRS' - * @readonly - * @enum {string} - */ -export type StorageAccountType = "Standard_LRS" | "Standard_ZRS" | "Premium_LRS"; - -/** - * Defines values for HostCaching. - * Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * @readonly - * @enum {string} - */ -export type HostCaching = "None" | "ReadOnly" | "ReadWrite"; - -/** - * Defines values for SharingUpdateOperationTypes. - * Possible values include: 'Add', 'Remove', 'Reset' - * @readonly - * @enum {string} - */ -export type SharingUpdateOperationTypes = "Add" | "Remove" | "Reset"; - -/** - * Defines values for CloudServiceUpgradeMode. - * Possible values include: 'Auto', 'Manual', 'Simultaneous' - * @readonly - * @enum {string} - */ -export type CloudServiceUpgradeMode = "Auto" | "Manual" | "Simultaneous"; - -/** - * Defines values for InstanceViewTypes. - * Possible values include: 'instanceView', 'userData' - * @readonly - * @enum {string} - */ -export type InstanceViewTypes = "instanceView" | "userData"; - -/** - * Defines values for RestorePointCollectionExpandOptions. - * Possible values include: 'restorePoints' - * @readonly - * @enum {string} - */ -export type RestorePointCollectionExpandOptions = "restorePoints"; - -/** - * Defines values for ExpandTypesForGetVMScaleSets. - * Possible values include: 'userData' - * @readonly - * @enum {string} - */ -export type ExpandTypesForGetVMScaleSets = "userData"; - -/** - * Defines values for SelectPermissions. - * Possible values include: 'Permissions' - * @readonly - * @enum {string} - */ -export type SelectPermissions = "Permissions"; - -/** - * Defines values for ReplicationStatusTypes. - * Possible values include: 'ReplicationStatus' - * @readonly - * @enum {string} - */ -export type ReplicationStatusTypes = "ReplicationStatus"; - -/** - * Defines values for SharedToValues. - * Possible values include: 'tenant' - * @readonly - * @enum {string} - */ -export type SharedToValues = "tenant"; - -/** - * Defines values for ProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' - * @readonly - * @enum {string} - */ -export type ProvisioningState = - | "Creating" - | "Updating" - | "Failed" - | "Succeeded" - | "Deleting" - | "Migrating"; - -/** - * Defines values for ProvisioningState1. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' - * @readonly - * @enum {string} - */ -export type ProvisioningState1 = - | "Creating" - | "Updating" - | "Failed" - | "Succeeded" - | "Deleting" - | "Migrating"; + * The dedicated host instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceView?: DedicatedHostInstanceView; +}; -/** - * Defines values for ProvisioningState2. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' - * @readonly - * @enum {string} - */ -export type ProvisioningState2 = - | "Creating" - | "Updating" - | "Failed" - | "Succeeded" - | "Deleting" - | "Migrating"; +/** Specifies information about the SSH public key. */ +export type SshPublicKeyUpdateResource = UpdateResource & { + /** SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. */ + publicKey?: string; +}; -/** - * Defines values for ProvisioningState3. - * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating' - * @readonly - * @enum {string} - */ -export type ProvisioningState3 = - | "Creating" - | "Updating" - | "Failed" - | "Succeeded" - | "Deleting" - | "Migrating"; +/** Describes a Virtual Machine Extension. */ +export type VirtualMachineExtensionUpdate = UpdateResource & { + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; +}; -/** - * Contains response data for the list operation. - */ -export type OperationsListResponse = ComputeOperationListResult & { +/** The source user image virtual hard disk. Only tags may be updated. */ +export type ImageUpdate = UpdateResource & { + /** The source virtual machine from which Image is created. */ + sourceVirtualMachine?: SubResource; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: ImageStorageProfile; /** - * The underlying HTTP response. + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ComputeOperationListResult; - }; + readonly provisioningState?: string; + /** Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. */ + hyperVGeneration?: HyperVGenerationTypes; }; -/** - * Contains response data for the createOrUpdate operation. - */ -export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet & { +/** Describes a Virtual Machine Update. */ +export type VirtualMachineUpdate = UpdateResource & { + /** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. */ + plan?: Plan; + /** The identity of the virtual machine, if configured. */ + identity?: VirtualMachineIdentity; + /** The virtual machine zones. */ + zones?: string[]; + /** Specifies the hardware settings for the virtual machine. */ + hardwareProfile?: HardwareProfile; + /** Specifies the storage settings for the virtual machine disks. */ + storageProfile?: StorageProfile; + /** Specifies additional capabilities enabled or disabled on the virtual machine. */ + additionalCapabilities?: AdditionalCapabilities; + /** Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. */ + osProfile?: OSProfile; + /** Specifies the network interfaces of the virtual machine. */ + networkProfile?: NetworkProfile; + /** Specifies the Security related profile settings for the virtual machine. */ + securityProfile?: SecurityProfile; + /** Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. */ + diagnosticsProfile?: DiagnosticsProfile; + /** Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).

    For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)

    Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

    This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. */ + availabilitySet?: SubResource; + /** Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

    This property cannot exist along with a non-null properties.availabilitySet reference.

    Minimum api‐version: 2019‐03‐01 */ + virtualMachineScaleSet?: SubResource; + /** Specifies information about the proximity placement group that the virtual machine should be assigned to.

    Minimum api-version: 2018-04-01. */ + proximityPlacementGroup?: SubResource; + /** Specifies the priority for the virtual machine.

    Minimum api-version: 2019-03-01 */ + priority?: VirtualMachinePriorityTypes; + /** Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

    For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. */ + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + /** Specifies the billing related details of a Azure Spot virtual machine.

    Minimum api-version: 2019-03-01. */ + billingProfile?: BillingProfile; + /** Specifies information about the dedicated host that the virtual machine resides in.

    Minimum api-version: 2018-10-01. */ + host?: SubResource; + /** Specifies information about the dedicated host group that the virtual machine resides in.

    Minimum api-version: 2020-06-01.

    NOTE: User cannot specify both host and hostGroup properties. */ + hostGroup?: SubResource; /** - * The underlying HTTP response. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySet; - }; + readonly provisioningState?: string; + /** + * The virtual machine instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceView?: VirtualMachineInstanceView; + /** Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 */ + licenseType?: string; + /** + * Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmId?: string; + /** Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).

    Minimum api-version: 2020-06-01 */ + extensionsTimeBudget?: string; + /** Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.
  • This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.
  • The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' > 1.
  • This property cannot be updated once the Virtual Machine is created.
  • Fault domain assignment can be viewed in the Virtual Machine Instance View.

    Minimum api‐version: 2020‐12‐01 */ + platformFaultDomain?: number; + /** Specifies Scheduled Event related configurations. */ + scheduledEventsProfile?: ScheduledEventsProfile; + /** UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 */ + userData?: string; }; -/** - * Contains response data for the update operation. - */ -export type AvailabilitySetsUpdateResponse = AvailabilitySet & { +/** Update Restore Point collection parameters. */ +export type RestorePointCollectionUpdate = UpdateResource & { + /** The properties of the source resource that this restore point collection is created from. */ + source?: RestorePointCollectionSourceProperties; /** - * The underlying HTTP response. + * The provisioning state of the restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The unique id of the restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restorePointCollectionId?: string; + /** + * A list containing all restore points created under this restore point collection. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly restorePoints?: RestorePoint[]; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySet; - }; +/** Describes a Virtual Machine Scale Set. */ +export type VirtualMachineScaleSetUpdate = UpdateResource & { + /** The virtual machine scale set sku. */ + sku?: Sku; + /** The purchase plan when deploying a virtual machine scale set from VM Marketplace images. */ + plan?: Plan; + /** The identity of the virtual machine scale set, if configured. */ + identity?: VirtualMachineScaleSetIdentity; + /** The upgrade policy. */ + upgradePolicy?: UpgradePolicy; + /** Policy for automatic repairs. */ + automaticRepairsPolicy?: AutomaticRepairsPolicy; + /** The virtual machine profile. */ + virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; + /** Specifies whether the Virtual Machine Scale Set should be overprovisioned. */ + overprovision?: boolean; + /** When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. */ + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + /** When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. */ + singlePlacementGroup?: boolean; + /** Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. */ + additionalCapabilities?: AdditionalCapabilities; + /** Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. */ + scaleInPolicy?: ScaleInPolicy; + /** Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. */ + proximityPlacementGroup?: SubResource; }; -/** - * Contains response data for the get operation. - */ -export type AvailabilitySetsGetResponse = AvailabilitySet & { +/** Describes a Virtual Machine run command. */ +export type VirtualMachineRunCommandUpdate = UpdateResource & { + /** The source of the run command script. */ + source?: VirtualMachineRunCommandScriptSource; + /** The parameters used by the script. */ + parameters?: RunCommandInputParameter[]; + /** The parameters used by the script. */ + protectedParameters?: RunCommandInputParameter[]; + /** Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. */ + asyncExecution?: boolean; + /** Specifies the user account on the VM when executing the run command. */ + runAsUser?: string; + /** Specifies the user account password on the VM when executing the run command. */ + runAsPassword?: string; + /** The timeout in seconds to execute the run command. */ + timeoutInSeconds?: number; + /** Specifies the Azure storage blob where script output stream will be uploaded. */ + outputBlobUri?: string; + /** Specifies the Azure storage blob where script error stream will be uploaded. */ + errorBlobUri?: string; /** - * The underlying HTTP response. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySet; - }; + readonly provisioningState?: string; + /** + * The virtual machine run command instance view. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceView?: VirtualMachineRunCommandInstanceView; }; -/** - * Contains response data for the listBySubscription operation. - */ -export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult & { +/** Describes a Virtual Machine Scale Set Extension. */ +export type VirtualMachineScaleSetExtension = SubResourceReadOnly & { + /** The name of the extension. */ + name?: string; + /** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; /** - * The underlying HTTP response. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly provisioningState?: string; + /** Collection of extension names after which this extension needs to be provisioned. */ + provisionAfterExtensions?: string[]; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySetListResult; - }; +/** Describes a Virtual Machine Scale Set Extension. */ +export type VirtualMachineScaleSetExtensionUpdate = SubResourceReadOnly & { + /** + * The name of the extension. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** Collection of extension names after which this extension needs to be provisioned. */ + provisionAfterExtensions?: string[]; }; -/** - * Contains response data for the list operation. - */ -export type AvailabilitySetsListResponse = AvailabilitySetListResult & { +/** Describes a VMSS VM Extension. */ +export type VirtualMachineScaleSetVMExtension = SubResourceReadOnly & { /** - * The underlying HTTP response. + * The name of the extension. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly provisioningState?: string; + /** The virtual machine extension instance view. */ + instanceView?: VirtualMachineExtensionInstanceView; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySetListResult; - }; +/** Describes a VMSS VM Extension. */ +export type VirtualMachineScaleSetVMExtensionUpdate = SubResourceReadOnly & { + /** + * The name of the extension. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** How the extension handler should be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** The name of the extension handler publisher. */ + publisher?: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + typePropertiesType?: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion?: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; }; -/** - * Contains response data for the listAvailableSizes operation. - */ -export type AvailabilitySetsListAvailableSizesResponse = VirtualMachineSizeListResult & { +/** The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to the instance view of a dedicated host group. */ +export type DedicatedHostInstanceViewWithName = DedicatedHostInstanceView & { /** - * The underlying HTTP response. + * The name of the dedicated host. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly name?: string; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineSizeListResult; - }; +/** Describes an Operating System disk. */ +export type ImageOSDisk = ImageDisk & { + /** This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.

    Possible values are:

    **Windows**

    **Linux** */ + osType: OperatingSystemTypes; + /** The OS State. */ + osState: OperatingSystemStateTypes; }; -/** - * Contains response data for the listBySubscriptionNext operation. - */ -export type AvailabilitySetsListBySubscriptionNextResponse = AvailabilitySetListResult & { +/** Describes a data disk. */ +export type ImageDataDisk = ImageDisk & { + /** Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. */ + lun: number; +}; + +/** Restore Point details. */ +export type RestorePoint = ProxyResource & { + /** List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. */ + excludeDisks?: ApiEntityReference[]; + /** + * Gets the details of the VM captured at the time of the restore point creation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceMetadata?: RestorePointSourceMetadata; + /** + * Gets the provisioning state of the restore point. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints for more details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly consistencyMode?: ConsistencyModeTypes; /** - * The underlying HTTP response. + * Gets the provisioning details set by the server during Create restore point operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly provisioningDetails?: RestorePointProvisioningDetails; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySetListResult; - }; +/** Describes a Virtual Machine Scale Set VM Reimage Parameters. */ +export type VirtualMachineScaleSetVMReimageParameters = VirtualMachineReimageParameters & {}; + +/** Api request input for LogAnalytics getRequestRateByInterval Api. */ +export type RequestRateByIntervalInput = LogAnalyticsInputBase & { + /** Interval value in minutes used to create LogAnalytics call rate logs. */ + intervalLength: IntervalInMins; }; -/** - * Contains response data for the listNext operation. - */ -export type AvailabilitySetsListNextResponse = AvailabilitySetListResult & { +/** Api request input for LogAnalytics getThrottledRequests Api. */ +export type ThrottledRequestsInput = LogAnalyticsInputBase & {}; + +/** Describes the properties of a Run Command. */ +export type RunCommandDocument = RunCommandDocumentBase & { + /** The script to be executed. */ + script: string[]; + /** The parameters used by the script. */ + parameters?: RunCommandParameterDefinition[]; +}; + +/** Properties of disk restore point */ +export type DiskRestorePoint = ProxyOnlyResource & { + /** + * The timestamp of restorePoint creation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeCreated?: Date; + /** + * arm id of source disk + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceResourceId?: string; + /** + * The Operating System type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osType?: OperatingSystemTypes; + /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ + hyperVGeneration?: HyperVGeneration; + /** Purchase plan information for the the image from which the OS disk was created. */ + purchasePlan?: PurchasePlanAutoGenerated; + /** + * id of the backing snapshot's MIS family + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly familyId?: string; + /** + * unique incarnation id of the source disk + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceUniqueId?: string; /** - * The underlying HTTP response. + * Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly encryption?: Encryption; + /** Indicates the OS on a disk supports hibernation. */ + supportsHibernation?: boolean; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailabilitySetListResult; - }; +/** Specifies information about the Shared Image Gallery that you want to update. */ +export type GalleryUpdate = UpdateResourceDefinition & { + /** The description of this Shared Image Gallery resource. This property is updatable. */ + description?: string; + /** Describes the gallery unique name. */ + identifier?: GalleryIdentifier; + /** + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: GalleryPropertiesProvisioningState; + /** Profile for gallery sharing to subscription or tenant */ + sharingProfile?: SharingProfile; }; -/** - * Contains response data for the createOrUpdate operation. - */ -export type ProximityPlacementGroupsCreateOrUpdateResponse = ProximityPlacementGroup & { +/** Specifies information about the gallery image definition that you want to update. */ +export type GalleryImageUpdate = UpdateResourceDefinition & { + /** The description of this gallery image definition resource. This property is updatable. */ + description?: string; + /** The Eula agreement for the gallery image definition. */ + eula?: string; + /** The privacy statement uri. */ + privacyStatementUri?: string; + /** The release note uri. */ + releaseNoteUri?: string; + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux** */ + osType?: OperatingSystemTypes; + /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ + osState?: OperatingSystemStateTypes; + /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ + hyperVGeneration?: HyperVGeneration; + /** The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; + /** This is the gallery image definition identifier. */ + identifier?: GalleryImageIdentifier; + /** The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. */ + recommended?: RecommendedMachineConfiguration; + /** Describes the disallowed disk types. */ + disallowed?: Disallowed; + /** Describes the gallery image definition purchase plan. This is used by marketplace images. */ + purchasePlan?: ImagePurchasePlan; /** - * The underlying HTTP response. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroup; - }; + readonly provisioningState?: GalleryImagePropertiesProvisioningState; + /** A list of gallery image features. */ + features?: GalleryImageFeature[]; }; -/** - * Contains response data for the update operation. - */ -export type ProximityPlacementGroupsUpdateResponse = ProximityPlacementGroup & { +/** Specifies information about the gallery image version that you want to update. */ +export type GalleryImageVersionUpdate = UpdateResourceDefinition & { + /** The publishing profile of a gallery image Version. */ + publishingProfile?: GalleryImageVersionPublishingProfile; /** - * The underlying HTTP response. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroup; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ProximityPlacementGroupsGetResponse = ProximityPlacementGroup & { + readonly provisioningState?: GalleryImageVersionPropertiesProvisioningState; + /** This is the storage profile of a Gallery Image Version. */ + storageProfile?: GalleryImageVersionStorageProfile; /** - * The underlying HTTP response. + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly replicationStatus?: ReplicationStatus; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroup; - }; +/** Specifies information about the gallery Application Definition that you want to update. */ +export type GalleryApplicationUpdate = UpdateResourceDefinition & { + /** The description of this gallery Application Definition resource. This property is updatable. */ + description?: string; + /** The Eula agreement for the gallery Application Definition. */ + eula?: string; + /** The privacy statement uri. */ + privacyStatementUri?: string; + /** The release note uri. */ + releaseNoteUri?: string; + /** The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; + /** This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux** */ + supportedOSType?: OperatingSystemTypes; }; -/** - * Contains response data for the listBySubscription operation. - */ -export type ProximityPlacementGroupsListBySubscriptionResponse = ProximityPlacementGroupListResult & { +/** Specifies information about the gallery Application Version that you want to update. */ +export type GalleryApplicationVersionUpdate = UpdateResourceDefinition & { + /** The publishing profile of a gallery image version. */ + publishingProfile?: GalleryApplicationVersionPublishingProfile; /** - * The underlying HTTP response. + * The provisioning state, which only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroupListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ProximityPlacementGroupsListByResourceGroupResponse = ProximityPlacementGroupListResult & { + readonly provisioningState?: GalleryApplicationVersionPropertiesProvisioningState; /** - * The underlying HTTP response. + * This is the replication status of the gallery image version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroupListResult; - }; + readonly replicationStatus?: ReplicationStatus; }; -/** - * Contains response data for the listBySubscriptionNext operation. - */ -export type ProximityPlacementGroupsListBySubscriptionNextResponse = ProximityPlacementGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** The publishing profile of a gallery image Version. */ +export type GalleryImageVersionPublishingProfile = GalleryArtifactPublishingProfileBase & {}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroupListResult; - }; +/** The publishing profile of a gallery image version. */ +export type GalleryApplicationVersionPublishingProfile = GalleryArtifactPublishingProfileBase & { + /** The source image from which the Image Version is going to be created. */ + source: UserArtifactSource; + manageActions?: UserArtifactManage; + /** Optional. Whether or not this application reports health. */ + enableHealthCheck?: boolean; }; -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type ProximityPlacementGroupsListByResourceGroupNextResponse = ProximityPlacementGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains encryption settings for an OS disk image. */ +export type OSDiskImageEncryption = DiskImageEncryption & {}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ProximityPlacementGroupListResult; - }; +/** Contains encryption settings for a data disk image. */ +export type DataDiskImageEncryption = DiskImageEncryption & { + /** This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. */ + lun: number; }; -/** - * Contains response data for the createOrUpdate operation. - */ -export type DedicatedHostGroupsCreateOrUpdateResponse = DedicatedHostGroup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** This is the OS disk image. */ +export type GalleryOSDiskImage = GalleryDiskImage & {}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostGroup; - }; +/** This is the data disk image. */ +export type GalleryDataDiskImage = GalleryDiskImage & { + /** This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. */ + lun: number; }; -/** - * Contains response data for the update operation. - */ -export type DedicatedHostGroupsUpdateResponse = DedicatedHostGroup & { - /** - * 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: DedicatedHostGroup; - }; +/** Base information about the shared gallery resource in pir. */ +export type PirSharedGalleryResource = PirResource & { + /** The unique id of this shared gallery. */ + uniqueId?: string; }; -/** - * Contains response data for the get operation. - */ -export type DedicatedHostGroupsGetResponse = DedicatedHostGroup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Describes a Virtual Machine Image. */ +export type VirtualMachineImage = VirtualMachineImageResource & { + /** Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. */ + plan?: PurchasePlan; + /** Contains the os disk image information. */ + osDiskImage?: OSDiskImage; + dataDiskImages?: DataDiskImage[]; + /** Describes automatic OS upgrade properties on the image. */ + automaticOSUpgradeProperties?: AutomaticOSUpgradeProperties; + /** Specifies the HyperVGeneration Type */ + hyperVGeneration?: HyperVGenerationTypes; + /** Specifies disallowed configuration for the VirtualMachine created from the image */ + disallowed?: DisallowedConfiguration; + features?: VirtualMachineImageFeature[]; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostGroup; - }; +/** Describes a Virtual Machine Scale Set VM Reimage Parameters. */ +export type VirtualMachineScaleSetReimageParameters = VirtualMachineScaleSetVMReimageParameters & { + /** The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. */ + instanceIds?: string[]; }; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type DedicatedHostGroupsListByResourceGroupResponse = DedicatedHostGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Specifies information about the Shared Gallery that you want to create or update. */ +export type SharedGallery = PirSharedGalleryResource & {}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostGroupListResult; - }; +/** Specifies information about the gallery image definition that you want to create or update. */ +export type SharedGalleryImage = PirSharedGalleryResource & { + /** This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux** */ + osType?: OperatingSystemTypes; + /** This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. */ + osState?: OperatingSystemStateTypes; + /** The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; + /** This is the gallery image definition identifier. */ + identifier?: GalleryImageIdentifier; + /** The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. */ + recommended?: RecommendedMachineConfiguration; + /** Describes the disallowed disk types. */ + disallowed?: Disallowed; + /** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */ + hyperVGeneration?: HyperVGeneration; + /** A list of gallery image features. */ + features?: GalleryImageFeature[]; + /** Describes the gallery image definition purchase plan. This is used by marketplace images. */ + purchasePlan?: ImagePurchasePlan; +}; + +/** Specifies information about the gallery image version that you want to create or update. */ +export type SharedGalleryImageVersion = PirSharedGalleryResource & { + /** The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. */ + publishedDate?: Date; + /** The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. */ + endOfLifeDate?: Date; }; +/** Known values of {@link ProximityPlacementGroupType} that the service accepts. */ +export enum KnownProximityPlacementGroupType { + Standard = "Standard", + Ultra = "Ultra" +} + +/** + * Defines values for ProximityPlacementGroupType. \ + * {@link KnownProximityPlacementGroupType} can be used interchangeably with ProximityPlacementGroupType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard** \ + * **Ultra** + */ +export type ProximityPlacementGroupType = string; + +/** Known values of {@link ExtendedLocationTypes} that the service accepts. */ +export enum KnownExtendedLocationTypes { + EdgeZone = "EdgeZone" +} + +/** + * Defines values for ExtendedLocationTypes. \ + * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EdgeZone** + */ +export type ExtendedLocationTypes = string; + +/** Known values of {@link HyperVGenerationTypes} that the service accepts. */ +export enum KnownHyperVGenerationTypes { + V1 = "V1", + V2 = "V2" +} + +/** + * Defines values for HyperVGenerationTypes. \ + * {@link KnownHyperVGenerationTypes} can be used interchangeably with HyperVGenerationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **V1** \ + * **V2** + */ +export type HyperVGenerationTypes = string; + +/** Known values of {@link VmDiskTypes} that the service accepts. */ +export enum KnownVmDiskTypes { + None = "None", + Unmanaged = "Unmanaged" +} + +/** + * Defines values for VmDiskTypes. \ + * {@link KnownVmDiskTypes} can be used interchangeably with VmDiskTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Unmanaged** + */ +export type VmDiskTypes = string; + +/** Known values of {@link VirtualMachineSizeTypes} that the service accepts. */ +export enum KnownVirtualMachineSizeTypes { + BasicA0 = "Basic_A0", + BasicA1 = "Basic_A1", + BasicA2 = "Basic_A2", + BasicA3 = "Basic_A3", + BasicA4 = "Basic_A4", + StandardA0 = "Standard_A0", + StandardA1 = "Standard_A1", + StandardA2 = "Standard_A2", + StandardA3 = "Standard_A3", + StandardA4 = "Standard_A4", + StandardA5 = "Standard_A5", + StandardA6 = "Standard_A6", + StandardA7 = "Standard_A7", + StandardA8 = "Standard_A8", + StandardA9 = "Standard_A9", + StandardA10 = "Standard_A10", + StandardA11 = "Standard_A11", + StandardA1V2 = "Standard_A1_v2", + StandardA2V2 = "Standard_A2_v2", + StandardA4V2 = "Standard_A4_v2", + StandardA8V2 = "Standard_A8_v2", + StandardA2MV2 = "Standard_A2m_v2", + StandardA4MV2 = "Standard_A4m_v2", + StandardA8MV2 = "Standard_A8m_v2", + StandardB1S = "Standard_B1s", + StandardB1Ms = "Standard_B1ms", + StandardB2S = "Standard_B2s", + StandardB2Ms = "Standard_B2ms", + StandardB4Ms = "Standard_B4ms", + StandardB8Ms = "Standard_B8ms", + StandardD1 = "Standard_D1", + StandardD2 = "Standard_D2", + StandardD3 = "Standard_D3", + StandardD4 = "Standard_D4", + StandardD11 = "Standard_D11", + StandardD12 = "Standard_D12", + StandardD13 = "Standard_D13", + StandardD14 = "Standard_D14", + StandardD1V2 = "Standard_D1_v2", + StandardD2V2 = "Standard_D2_v2", + StandardD3V2 = "Standard_D3_v2", + StandardD4V2 = "Standard_D4_v2", + StandardD5V2 = "Standard_D5_v2", + StandardD2V3 = "Standard_D2_v3", + StandardD4V3 = "Standard_D4_v3", + StandardD8V3 = "Standard_D8_v3", + StandardD16V3 = "Standard_D16_v3", + StandardD32V3 = "Standard_D32_v3", + StandardD64V3 = "Standard_D64_v3", + StandardD2SV3 = "Standard_D2s_v3", + StandardD4SV3 = "Standard_D4s_v3", + StandardD8SV3 = "Standard_D8s_v3", + StandardD16SV3 = "Standard_D16s_v3", + StandardD32SV3 = "Standard_D32s_v3", + StandardD64SV3 = "Standard_D64s_v3", + StandardD11V2 = "Standard_D11_v2", + StandardD12V2 = "Standard_D12_v2", + StandardD13V2 = "Standard_D13_v2", + StandardD14V2 = "Standard_D14_v2", + StandardD15V2 = "Standard_D15_v2", + StandardDS1 = "Standard_DS1", + StandardDS2 = "Standard_DS2", + StandardDS3 = "Standard_DS3", + StandardDS4 = "Standard_DS4", + StandardDS11 = "Standard_DS11", + StandardDS12 = "Standard_DS12", + StandardDS13 = "Standard_DS13", + StandardDS14 = "Standard_DS14", + StandardDS1V2 = "Standard_DS1_v2", + StandardDS2V2 = "Standard_DS2_v2", + StandardDS3V2 = "Standard_DS3_v2", + StandardDS4V2 = "Standard_DS4_v2", + StandardDS5V2 = "Standard_DS5_v2", + StandardDS11V2 = "Standard_DS11_v2", + StandardDS12V2 = "Standard_DS12_v2", + StandardDS13V2 = "Standard_DS13_v2", + StandardDS14V2 = "Standard_DS14_v2", + StandardDS15V2 = "Standard_DS15_v2", + StandardDS134V2 = "Standard_DS13-4_v2", + StandardDS132V2 = "Standard_DS13-2_v2", + StandardDS148V2 = "Standard_DS14-8_v2", + StandardDS144V2 = "Standard_DS14-4_v2", + StandardE2V3 = "Standard_E2_v3", + StandardE4V3 = "Standard_E4_v3", + StandardE8V3 = "Standard_E8_v3", + StandardE16V3 = "Standard_E16_v3", + StandardE32V3 = "Standard_E32_v3", + StandardE64V3 = "Standard_E64_v3", + StandardE2SV3 = "Standard_E2s_v3", + StandardE4SV3 = "Standard_E4s_v3", + StandardE8SV3 = "Standard_E8s_v3", + StandardE16SV3 = "Standard_E16s_v3", + StandardE32SV3 = "Standard_E32s_v3", + StandardE64SV3 = "Standard_E64s_v3", + StandardE3216V3 = "Standard_E32-16_v3", + StandardE328SV3 = "Standard_E32-8s_v3", + StandardE6432SV3 = "Standard_E64-32s_v3", + StandardE6416SV3 = "Standard_E64-16s_v3", + StandardF1 = "Standard_F1", + StandardF2 = "Standard_F2", + StandardF4 = "Standard_F4", + StandardF8 = "Standard_F8", + StandardF16 = "Standard_F16", + StandardF1S = "Standard_F1s", + StandardF2S = "Standard_F2s", + StandardF4S = "Standard_F4s", + StandardF8S = "Standard_F8s", + StandardF16S = "Standard_F16s", + StandardF2SV2 = "Standard_F2s_v2", + StandardF4SV2 = "Standard_F4s_v2", + StandardF8SV2 = "Standard_F8s_v2", + StandardF16SV2 = "Standard_F16s_v2", + StandardF32SV2 = "Standard_F32s_v2", + StandardF64SV2 = "Standard_F64s_v2", + StandardF72SV2 = "Standard_F72s_v2", + StandardG1 = "Standard_G1", + StandardG2 = "Standard_G2", + StandardG3 = "Standard_G3", + StandardG4 = "Standard_G4", + StandardG5 = "Standard_G5", + StandardGS1 = "Standard_GS1", + StandardGS2 = "Standard_GS2", + StandardGS3 = "Standard_GS3", + StandardGS4 = "Standard_GS4", + StandardGS5 = "Standard_GS5", + StandardGS48 = "Standard_GS4-8", + StandardGS44 = "Standard_GS4-4", + StandardGS516 = "Standard_GS5-16", + StandardGS58 = "Standard_GS5-8", + StandardH8 = "Standard_H8", + StandardH16 = "Standard_H16", + StandardH8M = "Standard_H8m", + StandardH16M = "Standard_H16m", + StandardH16R = "Standard_H16r", + StandardH16Mr = "Standard_H16mr", + StandardL4S = "Standard_L4s", + StandardL8S = "Standard_L8s", + StandardL16S = "Standard_L16s", + StandardL32S = "Standard_L32s", + StandardM64S = "Standard_M64s", + StandardM64Ms = "Standard_M64ms", + StandardM128S = "Standard_M128s", + StandardM128Ms = "Standard_M128ms", + StandardM6432Ms = "Standard_M64-32ms", + StandardM6416Ms = "Standard_M64-16ms", + StandardM12864Ms = "Standard_M128-64ms", + StandardM12832Ms = "Standard_M128-32ms", + StandardNC6 = "Standard_NC6", + StandardNC12 = "Standard_NC12", + StandardNC24 = "Standard_NC24", + StandardNC24R = "Standard_NC24r", + StandardNC6SV2 = "Standard_NC6s_v2", + StandardNC12SV2 = "Standard_NC12s_v2", + StandardNC24SV2 = "Standard_NC24s_v2", + StandardNC24RsV2 = "Standard_NC24rs_v2", + StandardNC6SV3 = "Standard_NC6s_v3", + StandardNC12SV3 = "Standard_NC12s_v3", + StandardNC24SV3 = "Standard_NC24s_v3", + StandardNC24RsV3 = "Standard_NC24rs_v3", + StandardND6S = "Standard_ND6s", + StandardND12S = "Standard_ND12s", + StandardND24S = "Standard_ND24s", + StandardND24Rs = "Standard_ND24rs", + StandardNV6 = "Standard_NV6", + StandardNV12 = "Standard_NV12", + StandardNV24 = "Standard_NV24" +} + +/** + * Defines values for VirtualMachineSizeTypes. \ + * {@link KnownVirtualMachineSizeTypes} can be used interchangeably with VirtualMachineSizeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic_A0** \ + * **Basic_A1** \ + * **Basic_A2** \ + * **Basic_A3** \ + * **Basic_A4** \ + * **Standard_A0** \ + * **Standard_A1** \ + * **Standard_A2** \ + * **Standard_A3** \ + * **Standard_A4** \ + * **Standard_A5** \ + * **Standard_A6** \ + * **Standard_A7** \ + * **Standard_A8** \ + * **Standard_A9** \ + * **Standard_A10** \ + * **Standard_A11** \ + * **Standard_A1_v2** \ + * **Standard_A2_v2** \ + * **Standard_A4_v2** \ + * **Standard_A8_v2** \ + * **Standard_A2m_v2** \ + * **Standard_A4m_v2** \ + * **Standard_A8m_v2** \ + * **Standard_B1s** \ + * **Standard_B1ms** \ + * **Standard_B2s** \ + * **Standard_B2ms** \ + * **Standard_B4ms** \ + * **Standard_B8ms** \ + * **Standard_D1** \ + * **Standard_D2** \ + * **Standard_D3** \ + * **Standard_D4** \ + * **Standard_D11** \ + * **Standard_D12** \ + * **Standard_D13** \ + * **Standard_D14** \ + * **Standard_D1_v2** \ + * **Standard_D2_v2** \ + * **Standard_D3_v2** \ + * **Standard_D4_v2** \ + * **Standard_D5_v2** \ + * **Standard_D2_v3** \ + * **Standard_D4_v3** \ + * **Standard_D8_v3** \ + * **Standard_D16_v3** \ + * **Standard_D32_v3** \ + * **Standard_D64_v3** \ + * **Standard_D2s_v3** \ + * **Standard_D4s_v3** \ + * **Standard_D8s_v3** \ + * **Standard_D16s_v3** \ + * **Standard_D32s_v3** \ + * **Standard_D64s_v3** \ + * **Standard_D11_v2** \ + * **Standard_D12_v2** \ + * **Standard_D13_v2** \ + * **Standard_D14_v2** \ + * **Standard_D15_v2** \ + * **Standard_DS1** \ + * **Standard_DS2** \ + * **Standard_DS3** \ + * **Standard_DS4** \ + * **Standard_DS11** \ + * **Standard_DS12** \ + * **Standard_DS13** \ + * **Standard_DS14** \ + * **Standard_DS1_v2** \ + * **Standard_DS2_v2** \ + * **Standard_DS3_v2** \ + * **Standard_DS4_v2** \ + * **Standard_DS5_v2** \ + * **Standard_DS11_v2** \ + * **Standard_DS12_v2** \ + * **Standard_DS13_v2** \ + * **Standard_DS14_v2** \ + * **Standard_DS15_v2** \ + * **Standard_DS13-4_v2** \ + * **Standard_DS13-2_v2** \ + * **Standard_DS14-8_v2** \ + * **Standard_DS14-4_v2** \ + * **Standard_E2_v3** \ + * **Standard_E4_v3** \ + * **Standard_E8_v3** \ + * **Standard_E16_v3** \ + * **Standard_E32_v3** \ + * **Standard_E64_v3** \ + * **Standard_E2s_v3** \ + * **Standard_E4s_v3** \ + * **Standard_E8s_v3** \ + * **Standard_E16s_v3** \ + * **Standard_E32s_v3** \ + * **Standard_E64s_v3** \ + * **Standard_E32-16_v3** \ + * **Standard_E32-8s_v3** \ + * **Standard_E64-32s_v3** \ + * **Standard_E64-16s_v3** \ + * **Standard_F1** \ + * **Standard_F2** \ + * **Standard_F4** \ + * **Standard_F8** \ + * **Standard_F16** \ + * **Standard_F1s** \ + * **Standard_F2s** \ + * **Standard_F4s** \ + * **Standard_F8s** \ + * **Standard_F16s** \ + * **Standard_F2s_v2** \ + * **Standard_F4s_v2** \ + * **Standard_F8s_v2** \ + * **Standard_F16s_v2** \ + * **Standard_F32s_v2** \ + * **Standard_F64s_v2** \ + * **Standard_F72s_v2** \ + * **Standard_G1** \ + * **Standard_G2** \ + * **Standard_G3** \ + * **Standard_G4** \ + * **Standard_G5** \ + * **Standard_GS1** \ + * **Standard_GS2** \ + * **Standard_GS3** \ + * **Standard_GS4** \ + * **Standard_GS5** \ + * **Standard_GS4-8** \ + * **Standard_GS4-4** \ + * **Standard_GS5-16** \ + * **Standard_GS5-8** \ + * **Standard_H8** \ + * **Standard_H16** \ + * **Standard_H8m** \ + * **Standard_H16m** \ + * **Standard_H16r** \ + * **Standard_H16mr** \ + * **Standard_L4s** \ + * **Standard_L8s** \ + * **Standard_L16s** \ + * **Standard_L32s** \ + * **Standard_M64s** \ + * **Standard_M64ms** \ + * **Standard_M128s** \ + * **Standard_M128ms** \ + * **Standard_M64-32ms** \ + * **Standard_M64-16ms** \ + * **Standard_M128-64ms** \ + * **Standard_M128-32ms** \ + * **Standard_NC6** \ + * **Standard_NC12** \ + * **Standard_NC24** \ + * **Standard_NC24r** \ + * **Standard_NC6s_v2** \ + * **Standard_NC12s_v2** \ + * **Standard_NC24s_v2** \ + * **Standard_NC24rs_v2** \ + * **Standard_NC6s_v3** \ + * **Standard_NC12s_v3** \ + * **Standard_NC24s_v3** \ + * **Standard_NC24rs_v3** \ + * **Standard_ND6s** \ + * **Standard_ND12s** \ + * **Standard_ND24s** \ + * **Standard_ND24rs** \ + * **Standard_NV6** \ + * **Standard_NV12** \ + * **Standard_NV24** + */ +export type VirtualMachineSizeTypes = string; + +/** Known values of {@link DiffDiskOptions} that the service accepts. */ +export enum KnownDiffDiskOptions { + Local = "Local" +} + +/** + * Defines values for DiffDiskOptions. \ + * {@link KnownDiffDiskOptions} can be used interchangeably with DiffDiskOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Local** + */ +export type DiffDiskOptions = string; + +/** Known values of {@link DiffDiskPlacement} that the service accepts. */ +export enum KnownDiffDiskPlacement { + CacheDisk = "CacheDisk", + ResourceDisk = "ResourceDisk" +} + +/** + * Defines values for DiffDiskPlacement. \ + * {@link KnownDiffDiskPlacement} can be used interchangeably with DiffDiskPlacement, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CacheDisk** \ + * **ResourceDisk** + */ +export type DiffDiskPlacement = string; + +/** Known values of {@link DiskCreateOptionTypes} that the service accepts. */ +export enum KnownDiskCreateOptionTypes { + FromImage = "FromImage", + Empty = "Empty", + Attach = "Attach" +} + +/** + * Defines values for DiskCreateOptionTypes. \ + * {@link KnownDiskCreateOptionTypes} can be used interchangeably with DiskCreateOptionTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FromImage** \ + * **Empty** \ + * **Attach** + */ +export type DiskCreateOptionTypes = string; + +/** Known values of {@link StorageAccountTypes} that the service accepts. */ +export enum KnownStorageAccountTypes { + StandardLRS = "Standard_LRS", + PremiumLRS = "Premium_LRS", + StandardSSDLRS = "StandardSSD_LRS", + UltraSSDLRS = "UltraSSD_LRS", + PremiumZRS = "Premium_ZRS", + StandardSSDZRS = "StandardSSD_ZRS" +} + /** - * Contains response data for the listBySubscription operation. + * Defines values for StorageAccountTypes. \ + * {@link KnownStorageAccountTypes} can be used interchangeably with StorageAccountTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS** \ + * **Premium_LRS** \ + * **StandardSSD_LRS** \ + * **UltraSSD_LRS** \ + * **Premium_ZRS** \ + * **StandardSSD_ZRS** */ -export type DedicatedHostGroupsListBySubscriptionResponse = DedicatedHostGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type StorageAccountTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostGroupListResult; - }; -}; +/** Known values of {@link DiskDeleteOptionTypes} that the service accepts. */ +export enum KnownDiskDeleteOptionTypes { + Delete = "Delete", + Detach = "Detach" +} /** - * Contains response data for the listByResourceGroupNext operation. + * Defines values for DiskDeleteOptionTypes. \ + * {@link KnownDiskDeleteOptionTypes} can be used interchangeably with DiskDeleteOptionTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Delete** \ + * **Detach** */ -export type DedicatedHostGroupsListByResourceGroupNextResponse = DedicatedHostGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DiskDeleteOptionTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostGroupListResult; - }; -}; +/** Known values of {@link DiskDetachOptionTypes} that the service accepts. */ +export enum KnownDiskDetachOptionTypes { + ForceDetach = "ForceDetach" +} /** - * Contains response data for the listBySubscriptionNext operation. + * Defines values for DiskDetachOptionTypes. \ + * {@link KnownDiskDetachOptionTypes} can be used interchangeably with DiskDetachOptionTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ForceDetach** */ -export type DedicatedHostGroupsListBySubscriptionNextResponse = DedicatedHostGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DiskDetachOptionTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostGroupListResult; - }; -}; +/** Known values of {@link WindowsVMGuestPatchMode} that the service accepts. */ +export enum KnownWindowsVMGuestPatchMode { + Manual = "Manual", + AutomaticByOS = "AutomaticByOS", + AutomaticByPlatform = "AutomaticByPlatform" +} /** - * Contains response data for the createOrUpdate operation. + * Defines values for WindowsVMGuestPatchMode. \ + * {@link KnownWindowsVMGuestPatchMode} can be used interchangeably with WindowsVMGuestPatchMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Manual** \ + * **AutomaticByOS** \ + * **AutomaticByPlatform** */ -export type DedicatedHostsCreateOrUpdateResponse = DedicatedHost & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type WindowsVMGuestPatchMode = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHost; - }; -}; +/** Known values of {@link WindowsPatchAssessmentMode} that the service accepts. */ +export enum KnownWindowsPatchAssessmentMode { + ImageDefault = "ImageDefault", + AutomaticByPlatform = "AutomaticByPlatform" +} /** - * Contains response data for the update operation. + * Defines values for WindowsPatchAssessmentMode. \ + * {@link KnownWindowsPatchAssessmentMode} can be used interchangeably with WindowsPatchAssessmentMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** */ -export type DedicatedHostsUpdateResponse = DedicatedHost & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type WindowsPatchAssessmentMode = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHost; - }; -}; +/** Known values of {@link LinuxVMGuestPatchMode} that the service accepts. */ +export enum KnownLinuxVMGuestPatchMode { + ImageDefault = "ImageDefault", + AutomaticByPlatform = "AutomaticByPlatform" +} /** - * Contains response data for the get operation. + * Defines values for LinuxVMGuestPatchMode. \ + * {@link KnownLinuxVMGuestPatchMode} can be used interchangeably with LinuxVMGuestPatchMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** */ -export type DedicatedHostsGetResponse = DedicatedHost & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type LinuxVMGuestPatchMode = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHost; - }; -}; +/** Known values of {@link LinuxPatchAssessmentMode} that the service accepts. */ +export enum KnownLinuxPatchAssessmentMode { + ImageDefault = "ImageDefault", + AutomaticByPlatform = "AutomaticByPlatform" +} /** - * Contains response data for the listByHostGroup operation. + * Defines values for LinuxPatchAssessmentMode. \ + * {@link KnownLinuxPatchAssessmentMode} can be used interchangeably with LinuxPatchAssessmentMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ImageDefault** \ + * **AutomaticByPlatform** */ -export type DedicatedHostsListByHostGroupResponse = DedicatedHostListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type LinuxPatchAssessmentMode = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostListResult; - }; -}; +/** Known values of {@link DeleteOptions} that the service accepts. */ +export enum KnownDeleteOptions { + Delete = "Delete", + Detach = "Detach" +} /** - * Contains response data for the beginCreateOrUpdate operation. + * Defines values for DeleteOptions. \ + * {@link KnownDeleteOptions} can be used interchangeably with DeleteOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Delete** \ + * **Detach** */ -export type DedicatedHostsBeginCreateOrUpdateResponse = DedicatedHost & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DeleteOptions = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHost; - }; -}; +/** Known values of {@link NetworkApiVersion} that the service accepts. */ +export enum KnownNetworkApiVersion { + TwoThousandTwenty1101 = "2020-11-01" +} /** - * Contains response data for the beginUpdate operation. + * Defines values for NetworkApiVersion. \ + * {@link KnownNetworkApiVersion} can be used interchangeably with NetworkApiVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **2020-11-01** */ -export type DedicatedHostsBeginUpdateResponse = DedicatedHost & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type NetworkApiVersion = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHost; - }; -}; +/** Known values of {@link IPVersions} that the service accepts. */ +export enum KnownIPVersions { + IPv4 = "IPv4", + IPv6 = "IPv6" +} /** - * Contains response data for the listByHostGroupNext operation. + * Defines values for IPVersions. \ + * {@link KnownIPVersions} can be used interchangeably with IPVersions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4** \ + * **IPv6** */ -export type DedicatedHostsListByHostGroupNextResponse = DedicatedHostListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type IPVersions = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DedicatedHostListResult; - }; -}; +/** Known values of {@link PublicIPAllocationMethod} that the service accepts. */ +export enum KnownPublicIPAllocationMethod { + Dynamic = "Dynamic", + Static = "Static" +} /** - * Contains response data for the listBySubscription operation. + * Defines values for PublicIPAllocationMethod. \ + * {@link KnownPublicIPAllocationMethod} can be used interchangeably with PublicIPAllocationMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Dynamic** \ + * **Static** */ -export type SshPublicKeysListBySubscriptionResponse = SshPublicKeysGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PublicIPAllocationMethod = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeysGroupListResult; - }; -}; +/** Known values of {@link PublicIPAddressSkuName} that the service accepts. */ +export enum KnownPublicIPAddressSkuName { + Basic = "Basic", + Standard = "Standard" +} /** - * Contains response data for the listByResourceGroup operation. + * Defines values for PublicIPAddressSkuName. \ + * {@link KnownPublicIPAddressSkuName} can be used interchangeably with PublicIPAddressSkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Basic** \ + * **Standard** */ -export type SshPublicKeysListByResourceGroupResponse = SshPublicKeysGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PublicIPAddressSkuName = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeysGroupListResult; - }; -}; +/** Known values of {@link PublicIPAddressSkuTier} that the service accepts. */ +export enum KnownPublicIPAddressSkuTier { + Regional = "Regional", + Global = "Global" +} /** - * Contains response data for the create operation. + * Defines values for PublicIPAddressSkuTier. \ + * {@link KnownPublicIPAddressSkuTier} can be used interchangeably with PublicIPAddressSkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Regional** \ + * **Global** */ -export type SshPublicKeysCreateResponse = SshPublicKeyResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PublicIPAddressSkuTier = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeyResource; - }; -}; +/** Known values of {@link SecurityTypes} that the service accepts. */ +export enum KnownSecurityTypes { + TrustedLaunch = "TrustedLaunch" +} /** - * Contains response data for the update operation. + * Defines values for SecurityTypes. \ + * {@link KnownSecurityTypes} can be used interchangeably with SecurityTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TrustedLaunch** */ -export type SshPublicKeysUpdateResponse = SshPublicKeyResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SecurityTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeyResource; - }; -}; +/** Known values of {@link VirtualMachinePriorityTypes} that the service accepts. */ +export enum KnownVirtualMachinePriorityTypes { + Regular = "Regular", + Low = "Low", + Spot = "Spot" +} /** - * Contains response data for the get operation. + * Defines values for VirtualMachinePriorityTypes. \ + * {@link KnownVirtualMachinePriorityTypes} can be used interchangeably with VirtualMachinePriorityTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Regular** \ + * **Low** \ + * **Spot** */ -export type SshPublicKeysGetResponse = SshPublicKeyResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VirtualMachinePriorityTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeyResource; - }; -}; +/** Known values of {@link VirtualMachineEvictionPolicyTypes} that the service accepts. */ +export enum KnownVirtualMachineEvictionPolicyTypes { + Deallocate = "Deallocate", + Delete = "Delete" +} /** - * Contains response data for the generateKeyPair operation. + * Defines values for VirtualMachineEvictionPolicyTypes. \ + * {@link KnownVirtualMachineEvictionPolicyTypes} can be used interchangeably with VirtualMachineEvictionPolicyTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Deallocate** \ + * **Delete** */ -export type SshPublicKeysGenerateKeyPairResponse = SshPublicKeyGenerateKeyPairResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VirtualMachineEvictionPolicyTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeyGenerateKeyPairResult; - }; -}; +/** Known values of {@link HyperVGenerationType} that the service accepts. */ +export enum KnownHyperVGenerationType { + V1 = "V1", + V2 = "V2" +} /** - * Contains response data for the listBySubscriptionNext operation. + * Defines values for HyperVGenerationType. \ + * {@link KnownHyperVGenerationType} can be used interchangeably with HyperVGenerationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **V1** \ + * **V2** */ -export type SshPublicKeysListBySubscriptionNextResponse = SshPublicKeysGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type HyperVGenerationType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeysGroupListResult; - }; -}; +/** Known values of {@link PatchOperationStatus} that the service accepts. */ +export enum KnownPatchOperationStatus { + Unknown = "Unknown", + InProgress = "InProgress", + Failed = "Failed", + Succeeded = "Succeeded", + CompletedWithWarnings = "CompletedWithWarnings" +} /** - * Contains response data for the listByResourceGroupNext operation. + * Defines values for PatchOperationStatus. \ + * {@link KnownPatchOperationStatus} can be used interchangeably with PatchOperationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **InProgress** \ + * **Failed** \ + * **Succeeded** \ + * **CompletedWithWarnings** */ -export type SshPublicKeysListByResourceGroupNextResponse = SshPublicKeysGroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PatchOperationStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SshPublicKeysGroupListResult; - }; -}; +/** Known values of {@link IPVersion} that the service accepts. */ +export enum KnownIPVersion { + IPv4 = "IPv4", + IPv6 = "IPv6" +} /** - * Contains response data for the get operation. + * Defines values for IPVersion. \ + * {@link KnownIPVersion} can be used interchangeably with IPVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4** \ + * **IPv6** */ -export type VirtualMachineExtensionImagesGetResponse = VirtualMachineExtensionImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type IPVersion = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtensionImage; - }; -}; +/** Known values of {@link VirtualMachineScaleSetScaleInRules} that the service accepts. */ +export enum KnownVirtualMachineScaleSetScaleInRules { + Default = "Default", + OldestVM = "OldestVM", + NewestVM = "NewestVM" +} /** - * Contains response data for the listTypes operation. + * Defines values for VirtualMachineScaleSetScaleInRules. \ + * {@link KnownVirtualMachineScaleSetScaleInRules} can be used interchangeably with VirtualMachineScaleSetScaleInRules, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **OldestVM** \ + * **NewestVM** */ -export type VirtualMachineExtensionImagesListTypesResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VirtualMachineScaleSetScaleInRules = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtensionImage[]; - }; -}; +/** Known values of {@link OrchestrationMode} that the service accepts. */ +export enum KnownOrchestrationMode { + Uniform = "Uniform", + Flexible = "Flexible" +} /** - * Contains response data for the listVersions operation. + * Defines values for OrchestrationMode. \ + * {@link KnownOrchestrationMode} can be used interchangeably with OrchestrationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Uniform** \ + * **Flexible** */ -export type VirtualMachineExtensionImagesListVersionsResponse = Array< - VirtualMachineExtensionImage -> & { - /** - * 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: VirtualMachineExtensionImage[]; - }; -}; +export type OrchestrationMode = string; + +/** Known values of {@link OperatingSystemType} that the service accepts. */ +export enum KnownOperatingSystemType { + Windows = "Windows", + Linux = "Linux" +} /** - * Contains response data for the createOrUpdate operation. + * Defines values for OperatingSystemType. \ + * {@link KnownOperatingSystemType} can be used interchangeably with OperatingSystemType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Windows** \ + * **Linux** */ -export type VirtualMachineExtensionsCreateOrUpdateResponse = VirtualMachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type OperatingSystemType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtension; - }; -}; +/** Known values of {@link ConsistencyModeTypes} that the service accepts. */ +export enum KnownConsistencyModeTypes { + CrashConsistent = "CrashConsistent", + FileSystemConsistent = "FileSystemConsistent", + ApplicationConsistent = "ApplicationConsistent" +} /** - * Contains response data for the update operation. + * Defines values for ConsistencyModeTypes. \ + * {@link KnownConsistencyModeTypes} can be used interchangeably with ConsistencyModeTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CrashConsistent** \ + * **FileSystemConsistent** \ + * **ApplicationConsistent** */ -export type VirtualMachineExtensionsUpdateResponse = VirtualMachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ConsistencyModeTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtension; - }; -}; +/** Known values of {@link RestorePointCollectionExpandOptions} that the service accepts. */ +export enum KnownRestorePointCollectionExpandOptions { + RestorePoints = "restorePoints" +} /** - * Contains response data for the get operation. + * Defines values for RestorePointCollectionExpandOptions. \ + * {@link KnownRestorePointCollectionExpandOptions} can be used interchangeably with RestorePointCollectionExpandOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **restorePoints** */ -export type VirtualMachineExtensionsGetResponse = VirtualMachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type RestorePointCollectionExpandOptions = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtension; - }; -}; +/** Known values of {@link VMGuestPatchRebootBehavior} that the service accepts. */ +export enum KnownVMGuestPatchRebootBehavior { + Unknown = "Unknown", + NeverReboots = "NeverReboots", + AlwaysRequiresReboot = "AlwaysRequiresReboot", + CanRequestReboot = "CanRequestReboot" +} /** - * Contains response data for the list operation. + * Defines values for VMGuestPatchRebootBehavior. \ + * {@link KnownVMGuestPatchRebootBehavior} can be used interchangeably with VMGuestPatchRebootBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **NeverReboots** \ + * **AlwaysRequiresReboot** \ + * **CanRequestReboot** */ -export type VirtualMachineExtensionsListResponse = VirtualMachineExtensionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VMGuestPatchRebootBehavior = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtensionsListResult; - }; -}; +/** Known values of {@link PatchAssessmentState} that the service accepts. */ +export enum KnownPatchAssessmentState { + Unknown = "Unknown", + Available = "Available" +} /** - * Contains response data for the beginCreateOrUpdate operation. + * Defines values for PatchAssessmentState. \ + * {@link KnownPatchAssessmentState} can be used interchangeably with PatchAssessmentState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Available** */ -export type VirtualMachineExtensionsBeginCreateOrUpdateResponse = VirtualMachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PatchAssessmentState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtension; - }; -}; +/** Known values of {@link VMGuestPatchRebootSetting} that the service accepts. */ +export enum KnownVMGuestPatchRebootSetting { + IfRequired = "IfRequired", + Never = "Never", + Always = "Always" +} /** - * Contains response data for the beginUpdate operation. + * Defines values for VMGuestPatchRebootSetting. \ + * {@link KnownVMGuestPatchRebootSetting} can be used interchangeably with VMGuestPatchRebootSetting, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IfRequired** \ + * **Never** \ + * **Always** */ -export type VirtualMachineExtensionsBeginUpdateResponse = VirtualMachineExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VMGuestPatchRebootSetting = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineExtension; - }; -}; +/** Known values of {@link VMGuestPatchClassificationWindows} that the service accepts. */ +export enum KnownVMGuestPatchClassificationWindows { + Critical = "Critical", + Security = "Security", + UpdateRollUp = "UpdateRollUp", + FeaturePack = "FeaturePack", + ServicePack = "ServicePack", + Definition = "Definition", + Tools = "Tools", + Updates = "Updates" +} /** - * Contains response data for the get operation. + * Defines values for VMGuestPatchClassificationWindows. \ + * {@link KnownVMGuestPatchClassificationWindows} can be used interchangeably with VMGuestPatchClassificationWindows, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Security** \ + * **UpdateRollUp** \ + * **FeaturePack** \ + * **ServicePack** \ + * **Definition** \ + * **Tools** \ + * **Updates** */ -export type VirtualMachineImagesGetResponse = VirtualMachineImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VMGuestPatchClassificationWindows = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImage; - }; -}; +/** Known values of {@link VMGuestPatchClassificationLinux} that the service accepts. */ +export enum KnownVMGuestPatchClassificationLinux { + Critical = "Critical", + Security = "Security", + Other = "Other" +} /** - * Contains response data for the list operation. + * Defines values for VMGuestPatchClassificationLinux. \ + * {@link KnownVMGuestPatchClassificationLinux} can be used interchangeably with VMGuestPatchClassificationLinux, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Security** \ + * **Other** */ -export type VirtualMachineImagesListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VMGuestPatchClassificationLinux = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link VMGuestPatchRebootStatus} that the service accepts. */ +export enum KnownVMGuestPatchRebootStatus { + Unknown = "Unknown", + NotNeeded = "NotNeeded", + Required = "Required", + Started = "Started", + Failed = "Failed", + Completed = "Completed" +} /** - * Contains response data for the listOffers operation. + * Defines values for VMGuestPatchRebootStatus. \ + * {@link KnownVMGuestPatchRebootStatus} can be used interchangeably with VMGuestPatchRebootStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **NotNeeded** \ + * **Required** \ + * **Started** \ + * **Failed** \ + * **Completed** */ -export type VirtualMachineImagesListOffersResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type VMGuestPatchRebootStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link PatchInstallationState} that the service accepts. */ +export enum KnownPatchInstallationState { + Unknown = "Unknown", + Installed = "Installed", + Failed = "Failed", + Excluded = "Excluded", + NotSelected = "NotSelected", + Pending = "Pending" +} -/** - * Contains response data for the listPublishers operation. +/** + * Defines values for PatchInstallationState. \ + * {@link KnownPatchInstallationState} can be used interchangeably with PatchInstallationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Installed** \ + * **Failed** \ + * **Excluded** \ + * **NotSelected** \ + * **Pending** + */ +export type PatchInstallationState = string; + +/** Known values of {@link ExpandTypesForGetVMScaleSets} that the service accepts. */ +export enum KnownExpandTypesForGetVMScaleSets { + UserData = "userData" +} + +/** + * Defines values for ExpandTypesForGetVMScaleSets. \ + * {@link KnownExpandTypesForGetVMScaleSets} can be used interchangeably with ExpandTypesForGetVMScaleSets, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **userData** + */ +export type ExpandTypesForGetVMScaleSets = string; + +/** Known values of {@link OrchestrationServiceNames} that the service accepts. */ +export enum KnownOrchestrationServiceNames { + AutomaticRepairs = "AutomaticRepairs", + DummyOrchestrationServiceName = "DummyOrchestrationServiceName" +} + +/** + * Defines values for OrchestrationServiceNames. \ + * {@link KnownOrchestrationServiceNames} can be used interchangeably with OrchestrationServiceNames, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AutomaticRepairs** \ + * **DummyOrchestrationServiceName** */ -export type VirtualMachineImagesListPublishersResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type OrchestrationServiceNames = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link OrchestrationServiceState} that the service accepts. */ +export enum KnownOrchestrationServiceState { + NotRunning = "NotRunning", + Running = "Running", + Suspended = "Suspended" +} + +/** + * Defines values for OrchestrationServiceState. \ + * {@link KnownOrchestrationServiceState} can be used interchangeably with OrchestrationServiceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotRunning** \ + * **Running** \ + * **Suspended** + */ +export type OrchestrationServiceState = string; + +/** Known values of {@link OrchestrationServiceStateAction} that the service accepts. */ +export enum KnownOrchestrationServiceStateAction { + Resume = "Resume", + Suspend = "Suspend" +} + +/** + * Defines values for OrchestrationServiceStateAction. \ + * {@link KnownOrchestrationServiceStateAction} can be used interchangeably with OrchestrationServiceStateAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Resume** \ + * **Suspend** + */ +export type OrchestrationServiceStateAction = string; + +/** Known values of {@link ExecutionState} that the service accepts. */ +export enum KnownExecutionState { + Unknown = "Unknown", + Pending = "Pending", + Running = "Running", + Failed = "Failed", + Succeeded = "Succeeded", + TimedOut = "TimedOut", + Canceled = "Canceled" +} + +/** + * Defines values for ExecutionState. \ + * {@link KnownExecutionState} can be used interchangeably with ExecutionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Pending** \ + * **Running** \ + * **Failed** \ + * **Succeeded** \ + * **TimedOut** \ + * **Canceled** + */ +export type ExecutionState = string; + +/** Known values of {@link DiskStorageAccountTypes} that the service accepts. */ +export enum KnownDiskStorageAccountTypes { + /** Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. */ + StandardLRS = "Standard_LRS", + /** Premium SSD locally redundant storage. Best for production and performance sensitive workloads. */ + PremiumLRS = "Premium_LRS", + /** Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test. */ + StandardSSDLRS = "StandardSSD_LRS", + /** Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. */ + UltraSSDLRS = "UltraSSD_LRS", + /** Premium SSD zone redundant storage. Best for the production workloads that need storage resiliency against zone failures. */ + PremiumZRS = "Premium_ZRS", + /** Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures. */ + StandardSSDZRS = "StandardSSD_ZRS" +} + +/** + * Defines values for DiskStorageAccountTypes. \ + * {@link KnownDiskStorageAccountTypes} can be used interchangeably with DiskStorageAccountTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS**: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. \ + * **Premium_LRS**: Premium SSD locally redundant storage. Best for production and performance sensitive workloads. \ + * **StandardSSD_LRS**: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev\/test. \ + * **UltraSSD_LRS**: Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. \ + * **Premium_ZRS**: Premium SSD zone redundant storage. Best for the production workloads that need storage resiliency against zone failures. \ + * **StandardSSD_ZRS**: Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev\/test that need storage resiliency against zone failures. + */ +export type DiskStorageAccountTypes = string; + +/** Known values of {@link HyperVGeneration} that the service accepts. */ +export enum KnownHyperVGeneration { + V1 = "V1", + V2 = "V2" +} + +/** + * Defines values for HyperVGeneration. \ + * {@link KnownHyperVGeneration} can be used interchangeably with HyperVGeneration, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **V1** \ + * **V2** + */ +export type HyperVGeneration = string; + +/** Known values of {@link DiskCreateOption} that the service accepts. */ +export enum KnownDiskCreateOption { + /** Create an empty data disk of a size given by diskSizeGB. */ + Empty = "Empty", + /** Disk will be attached to a VM. */ + Attach = "Attach", + /** Create a new disk from a platform image specified by the given imageReference or galleryImageReference. */ + FromImage = "FromImage", + /** Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId. */ + Import = "Import", + /** Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId. */ + Copy = "Copy", + /** Create a new disk by copying from a backup recovery point. */ + Restore = "Restore", + /** Create a new disk by obtaining a write token and using it to directly upload the contents of the disk. */ + Upload = "Upload" +} + +/** + * Defines values for DiskCreateOption. \ + * {@link KnownDiskCreateOption} can be used interchangeably with DiskCreateOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Empty**: Create an empty data disk of a size given by diskSizeGB. \ + * **Attach**: Disk will be attached to a VM. \ + * **FromImage**: Create a new disk from a platform image specified by the given imageReference or galleryImageReference. \ + * **Import**: Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId. \ + * **Copy**: Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId. \ + * **Restore**: Create a new disk by copying from a backup recovery point. \ + * **Upload**: Create a new disk by obtaining a write token and using it to directly upload the contents of the disk. + */ +export type DiskCreateOption = string; + +/** Known values of {@link DiskState} that the service accepts. */ +export enum KnownDiskState { + /** The disk is not being used and can be attached to a VM. */ + Unattached = "Unattached", + /** The disk is currently mounted to a running VM. */ + Attached = "Attached", + /** The disk is mounted to a stopped-deallocated VM */ + Reserved = "Reserved", + /** The disk currently has an Active SAS Uri associated with it. */ + ActiveSAS = "ActiveSAS", + /** A disk is ready to be created by upload by requesting a write token. */ + ReadyToUpload = "ReadyToUpload", + /** A disk is created for upload and a write token has been issued for uploading to it. */ + ActiveUpload = "ActiveUpload" +} + +/** + * Defines values for DiskState. \ + * {@link KnownDiskState} can be used interchangeably with DiskState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unattached**: The disk is not being used and can be attached to a VM. \ + * **Attached**: The disk is currently mounted to a running VM. \ + * **Reserved**: The disk is mounted to a stopped-deallocated VM \ + * **ActiveSAS**: The disk currently has an Active SAS Uri associated with it. \ + * **ReadyToUpload**: A disk is ready to be created by upload by requesting a write token. \ + * **ActiveUpload**: A disk is created for upload and a write token has been issued for uploading to it. + */ +export type DiskState = string; + +/** Known values of {@link EncryptionType} that the service accepts. */ +export enum KnownEncryptionType { + /** Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets. */ + EncryptionAtRestWithPlatformKey = "EncryptionAtRestWithPlatformKey", + /** Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer. */ + EncryptionAtRestWithCustomerKey = "EncryptionAtRestWithCustomerKey", + /** Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. */ + EncryptionAtRestWithPlatformAndCustomerKeys = "EncryptionAtRestWithPlatformAndCustomerKeys" +} + +/** + * Defines values for EncryptionType. \ + * {@link KnownEncryptionType} can be used interchangeably with EncryptionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EncryptionAtRestWithPlatformKey**: Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets. \ + * **EncryptionAtRestWithCustomerKey**: Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer. \ + * **EncryptionAtRestWithPlatformAndCustomerKeys**: Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. + */ +export type EncryptionType = string; + +/** Known values of {@link NetworkAccessPolicy} that the service accepts. */ +export enum KnownNetworkAccessPolicy { + /** The disk can be exported or uploaded to from any network. */ + AllowAll = "AllowAll", + /** The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. */ + AllowPrivate = "AllowPrivate", + /** The disk cannot be exported. */ + DenyAll = "DenyAll" +} + +/** + * Defines values for NetworkAccessPolicy. \ + * {@link KnownNetworkAccessPolicy} can be used interchangeably with NetworkAccessPolicy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AllowAll**: The disk can be exported or uploaded to from any network. \ + * **AllowPrivate**: The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. \ + * **DenyAll**: The disk cannot be exported. + */ +export type NetworkAccessPolicy = string; + +/** Known values of {@link DiskSecurityTypes} that the service accepts. */ +export enum KnownDiskSecurityTypes { + /** Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM) */ + TrustedLaunch = "TrustedLaunch" +} /** - * Contains response data for the listSkus operation. + * Defines values for DiskSecurityTypes. \ + * {@link KnownDiskSecurityTypes} can be used interchangeably with DiskSecurityTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TrustedLaunch**: Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM) */ -export type VirtualMachineImagesListSkusResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DiskSecurityTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link AccessLevel} that the service accepts. */ +export enum KnownAccessLevel { + None = "None", + Read = "Read", + Write = "Write" +} /** - * Contains response data for the get operation. + * Defines values for AccessLevel. \ + * {@link KnownAccessLevel} can be used interchangeably with AccessLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Read** \ + * **Write** */ -export type VirtualMachineImagesEdgeZoneGetResponse = VirtualMachineImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type AccessLevel = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImage; - }; -}; +/** Known values of {@link SnapshotStorageAccountTypes} that the service accepts. */ +export enum KnownSnapshotStorageAccountTypes { + /** Standard HDD locally redundant storage */ + StandardLRS = "Standard_LRS", + /** Premium SSD locally redundant storage */ + PremiumLRS = "Premium_LRS", + /** Standard zone redundant storage */ + StandardZRS = "Standard_ZRS" +} /** - * Contains response data for the list operation. + * Defines values for SnapshotStorageAccountTypes. \ + * {@link KnownSnapshotStorageAccountTypes} can be used interchangeably with SnapshotStorageAccountTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS**: Standard HDD locally redundant storage \ + * **Premium_LRS**: Premium SSD locally redundant storage \ + * **Standard_ZRS**: Standard zone redundant storage */ -export type VirtualMachineImagesEdgeZoneListResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SnapshotStorageAccountTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link DiskEncryptionSetIdentityType} that the service accepts. */ +export enum KnownDiskEncryptionSetIdentityType { + SystemAssigned = "SystemAssigned", + None = "None" +} /** - * Contains response data for the listOffers operation. + * Defines values for DiskEncryptionSetIdentityType. \ + * {@link KnownDiskEncryptionSetIdentityType} can be used interchangeably with DiskEncryptionSetIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssigned** \ + * **None** */ -export type VirtualMachineImagesEdgeZoneListOffersResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type DiskEncryptionSetIdentityType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link DiskEncryptionSetType} that the service accepts. */ +export enum KnownDiskEncryptionSetType { + /** Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer. */ + EncryptionAtRestWithCustomerKey = "EncryptionAtRestWithCustomerKey", + /** Resource using diskEncryptionSet would be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed. */ + EncryptionAtRestWithPlatformAndCustomerKeys = "EncryptionAtRestWithPlatformAndCustomerKeys" +} /** - * Contains response data for the listPublishers operation. + * Defines values for DiskEncryptionSetType. \ + * {@link KnownDiskEncryptionSetType} can be used interchangeably with DiskEncryptionSetType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EncryptionAtRestWithCustomerKey**: Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer. \ + * **EncryptionAtRestWithPlatformAndCustomerKeys**: Resource using diskEncryptionSet would be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed. */ -export type VirtualMachineImagesEdgeZoneListPublishersResponse = Array< - VirtualMachineImageResource -> & { - /** - * 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: VirtualMachineImageResource[]; - }; -}; +export type DiskEncryptionSetType = string; + +/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + Pending = "Pending", + Approved = "Approved", + Rejected = "Rejected" +} /** - * Contains response data for the listSkus operation. + * Defines values for PrivateEndpointServiceConnectionStatus. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Approved** \ + * **Rejected** */ -export type VirtualMachineImagesEdgeZoneListSkusResponse = Array & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PrivateEndpointServiceConnectionStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineImageResource[]; - }; -}; +/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ +export enum KnownPrivateEndpointConnectionProvisioningState { + Succeeded = "Succeeded", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed" +} /** - * Contains response data for the list operation. + * Defines values for PrivateEndpointConnectionProvisioningState. \ + * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Creating** \ + * **Deleting** \ + * **Failed** */ -export type UsageListResponse = ListUsagesResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PrivateEndpointConnectionProvisioningState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ListUsagesResult; - }; -}; +/** Known values of {@link GalleryPropertiesProvisioningState} that the service accepts. */ +export enum KnownGalleryPropertiesProvisioningState { + Creating = "Creating", + Updating = "Updating", + Failed = "Failed", + Succeeded = "Succeeded", + Deleting = "Deleting", + Migrating = "Migrating" +} /** - * Contains response data for the listNext operation. + * Defines values for GalleryPropertiesProvisioningState. \ + * {@link KnownGalleryPropertiesProvisioningState} can be used interchangeably with GalleryPropertiesProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Failed** \ + * **Succeeded** \ + * **Deleting** \ + * **Migrating** */ -export type UsageListNextResponse = ListUsagesResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type GalleryPropertiesProvisioningState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ListUsagesResult; - }; -}; +/** Known values of {@link GallerySharingPermissionTypes} that the service accepts. */ +export enum KnownGallerySharingPermissionTypes { + Private = "Private", + Groups = "Groups" +} /** - * Contains response data for the listByLocation operation. + * Defines values for GallerySharingPermissionTypes. \ + * {@link KnownGallerySharingPermissionTypes} can be used interchangeably with GallerySharingPermissionTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Private** \ + * **Groups** */ -export type VirtualMachinesListByLocationResponse = VirtualMachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type GallerySharingPermissionTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineListResult; - }; -}; +/** Known values of {@link SharingProfileGroupTypes} that the service accepts. */ +export enum KnownSharingProfileGroupTypes { + Subscriptions = "Subscriptions", + AADTenants = "AADTenants" +} /** - * Contains response data for the capture operation. + * Defines values for SharingProfileGroupTypes. \ + * {@link KnownSharingProfileGroupTypes} can be used interchangeably with SharingProfileGroupTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Subscriptions** \ + * **AADTenants** */ -export type VirtualMachinesCaptureResponse = VirtualMachineCaptureResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SharingProfileGroupTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineCaptureResult; - }; -}; +/** Known values of {@link SelectPermissions} that the service accepts. */ +export enum KnownSelectPermissions { + Permissions = "Permissions" +} /** - * Contains response data for the createOrUpdate operation. + * Defines values for SelectPermissions. \ + * {@link KnownSelectPermissions} can be used interchangeably with SelectPermissions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Permissions** */ -export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SelectPermissions = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachine; - }; -}; +/** Known values of {@link GalleryImagePropertiesProvisioningState} that the service accepts. */ +export enum KnownGalleryImagePropertiesProvisioningState { + Creating = "Creating", + Updating = "Updating", + Failed = "Failed", + Succeeded = "Succeeded", + Deleting = "Deleting", + Migrating = "Migrating" +} /** - * Contains response data for the update operation. + * Defines values for GalleryImagePropertiesProvisioningState. \ + * {@link KnownGalleryImagePropertiesProvisioningState} can be used interchangeably with GalleryImagePropertiesProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Failed** \ + * **Succeeded** \ + * **Deleting** \ + * **Migrating** */ -export type VirtualMachinesUpdateResponse = VirtualMachine & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type GalleryImagePropertiesProvisioningState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachine; - }; -}; +/** Known values of {@link StorageAccountType} that the service accepts. */ +export enum KnownStorageAccountType { + StandardLRS = "Standard_LRS", + StandardZRS = "Standard_ZRS", + PremiumLRS = "Premium_LRS" +} /** - * Contains response data for the get operation. + * Defines values for StorageAccountType. \ + * {@link KnownStorageAccountType} can be used interchangeably with StorageAccountType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS** \ + * **Standard_ZRS** \ + * **Premium_LRS** */ -export type VirtualMachinesGetResponse = VirtualMachine & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type StorageAccountType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachine; - }; -}; +/** Known values of {@link GalleryImageVersionPropertiesProvisioningState} that the service accepts. */ +export enum KnownGalleryImageVersionPropertiesProvisioningState { + Creating = "Creating", + Updating = "Updating", + Failed = "Failed", + Succeeded = "Succeeded", + Deleting = "Deleting", + Migrating = "Migrating" +} /** - * Contains response data for the instanceView operation. + * Defines values for GalleryImageVersionPropertiesProvisioningState. \ + * {@link KnownGalleryImageVersionPropertiesProvisioningState} can be used interchangeably with GalleryImageVersionPropertiesProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Failed** \ + * **Succeeded** \ + * **Deleting** \ + * **Migrating** */ -export type VirtualMachinesInstanceViewResponse = VirtualMachineInstanceView & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type GalleryImageVersionPropertiesProvisioningState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineInstanceView; - }; -}; +/** Known values of {@link AggregatedReplicationState} that the service accepts. */ +export enum KnownAggregatedReplicationState { + Unknown = "Unknown", + InProgress = "InProgress", + Completed = "Completed", + Failed = "Failed" +} /** - * Contains response data for the list operation. + * Defines values for AggregatedReplicationState. \ + * {@link KnownAggregatedReplicationState} can be used interchangeably with AggregatedReplicationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **InProgress** \ + * **Completed** \ + * **Failed** */ -export type VirtualMachinesListResponse = VirtualMachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type AggregatedReplicationState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineListResult; - }; -}; +/** Known values of {@link ReplicationState} that the service accepts. */ +export enum KnownReplicationState { + Unknown = "Unknown", + Replicating = "Replicating", + Completed = "Completed", + Failed = "Failed" +} /** - * Contains response data for the listAll operation. + * Defines values for ReplicationState. \ + * {@link KnownReplicationState} can be used interchangeably with ReplicationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Replicating** \ + * **Completed** \ + * **Failed** */ -export type VirtualMachinesListAllResponse = VirtualMachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ReplicationState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineListResult; - }; -}; +/** Known values of {@link ReplicationStatusTypes} that the service accepts. */ +export enum KnownReplicationStatusTypes { + ReplicationStatus = "ReplicationStatus" +} /** - * Contains response data for the listAvailableSizes operation. + * Defines values for ReplicationStatusTypes. \ + * {@link KnownReplicationStatusTypes} can be used interchangeably with ReplicationStatusTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReplicationStatus** */ -export type VirtualMachinesListAvailableSizesResponse = VirtualMachineSizeListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ReplicationStatusTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineSizeListResult; - }; -}; +/** Known values of {@link GalleryApplicationVersionPropertiesProvisioningState} that the service accepts. */ +export enum KnownGalleryApplicationVersionPropertiesProvisioningState { + Creating = "Creating", + Updating = "Updating", + Failed = "Failed", + Succeeded = "Succeeded", + Deleting = "Deleting", + Migrating = "Migrating" +} /** - * Contains response data for the retrieveBootDiagnosticsData operation. + * Defines values for GalleryApplicationVersionPropertiesProvisioningState. \ + * {@link KnownGalleryApplicationVersionPropertiesProvisioningState} can be used interchangeably with GalleryApplicationVersionPropertiesProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Failed** \ + * **Succeeded** \ + * **Deleting** \ + * **Migrating** */ -export type VirtualMachinesRetrieveBootDiagnosticsDataResponse = RetrieveBootDiagnosticsDataResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type GalleryApplicationVersionPropertiesProvisioningState = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RetrieveBootDiagnosticsDataResult; - }; -}; +/** Known values of {@link SharingUpdateOperationTypes} that the service accepts. */ +export enum KnownSharingUpdateOperationTypes { + Add = "Add", + Remove = "Remove", + Reset = "Reset" +} /** - * Contains response data for the assessPatches operation. + * Defines values for SharingUpdateOperationTypes. \ + * {@link KnownSharingUpdateOperationTypes} can be used interchangeably with SharingUpdateOperationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Add** \ + * **Remove** \ + * **Reset** */ -export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SharingUpdateOperationTypes = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineAssessPatchesResult; - }; -}; +/** Known values of {@link SharedToValues} that the service accepts. */ +export enum KnownSharedToValues { + Tenant = "tenant" +} /** - * Contains response data for the installPatches operation. + * Defines values for SharedToValues. \ + * {@link KnownSharedToValues} can be used interchangeably with SharedToValues, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **tenant** */ -export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SharedToValues = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineInstallPatchesResult; - }; -}; +/** Known values of {@link CloudServiceUpgradeMode} that the service accepts. */ +export enum KnownCloudServiceUpgradeMode { + Auto = "Auto", + Manual = "Manual", + Simultaneous = "Simultaneous" +} /** - * Contains response data for the runCommand operation. + * Defines values for CloudServiceUpgradeMode. \ + * {@link KnownCloudServiceUpgradeMode} can be used interchangeably with CloudServiceUpgradeMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Auto** \ + * **Manual** \ + * **Simultaneous** */ -export type VirtualMachinesRunCommandResponse = RunCommandResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type CloudServiceUpgradeMode = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandResult; - }; -}; +/** Known values of {@link AvailabilitySetSkuTypes} that the service accepts. */ +export enum KnownAvailabilitySetSkuTypes { + Classic = "Classic", + Aligned = "Aligned" +} /** - * Contains response data for the beginCapture operation. + * Defines values for AvailabilitySetSkuTypes. \ + * {@link KnownAvailabilitySetSkuTypes} can be used interchangeably with AvailabilitySetSkuTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Classic** \ + * **Aligned** */ -export type VirtualMachinesBeginCaptureResponse = VirtualMachineCaptureResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type AvailabilitySetSkuTypes = string; +/** Defines values for StatusLevelTypes. */ +export type StatusLevelTypes = "Info" | "Warning" | "Error"; +/** Defines values for InstanceViewTypes. */ +export type InstanceViewTypes = "instanceView" | "userData"; +/** Defines values for DedicatedHostLicenseTypes. */ +export type DedicatedHostLicenseTypes = + | "None" + | "Windows_Server_Hybrid" + | "Windows_Server_Perpetual"; +/** Defines values for OperatingSystemTypes. */ +export type OperatingSystemTypes = "Windows" | "Linux"; +/** Defines values for CachingTypes. */ +export type CachingTypes = "None" | "ReadOnly" | "ReadWrite"; +/** Defines values for SettingNames. */ +export type SettingNames = "AutoLogon" | "FirstLogonCommands"; +/** Defines values for ProtocolTypes. */ +export type ProtocolTypes = "Http" | "Https"; +/** Defines values for MaintenanceOperationResultCodeTypes. */ +export type MaintenanceOperationResultCodeTypes = + | "None" + | "RetryLater" + | "MaintenanceAborted" + | "MaintenanceCompleted"; +/** Defines values for ResourceIdentityType. */ +export type ResourceIdentityType = + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned, UserAssigned" + | "None"; +/** Defines values for UpgradeMode. */ +export type UpgradeMode = "Automatic" | "Manual" | "Rolling"; +/** Defines values for OperatingSystemStateTypes. */ +export type OperatingSystemStateTypes = "Generalized" | "Specialized"; +/** Defines values for VirtualMachineScaleSetSkuScaleType. */ +export type VirtualMachineScaleSetSkuScaleType = "Automatic" | "None"; +/** Defines values for UpgradeState. */ +export type UpgradeState = + | "RollingForward" + | "Cancelled" + | "Completed" + | "Faulted"; +/** Defines values for UpgradeOperationInvoker. */ +export type UpgradeOperationInvoker = "Unknown" | "User" | "Platform"; +/** Defines values for RollingUpgradeStatusCode. */ +export type RollingUpgradeStatusCode = + | "RollingForward" + | "Cancelled" + | "Completed" + | "Faulted"; +/** Defines values for RollingUpgradeActionType. */ +export type RollingUpgradeActionType = "Start" | "Cancel"; +/** Defines values for IntervalInMins. */ +export type IntervalInMins = + | "ThreeMins" + | "FiveMins" + | "ThirtyMins" + | "SixtyMins"; +/** Defines values for ResourceSkuCapacityScaleType. */ +export type ResourceSkuCapacityScaleType = "Automatic" | "Manual" | "None"; +/** Defines values for ResourceSkuRestrictionsType. */ +export type ResourceSkuRestrictionsType = "Location" | "Zone"; +/** Defines values for ResourceSkuRestrictionsReasonCode. */ +export type ResourceSkuRestrictionsReasonCode = + | "QuotaId" + | "NotAvailableForSubscription"; +/** Defines values for HostCaching. */ +export type HostCaching = "None" | "ReadOnly" | "ReadWrite"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = ComputeOperationListResult; + +/** Optional parameters. */ +export interface AvailabilitySetsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type AvailabilitySetsCreateOrUpdateResponse = AvailabilitySet; + +/** Optional parameters. */ +export interface AvailabilitySetsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type AvailabilitySetsUpdateResponse = AvailabilitySet; + +/** Optional parameters. */ +export interface AvailabilitySetsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AvailabilitySetsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AvailabilitySetsGetResponse = AvailabilitySet; + +/** Optional parameters. */ +export interface AvailabilitySetsListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. Allowed values are 'instanceView'. */ + expand?: string; +} + +/** Contains response data for the listBySubscription operation. */ +export type AvailabilitySetsListBySubscriptionResponse = AvailabilitySetListResult; + +/** Optional parameters. */ +export interface AvailabilitySetsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AvailabilitySetsListResponse = AvailabilitySetListResult; + +/** Optional parameters. */ +export interface AvailabilitySetsListAvailableSizesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAvailableSizes operation. */ +export type AvailabilitySetsListAvailableSizesResponse = VirtualMachineSizeListResult; + +/** Optional parameters. */ +export interface AvailabilitySetsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. Allowed values are 'instanceView'. */ + expand?: string; +} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type AvailabilitySetsListBySubscriptionNextResponse = AvailabilitySetListResult; + +/** Optional parameters. */ +export interface AvailabilitySetsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AvailabilitySetsListNextResponse = AvailabilitySetListResult; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ProximityPlacementGroupsCreateOrUpdateResponse = ProximityPlacementGroup; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ProximityPlacementGroupsUpdateResponse = ProximityPlacementGroup; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ProximityPlacementGroupsGetOptionalParams + extends coreClient.OperationOptions { + /** includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group. */ + includeColocationStatus?: string; +} + +/** Contains response data for the get operation. */ +export type ProximityPlacementGroupsGetResponse = ProximityPlacementGroup; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ProximityPlacementGroupsListBySubscriptionResponse = ProximityPlacementGroupListResult; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ProximityPlacementGroupsListByResourceGroupResponse = ProximityPlacementGroupListResult; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ProximityPlacementGroupsListBySubscriptionNextResponse = ProximityPlacementGroupListResult; + +/** Optional parameters. */ +export interface ProximityPlacementGroupsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ProximityPlacementGroupsListByResourceGroupNextResponse = ProximityPlacementGroupListResult; + +/** Optional parameters. */ +export interface DedicatedHostGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type DedicatedHostGroupsCreateOrUpdateResponse = DedicatedHostGroup; + +/** Optional parameters. */ +export interface DedicatedHostGroupsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type DedicatedHostGroupsUpdateResponse = DedicatedHostGroup; + +/** Optional parameters. */ +export interface DedicatedHostGroupsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DedicatedHostGroupsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host group. */ + expand?: InstanceViewTypes; +} + +/** Contains response data for the get operation. */ +export type DedicatedHostGroupsGetResponse = DedicatedHostGroup; + +/** Optional parameters. */ +export interface DedicatedHostGroupsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type DedicatedHostGroupsListByResourceGroupResponse = DedicatedHostGroupListResult; + +/** Optional parameters. */ +export interface DedicatedHostGroupsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type DedicatedHostGroupsListBySubscriptionResponse = DedicatedHostGroupListResult; + +/** Optional parameters. */ +export interface DedicatedHostGroupsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type DedicatedHostGroupsListByResourceGroupNextResponse = DedicatedHostGroupListResult; + +/** Optional parameters. */ +export interface DedicatedHostGroupsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type DedicatedHostGroupsListBySubscriptionNextResponse = DedicatedHostGroupListResult; + +/** Optional parameters. */ +export interface DedicatedHostsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DedicatedHostsCreateOrUpdateResponse = DedicatedHost; + +/** Optional parameters. */ +export interface DedicatedHostsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type DedicatedHostsUpdateResponse = DedicatedHost; + +/** Optional parameters. */ +export interface DedicatedHostsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DedicatedHostsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host. */ + expand?: InstanceViewTypes; +} + +/** Contains response data for the get operation. */ +export type DedicatedHostsGetResponse = DedicatedHost; + +/** Optional parameters. */ +export interface DedicatedHostsListByHostGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostGroup operation. */ +export type DedicatedHostsListByHostGroupResponse = DedicatedHostListResult; + +/** Optional parameters. */ +export interface DedicatedHostsListByHostGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByHostGroupNext operation. */ +export type DedicatedHostsListByHostGroupNextResponse = DedicatedHostListResult; + +/** Optional parameters. */ +export interface SshPublicKeysListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type SshPublicKeysListBySubscriptionResponse = SshPublicKeysGroupListResult; + +/** Optional parameters. */ +export interface SshPublicKeysListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type SshPublicKeysListByResourceGroupResponse = SshPublicKeysGroupListResult; + +/** Optional parameters. */ +export interface SshPublicKeysCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type SshPublicKeysCreateResponse = SshPublicKeyResource; + +/** Optional parameters. */ +export interface SshPublicKeysUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type SshPublicKeysUpdateResponse = SshPublicKeyResource; + +/** Optional parameters. */ +export interface SshPublicKeysDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SshPublicKeysGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SshPublicKeysGetResponse = SshPublicKeyResource; + +/** Optional parameters. */ +export interface SshPublicKeysGenerateKeyPairOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the generateKeyPair operation. */ +export type SshPublicKeysGenerateKeyPairResponse = SshPublicKeyGenerateKeyPairResult; + +/** Optional parameters. */ +export interface SshPublicKeysListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type SshPublicKeysListBySubscriptionNextResponse = SshPublicKeysGroupListResult; + +/** Optional parameters. */ +export interface SshPublicKeysListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type SshPublicKeysListByResourceGroupNextResponse = SshPublicKeysGroupListResult; + +/** Optional parameters. */ +export interface VirtualMachineExtensionImagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VirtualMachineExtensionImagesGetResponse = VirtualMachineExtensionImage; + +/** Optional parameters. */ +export interface VirtualMachineExtensionImagesListTypesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listTypes operation. */ +export type VirtualMachineExtensionImagesListTypesResponse = VirtualMachineExtensionImage[]; + +/** Optional parameters. */ +export interface VirtualMachineExtensionImagesListVersionsOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; + top?: number; + orderby?: string; +} + +/** Contains response data for the listVersions operation. */ +export type VirtualMachineExtensionImagesListVersionsResponse = VirtualMachineExtensionImage[]; + +/** Optional parameters. */ +export interface VirtualMachineExtensionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineExtensionsCreateOrUpdateResponse = VirtualMachineExtension; + +/** Optional parameters. */ +export interface VirtualMachineExtensionsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type VirtualMachineExtensionsUpdateResponse = VirtualMachineExtension; + +/** Optional parameters. */ +export interface VirtualMachineExtensionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachineExtensionsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} + +/** Contains response data for the get operation. */ +export type VirtualMachineExtensionsGetResponse = VirtualMachineExtension; + +/** Optional parameters. */ +export interface VirtualMachineExtensionsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} + +/** Contains response data for the list operation. */ +export type VirtualMachineExtensionsListResponse = VirtualMachineExtensionsListResult; + +/** Optional parameters. */ +export interface VirtualMachineImagesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type VirtualMachineImagesGetResponse = VirtualMachineImage; + +/** Optional parameters. */ +export interface VirtualMachineImagesListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; + top?: number; + orderby?: string; +} + +/** Contains response data for the list operation. */ +export type VirtualMachineImagesListResponse = VirtualMachineImageResource[]; + +/** Optional parameters. */ +export interface VirtualMachineImagesListOffersOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOffers operation. */ +export type VirtualMachineImagesListOffersResponse = VirtualMachineImageResource[]; + +/** Optional parameters. */ +export interface VirtualMachineImagesListPublishersOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listPublishers operation. */ +export type VirtualMachineImagesListPublishersResponse = VirtualMachineImageResource[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineCaptureResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineImagesListSkusOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualMachinesBeginCreateOrUpdateResponse = VirtualMachine & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listSkus operation. */ +export type VirtualMachineImagesListSkusResponse = VirtualMachineImageResource[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachine; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineImagesEdgeZoneGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachinesBeginUpdateResponse = VirtualMachine & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VirtualMachineImagesEdgeZoneGetResponse = VirtualMachineImage; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachine; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineImagesEdgeZoneListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; + /** An integer value specifying the number of images to return that matches supplied values. */ + top?: number; + /** Specifies the order of the results returned. Formatted as an OData query. */ + orderby?: string; +} -/** - * Contains response data for the beginAssessPatches operation. - */ -export type VirtualMachinesBeginAssessPatchesResponse = VirtualMachineAssessPatchesResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineImagesEdgeZoneListResponse = VirtualMachineImageResource[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineAssessPatchesResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineImagesEdgeZoneListOffersOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginInstallPatches operation. - */ -export type VirtualMachinesBeginInstallPatchesResponse = VirtualMachineInstallPatchesResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listOffers operation. */ +export type VirtualMachineImagesEdgeZoneListOffersResponse = VirtualMachineImageResource[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineInstallPatchesResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineImagesEdgeZoneListPublishersOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginRunCommand operation. - */ -export type VirtualMachinesBeginRunCommandResponse = RunCommandResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listPublishers operation. */ +export type VirtualMachineImagesEdgeZoneListPublishersResponse = VirtualMachineImageResource[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineImagesEdgeZoneListSkusOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByLocationNext operation. - */ -export type VirtualMachinesListByLocationNextResponse = VirtualMachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listSkus operation. */ +export type VirtualMachineImagesEdgeZoneListSkusResponse = VirtualMachineImageResource[]; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineListResult; - }; -}; +/** Optional parameters. */ +export interface UsageOperationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type VirtualMachinesListNextResponse = VirtualMachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type UsageOperationsListResponse = ListUsagesResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineListResult; - }; -}; +/** Optional parameters. */ +export interface UsageOperationsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listAllNext operation. - */ -export type VirtualMachinesListAllNextResponse = VirtualMachineListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type UsageOperationsListNextResponse = ListUsagesResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesListByLocationOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByLocation operation. - */ -export type VirtualMachineScaleSetsListByLocationResponse = VirtualMachineScaleSetListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByLocation operation. */ +export type VirtualMachinesListByLocationResponse = VirtualMachineListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesCaptureOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type VirtualMachineScaleSetsCreateOrUpdateResponse = VirtualMachineScaleSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the capture operation. */ +export type VirtualMachinesCaptureResponse = VirtualMachineCaptureResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSet; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the update operation. - */ -export type VirtualMachineScaleSetsUpdateResponse = VirtualMachineScaleSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSet; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type VirtualMachineScaleSetsGetResponse = VirtualMachineScaleSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type VirtualMachinesUpdateResponse = VirtualMachine; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSet; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Optional parameter to force delete virtual machines.(Feature in Preview) */ + forceDeletion?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the getInstanceView operation. - */ -export type VirtualMachineScaleSetsGetInstanceViewResponse = VirtualMachineScaleSetInstanceView & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation. */ + expand?: InstanceViewTypes; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetInstanceView; - }; -}; +/** Contains response data for the get operation. */ +export type VirtualMachinesGetResponse = VirtualMachine; -/** - * Contains response data for the list operation. - */ -export type VirtualMachineScaleSetsListResponse = VirtualMachineScaleSetListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesInstanceViewOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListResult; - }; -}; +/** Contains response data for the instanceView operation. */ +export type VirtualMachinesInstanceViewResponse = VirtualMachineInstanceView; -/** - * Contains response data for the listAll operation. - */ -export type VirtualMachineScaleSetsListAllResponse = VirtualMachineScaleSetListWithLinkResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesConvertToManagedDisksOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListWithLinkResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesDeallocateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listSkus operation. - */ -export type VirtualMachineScaleSetsListSkusResponse = VirtualMachineScaleSetListSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesGeneralizeOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListSkusResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getOSUpgradeHistory operation. - */ -export type VirtualMachineScaleSetsGetOSUpgradeHistoryResponse = VirtualMachineScaleSetListOSUpgradeHistory & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachinesListResponse = VirtualMachineListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListOSUpgradeHistory; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesListAllOptionalParams + extends coreClient.OperationOptions { + /** statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. */ + statusOnly?: string; +} -/** - * Contains response data for the forceRecoveryServiceFabricPlatformUpdateDomainWalk operation. - */ -export type VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse = RecoveryWalkResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAll operation. */ +export type VirtualMachinesListAllResponse = VirtualMachineListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RecoveryWalkResponse; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesListAvailableSizesOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualMachineScaleSetsBeginCreateOrUpdateResponse = VirtualMachineScaleSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAvailableSizes operation. */ +export type VirtualMachinesListAvailableSizesResponse = VirtualMachineSizeListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSet; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesPowerOffOptionalParams + extends coreClient.OperationOptions { + /** The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified */ + skipShutdown?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesReapplyOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesRestartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesStartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesRedeployOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachinesReimageOptionalParams + extends coreClient.OperationOptions { + /** Parameters supplied to the Reimage Virtual Machine operation. */ + parameters?: VirtualMachineReimageParameters; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachineScaleSetsBeginUpdateResponse = VirtualMachineScaleSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams + extends coreClient.OperationOptions { + /** Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes.

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. */ + sasUriExpirationTimeInMinutes?: number; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSet; - }; -}; +/** Contains response data for the retrieveBootDiagnosticsData operation. */ +export type VirtualMachinesRetrieveBootDiagnosticsDataResponse = RetrieveBootDiagnosticsDataResult; -/** - * Contains response data for the listByLocationNext operation. - */ -export type VirtualMachineScaleSetsListByLocationNextResponse = VirtualMachineScaleSetListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesPerformMaintenanceOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachinesSimulateEvictionOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type VirtualMachineScaleSetsListNextResponse = VirtualMachineScaleSetListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesAssessPatchesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListResult; - }; -}; +/** Contains response data for the assessPatches operation. */ +export type VirtualMachinesAssessPatchesResponse = VirtualMachineAssessPatchesResult; -/** - * Contains response data for the listAllNext operation. - */ -export type VirtualMachineScaleSetsListAllNextResponse = VirtualMachineScaleSetListWithLinkResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesInstallPatchesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListWithLinkResult; - }; -}; +/** Contains response data for the installPatches operation. */ +export type VirtualMachinesInstallPatchesResponse = VirtualMachineInstallPatchesResult; -/** - * Contains response data for the listSkusNext operation. - */ -export type VirtualMachineScaleSetsListSkusNextResponse = VirtualMachineScaleSetListSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesRunCommandOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListSkusResult; - }; -}; +/** Contains response data for the runCommand operation. */ +export type VirtualMachinesRunCommandResponse = RunCommandResult; -/** - * Contains response data for the getOSUpgradeHistoryNext operation. - */ -export type VirtualMachineScaleSetsGetOSUpgradeHistoryNextResponse = VirtualMachineScaleSetListOSUpgradeHistory & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesListByLocationNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetListOSUpgradeHistory; - }; -}; +/** Contains response data for the listByLocationNext operation. */ +export type VirtualMachinesListByLocationNextResponse = VirtualMachineListResult; -/** - * Contains response data for the list operation. - */ -export type VirtualMachineSizesListResponse = VirtualMachineSizeListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineSizeListResult; - }; -}; +/** Contains response data for the listNext operation. */ +export type VirtualMachinesListNextResponse = VirtualMachineListResult; -/** - * Contains response data for the createOrUpdate operation. - */ -export type ImagesCreateOrUpdateResponse = Image & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachinesListAllNextOptionalParams + extends coreClient.OperationOptions { + /** statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. */ + statusOnly?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Image; - }; -}; +/** Contains response data for the listAllNext operation. */ +export type VirtualMachinesListAllNextResponse = VirtualMachineListResult; -/** - * Contains response data for the update operation. - */ -export type ImagesUpdateResponse = Image & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListByLocationOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Image; - }; -}; +/** Contains response data for the listByLocation operation. */ +export type VirtualMachineScaleSetsListByLocationResponse = VirtualMachineScaleSetListResult; -/** - * Contains response data for the get operation. - */ -export type ImagesGetResponse = Image & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Image; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineScaleSetsCreateOrUpdateResponse = VirtualMachineScaleSet; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ImagesListByResourceGroupResponse = ImageListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ImageListResult; - }; -}; +/** Contains response data for the update operation. */ +export type VirtualMachineScaleSetsUpdateResponse = VirtualMachineScaleSet; -/** - * Contains response data for the list operation. - */ -export type ImagesListResponse = ImageListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Optional parameter to force delete a VM scale set. (Feature in Preview) */ + forceDeletion?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ImageListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation */ + expand?: ExpandTypesForGetVMScaleSets; +} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type ImagesBeginCreateOrUpdateResponse = Image & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VirtualMachineScaleSetsGetResponse = VirtualMachineScaleSet; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Image; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsDeallocateOptionalParams + extends coreClient.OperationOptions { + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type ImagesBeginUpdateResponse = Image & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsDeleteInstancesOptionalParams + extends coreClient.OperationOptions { + /** Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) */ + forceDeletion?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Image; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsGetInstanceViewOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type ImagesListByResourceGroupNextResponse = ImageListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getInstanceView operation. */ +export type VirtualMachineScaleSetsGetInstanceViewResponse = VirtualMachineScaleSetInstanceView; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ImageListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type ImagesListNextResponse = ImageListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineScaleSetsListResponse = VirtualMachineScaleSetListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ImageListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListAllOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type RestorePointCollectionsCreateOrUpdateResponse = RestorePointCollection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAll operation. */ +export type VirtualMachineScaleSetsListAllResponse = VirtualMachineScaleSetListWithLinkResult; + +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListSkusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSkus operation. */ +export type VirtualMachineScaleSetsListSkusResponse = VirtualMachineScaleSetListSkusResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollection; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type RestorePointCollectionsUpdateResponse = RestorePointCollection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getOSUpgradeHistory operation. */ +export type VirtualMachineScaleSetsGetOSUpgradeHistoryResponse = VirtualMachineScaleSetListOSUpgradeHistory; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollection; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsPowerOffOptionalParams + extends coreClient.OperationOptions { + /** The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified */ + skipShutdown?: boolean; + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type RestorePointCollectionsGetResponse = RestorePointCollection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsRestartOptionalParams + extends coreClient.OperationOptions { + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollection; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsStartOptionalParams + extends coreClient.OperationOptions { + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the list operation. - */ -export type RestorePointCollectionsListResponse = RestorePointCollectionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsRedeployOptionalParams + extends coreClient.OperationOptions { + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollectionListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsPerformMaintenanceOptionalParams + extends coreClient.OperationOptions { + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listAll operation. - */ -export type RestorePointCollectionsListAllResponse = RestorePointCollectionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsUpdateInstancesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollectionListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsReimageOptionalParams + extends coreClient.OperationOptions { + /** Parameters for Reimaging VM ScaleSet. */ + vmScaleSetReimageInput?: VirtualMachineScaleSetReimageParameters; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type RestorePointCollectionsListNextResponse = RestorePointCollectionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsReimageAllOptionalParams + extends coreClient.OperationOptions { + /** A list of virtual machine instance IDs from the VM scale set. */ + vmInstanceIDs?: VirtualMachineScaleSetVMInstanceIDs; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollectionListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listAllNext operation. - */ -export type RestorePointCollectionsListAllNextResponse = RestorePointCollectionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the forceRecoveryServiceFabricPlatformUpdateDomainWalk operation. */ +export type VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse = RecoveryWalkResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePointCollectionListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the create operation. - */ -export type RestorePointsCreateResponse = RestorePoint & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePoint; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListByLocationNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type RestorePointsGetResponse = RestorePoint & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByLocationNext operation. */ +export type VirtualMachineScaleSetsListByLocationNextResponse = VirtualMachineScaleSetListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePoint; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreate operation. - */ -export type RestorePointsBeginCreateResponse = RestorePoint & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type VirtualMachineScaleSetsListNextResponse = VirtualMachineScaleSetListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RestorePoint; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListAllNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type VirtualMachineScaleSetExtensionsCreateOrUpdateResponse = VirtualMachineScaleSetExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAllNext operation. */ +export type VirtualMachineScaleSetsListAllNextResponse = VirtualMachineScaleSetListWithLinkResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtension; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsListSkusNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type VirtualMachineScaleSetExtensionsUpdateResponse = VirtualMachineScaleSetExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listSkusNext operation. */ +export type VirtualMachineScaleSetsListSkusNextResponse = VirtualMachineScaleSetListSkusResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtension; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetsGetOSUpgradeHistoryNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type VirtualMachineScaleSetExtensionsGetResponse = VirtualMachineScaleSetExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getOSUpgradeHistoryNext operation. */ +export type VirtualMachineScaleSetsGetOSUpgradeHistoryNextResponse = VirtualMachineScaleSetListOSUpgradeHistory; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtension; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineSizesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type VirtualMachineScaleSetExtensionsListResponse = VirtualMachineScaleSetExtensionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineSizesListResponse = VirtualMachineSizeListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtensionListResult; - }; -}; +/** Optional parameters. */ +export interface ImagesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualMachineScaleSetExtensionsBeginCreateOrUpdateResponse = VirtualMachineScaleSetExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type ImagesCreateOrUpdateResponse = Image; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtension; - }; -}; +/** Optional parameters. */ +export interface ImagesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachineScaleSetExtensionsBeginUpdateResponse = VirtualMachineScaleSetExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type ImagesUpdateResponse = Image; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtension; - }; -}; +/** Optional parameters. */ +export interface ImagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type VirtualMachineScaleSetExtensionsListNextResponse = VirtualMachineScaleSetExtensionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ImagesGetOptionalParams extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetExtensionListResult; - }; -}; +/** Contains response data for the get operation. */ +export type ImagesGetResponse = Image; -/** - * Contains response data for the getLatest operation. - */ -export type VirtualMachineScaleSetRollingUpgradesGetLatestResponse = RollingUpgradeStatusInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ImagesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RollingUpgradeStatusInfo; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type ImagesListByResourceGroupResponse = ImageListResult; -/** - * Contains response data for the createOrUpdate operation. - */ -export type VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse = VirtualMachineScaleSetVMExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ImagesListOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMExtension; - }; -}; +/** Contains response data for the list operation. */ +export type ImagesListResponse = ImageListResult; -/** - * Contains response data for the update operation. - */ -export type VirtualMachineScaleSetVMExtensionsUpdateResponse = VirtualMachineScaleSetVMExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ImagesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMExtension; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type ImagesListByResourceGroupNextResponse = ImageListResult; -/** - * Contains response data for the get operation. - */ -export type VirtualMachineScaleSetVMExtensionsGetResponse = VirtualMachineScaleSetVMExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ImagesListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMExtension; - }; -}; +/** Contains response data for the listNext operation. */ +export type ImagesListNextResponse = ImageListResult; -/** - * Contains response data for the list operation. - */ -export type VirtualMachineScaleSetVMExtensionsListResponse = VirtualMachineScaleSetVMExtensionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RestorePointCollectionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMExtensionsListResult; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type RestorePointCollectionsCreateOrUpdateResponse = RestorePointCollection; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualMachineScaleSetVMExtensionsBeginCreateOrUpdateResponse = VirtualMachineScaleSetVMExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RestorePointCollectionsUpdateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMExtension; - }; -}; +/** Contains response data for the update operation. */ +export type RestorePointCollectionsUpdateResponse = RestorePointCollection; -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachineScaleSetVMExtensionsBeginUpdateResponse = VirtualMachineScaleSetVMExtension & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RestorePointCollectionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMExtension; - }; -}; +/** Optional parameters. */ +export interface RestorePointCollectionsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points in the restorePointCollection. */ + expand?: RestorePointCollectionExpandOptions; +} -/** - * Contains response data for the update operation. - */ -export type VirtualMachineScaleSetVMsUpdateResponse = VirtualMachineScaleSetVM & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type RestorePointCollectionsGetResponse = RestorePointCollection; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVM; - }; -}; +/** Optional parameters. */ +export interface RestorePointCollectionsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type VirtualMachineScaleSetVMsGetResponse = VirtualMachineScaleSetVM & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type RestorePointCollectionsListResponse = RestorePointCollectionListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVM; - }; -}; +/** Optional parameters. */ +export interface RestorePointCollectionsListAllOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getInstanceView operation. - */ -export type VirtualMachineScaleSetVMsGetInstanceViewResponse = VirtualMachineScaleSetVMInstanceView & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAll operation. */ +export type RestorePointCollectionsListAllResponse = RestorePointCollectionListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMInstanceView; - }; -}; +/** Optional parameters. */ +export interface RestorePointCollectionsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type VirtualMachineScaleSetVMsListResponse = VirtualMachineScaleSetVMListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type RestorePointCollectionsListNextResponse = RestorePointCollectionListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMListResult; - }; -}; +/** Optional parameters. */ +export interface RestorePointCollectionsListAllNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the retrieveBootDiagnosticsData operation. - */ -export type VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataResponse = RetrieveBootDiagnosticsDataResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAllNext operation. */ +export type RestorePointCollectionsListAllNextResponse = RestorePointCollectionListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RetrieveBootDiagnosticsDataResult; - }; -}; +/** Optional parameters. */ +export interface RestorePointsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the runCommand operation. - */ -export type VirtualMachineScaleSetVMsRunCommandResponse = RunCommandResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the create operation. */ +export type RestorePointsCreateResponse = RestorePoint; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandResult; - }; -}; +/** Optional parameters. */ +export interface RestorePointsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachineScaleSetVMsBeginUpdateResponse = VirtualMachineScaleSetVM & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RestorePointsGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVM; - }; -}; +/** Contains response data for the get operation. */ +export type RestorePointsGetResponse = RestorePoint; -/** - * Contains response data for the beginRunCommand operation. - */ -export type VirtualMachineScaleSetVMsBeginRunCommandResponse = RunCommandResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandResult; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineScaleSetExtensionsCreateOrUpdateResponse = VirtualMachineScaleSetExtension; -/** - * Contains response data for the listNext operation. - */ -export type VirtualMachineScaleSetVMsListNextResponse = VirtualMachineScaleSetVMListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetExtensionsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineScaleSetVMListResult; - }; -}; +/** Contains response data for the update operation. */ +export type VirtualMachineScaleSetExtensionsUpdateResponse = VirtualMachineScaleSetExtension; -/** - * Contains response data for the exportRequestRateByInterval operation. - */ -export type LogAnalyticsExportRequestRateByIntervalResponse = LogAnalyticsOperationResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetExtensionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: LogAnalyticsOperationResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetExtensionsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} -/** - * Contains response data for the exportThrottledRequests operation. - */ -export type LogAnalyticsExportThrottledRequestsResponse = LogAnalyticsOperationResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VirtualMachineScaleSetExtensionsGetResponse = VirtualMachineScaleSetExtension; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LogAnalyticsOperationResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetExtensionsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginExportRequestRateByInterval operation. - */ -export type LogAnalyticsBeginExportRequestRateByIntervalResponse = LogAnalyticsOperationResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineScaleSetExtensionsListResponse = VirtualMachineScaleSetExtensionListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: LogAnalyticsOperationResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetExtensionsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginExportThrottledRequests operation. - */ -export type LogAnalyticsBeginExportThrottledRequestsResponse = LogAnalyticsOperationResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type VirtualMachineScaleSetExtensionsListNextResponse = VirtualMachineScaleSetExtensionListResult; + +/** Optional parameters. */ +export interface VirtualMachineScaleSetRollingUpgradesCancelOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: LogAnalyticsOperationResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type VirtualMachineRunCommandsListResponse = RunCommandListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getLatest operation. */ +export type VirtualMachineScaleSetRollingUpgradesGetLatestResponse = RollingUpgradeStatusInfo; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type VirtualMachineRunCommandsGetResponse = RunCommandDocument & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse = VirtualMachineScaleSetVMExtension; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandDocument; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMExtensionsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type VirtualMachineRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type VirtualMachineScaleSetVMExtensionsUpdateResponse = VirtualMachineScaleSetVMExtension; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMExtensionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the update operation. - */ -export type VirtualMachineRunCommandsUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMExtensionsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Contains response data for the get operation. */ +export type VirtualMachineScaleSetVMExtensionsGetResponse = VirtualMachineScaleSetVMExtension; -/** - * Contains response data for the getByVirtualMachine operation. - */ -export type VirtualMachineRunCommandsGetByVirtualMachineResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMExtensionsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Contains response data for the list operation. */ +export type VirtualMachineScaleSetVMExtensionsListResponse = VirtualMachineScaleSetVMExtensionsListResult; -/** - * Contains response data for the listByVirtualMachine operation. - */ -export type VirtualMachineRunCommandsListByVirtualMachineResponse = VirtualMachineRunCommandsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsReimageOptionalParams + extends coreClient.OperationOptions { + /** Parameters for the Reimaging Virtual machine in ScaleSet. */ + vmScaleSetVMReimageInput?: VirtualMachineScaleSetVMReimageParameters; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsReimageAllOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsDeallocateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type VirtualMachineScaleSetVMsUpdateResponse = VirtualMachineScaleSetVM; + +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview) */ + forceDeletion?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommandsListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine. */ + expand?: InstanceViewTypes; +} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualMachineRunCommandsBeginCreateOrUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VirtualMachineScaleSetVMsGetResponse = VirtualMachineScaleSetVM; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsGetInstanceViewOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachineRunCommandsBeginUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getInstanceView operation. */ +export type VirtualMachineScaleSetVMsGetInstanceViewResponse = VirtualMachineScaleSetVMInstanceView; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. Allowed values are 'instanceView'. */ + expand?: string; + /** The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'. */ + filter?: string; + /** The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. */ + select?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type VirtualMachineRunCommandsListNextResponse = RunCommandListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineScaleSetVMsListResponse = VirtualMachineScaleSetVMListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RunCommandListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsPowerOffOptionalParams + extends coreClient.OperationOptions { + /** The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified */ + skipShutdown?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByVirtualMachineNext operation. - */ -export type VirtualMachineRunCommandsListByVirtualMachineNextResponse = VirtualMachineRunCommandsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsRestartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommandsListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsStartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsRedeployOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams + extends coreClient.OperationOptions { + /** Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes.

    NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. */ + sasUriExpirationTimeInMinutes?: number; +} -/** - * Contains response data for the update operation. - */ -export type VirtualMachineScaleSetVMRunCommandsUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the retrieveBootDiagnosticsData operation. */ +export type VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataResponse = RetrieveBootDiagnosticsDataResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type VirtualMachineScaleSetVMRunCommandsGetResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsSimulateEvictionOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsRunCommandOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the list operation. - */ -export type VirtualMachineScaleSetVMRunCommandsListResponse = VirtualMachineRunCommandsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the runCommand operation. */ +export type VirtualMachineScaleSetVMsRunCommandResponse = RunCommandResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommandsListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMsListNextOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. Allowed values are 'instanceView'. */ + expand?: string; + /** The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'. */ + filter?: string; + /** The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. */ + select?: string; +} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type VirtualMachineScaleSetVMRunCommandsBeginCreateOrUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type VirtualMachineScaleSetVMsListNextResponse = VirtualMachineScaleSetVMListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface LogAnalyticsExportRequestRateByIntervalOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type VirtualMachineScaleSetVMRunCommandsBeginUpdateResponse = VirtualMachineRunCommand & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the exportRequestRateByInterval operation. */ +export type LogAnalyticsExportRequestRateByIntervalResponse = LogAnalyticsOperationResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommand; - }; -}; +/** Optional parameters. */ +export interface LogAnalyticsExportThrottledRequestsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type VirtualMachineScaleSetVMRunCommandsListNextResponse = VirtualMachineRunCommandsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the exportThrottledRequests operation. */ +export type LogAnalyticsExportThrottledRequestsResponse = LogAnalyticsOperationResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: VirtualMachineRunCommandsListResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type ResourceSkusListResponse = ResourceSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineRunCommandsListResponse = RunCommandListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ResourceSkusResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type ResourceSkusListNextResponse = ResourceSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VirtualMachineRunCommandsGetResponse = RunCommandDocument; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ResourceSkusResult; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type DisksCreateOrUpdateResponse = Disk & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Disk; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the update operation. - */ -export type DisksUpdateResponse = Disk & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type VirtualMachineRunCommandsUpdateResponse = VirtualMachineRunCommand; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Disk; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type DisksGetResponse = Disk & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsGetByVirtualMachineOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Disk; - }; -}; +/** Contains response data for the getByVirtualMachine operation. */ +export type VirtualMachineRunCommandsGetByVirtualMachineResponse = VirtualMachineRunCommand; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type DisksListByResourceGroupResponse = DiskList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsListByVirtualMachineOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskList; - }; -}; +/** Contains response data for the listByVirtualMachine operation. */ +export type VirtualMachineRunCommandsListByVirtualMachineResponse = VirtualMachineRunCommandsListResult; -/** - * Contains response data for the list operation. - */ -export type DisksListResponse = DiskList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskList; - }; -}; +/** Contains response data for the listNext operation. */ +export type VirtualMachineRunCommandsListNextResponse = RunCommandListResult; -/** - * Contains response data for the grantAccess operation. - */ -export type DisksGrantAccessResponse = AccessUri & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: AccessUri; - }; -}; +/** Contains response data for the listByVirtualMachineNext operation. */ +export type VirtualMachineRunCommandsListByVirtualMachineNextResponse = VirtualMachineRunCommandsListResult; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DisksBeginCreateOrUpdateResponse = Disk & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Disk; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse = VirtualMachineRunCommand; -/** - * Contains response data for the beginUpdate operation. - */ -export type DisksBeginUpdateResponse = Disk & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Disk; - }; -}; +/** Contains response data for the update operation. */ +export type VirtualMachineScaleSetVMRunCommandsUpdateResponse = VirtualMachineRunCommand; -/** - * Contains response data for the beginGrantAccess operation. - */ -export type DisksBeginGrantAccessResponse = AccessUri & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: AccessUri; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMRunCommandsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type DisksListByResourceGroupNextResponse = DiskList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type VirtualMachineScaleSetVMRunCommandsGetResponse = VirtualMachineRunCommand; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskList; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMRunCommandsListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type DisksListNextResponse = DiskList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type VirtualMachineScaleSetVMRunCommandsListResponse = VirtualMachineRunCommandsListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskList; - }; -}; +/** Optional parameters. */ +export interface VirtualMachineScaleSetVMRunCommandsListNextOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type SnapshotsCreateOrUpdateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type VirtualMachineScaleSetVMRunCommandsListNextResponse = VirtualMachineRunCommandsListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Optional parameters. */ +export interface ResourceSkusListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. Only **location** filter is supported currently. */ + filter?: string; +} -/** - * Contains response data for the update operation. - */ -export type SnapshotsUpdateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type ResourceSkusListResponse = ResourceSkusResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Optional parameters. */ +export interface ResourceSkusListNextOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. Only **location** filter is supported currently. */ + filter?: string; +} -/** - * Contains response data for the get operation. - */ -export type SnapshotsGetResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type ResourceSkusListNextResponse = ResourceSkusResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Optional parameters. */ +export interface DisksCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByResourceGroup operation. - */ -export type SnapshotsListByResourceGroupResponse = SnapshotList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type DisksCreateOrUpdateResponse = Disk; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotList; - }; -}; +/** Optional parameters. */ +export interface DisksUpdateOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the list operation. - */ -export type SnapshotsListResponse = SnapshotList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type DisksUpdateResponse = Disk; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotList; - }; -}; +/** Optional parameters. */ +export interface DisksGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the grantAccess operation. - */ -export type SnapshotsGrantAccessResponse = AccessUri & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type DisksGetResponse = Disk; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AccessUri; - }; -}; +/** Optional parameters. */ +export interface DisksDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type SnapshotsBeginCreateOrUpdateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DisksListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type DisksListByResourceGroupResponse = DiskList; -/** - * Contains response data for the beginUpdate operation. - */ -export type SnapshotsBeginUpdateResponse = Snapshot & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DisksListOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Snapshot; - }; -}; +/** Contains response data for the list operation. */ +export type DisksListResponse = DiskList; -/** - * Contains response data for the beginGrantAccess operation. - */ -export type SnapshotsBeginGrantAccessResponse = AccessUri & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DisksGrantAccessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: AccessUri; - }; -}; +/** Contains response data for the grantAccess operation. */ +export type DisksGrantAccessResponse = AccessUri; -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type SnapshotsListByResourceGroupNextResponse = SnapshotList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DisksRevokeAccessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotList; - }; -}; +/** Optional parameters. */ +export interface DisksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type SnapshotsListNextResponse = SnapshotList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroupNext operation. */ +export type DisksListByResourceGroupNextResponse = DiskList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SnapshotList; - }; -}; +/** Optional parameters. */ +export interface DisksListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type DiskEncryptionSetsCreateOrUpdateResponse = DiskEncryptionSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type DisksListNextResponse = DiskList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSet; - }; -}; +/** Optional parameters. */ +export interface SnapshotsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the update operation. - */ -export type DiskEncryptionSetsUpdateResponse = DiskEncryptionSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type SnapshotsCreateOrUpdateResponse = Snapshot; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSet; - }; -}; +/** Optional parameters. */ +export interface SnapshotsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type DiskEncryptionSetsGetResponse = DiskEncryptionSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type SnapshotsUpdateResponse = Snapshot; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSet; - }; -}; +/** Optional parameters. */ +export interface SnapshotsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroup operation. - */ -export type DiskEncryptionSetsListByResourceGroupResponse = DiskEncryptionSetList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type SnapshotsGetResponse = Snapshot; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSetList; - }; -}; +/** Optional parameters. */ +export interface SnapshotsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the list operation. - */ -export type DiskEncryptionSetsListResponse = DiskEncryptionSetList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SnapshotsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSetList; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type SnapshotsListByResourceGroupResponse = SnapshotList; -/** - * Contains response data for the listAssociatedResources operation. - */ -export type DiskEncryptionSetsListAssociatedResourcesResponse = ResourceUriList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SnapshotsListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ResourceUriList; - }; -}; +/** Contains response data for the list operation. */ +export type SnapshotsListResponse = SnapshotList; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DiskEncryptionSetsBeginCreateOrUpdateResponse = DiskEncryptionSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SnapshotsGrantAccessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSet; - }; -}; +/** Contains response data for the grantAccess operation. */ +export type SnapshotsGrantAccessResponse = AccessUri; -/** - * Contains response data for the beginUpdate operation. - */ -export type DiskEncryptionSetsBeginUpdateResponse = DiskEncryptionSet & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SnapshotsRevokeAccessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSet; - }; -}; +/** Optional parameters. */ +export interface SnapshotsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type DiskEncryptionSetsListByResourceGroupNextResponse = DiskEncryptionSetList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroupNext operation. */ +export type SnapshotsListByResourceGroupNextResponse = SnapshotList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSetList; - }; -}; +/** Optional parameters. */ +export interface SnapshotsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type DiskEncryptionSetsListNextResponse = DiskEncryptionSetList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type SnapshotsListNextResponse = SnapshotList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskEncryptionSetList; - }; -}; +/** Optional parameters. */ +export interface DiskEncryptionSetsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listAssociatedResourcesNext operation. - */ -export type DiskEncryptionSetsListAssociatedResourcesNextResponse = ResourceUriList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type DiskEncryptionSetsCreateOrUpdateResponse = DiskEncryptionSet; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ResourceUriList; - }; -}; +/** Optional parameters. */ +export interface DiskEncryptionSetsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type DiskAccessesCreateOrUpdateResponse = DiskAccess & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type DiskEncryptionSetsUpdateResponse = DiskEncryptionSet; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccess; - }; -}; +/** Optional parameters. */ +export interface DiskEncryptionSetsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type DiskAccessesUpdateResponse = DiskAccess & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type DiskEncryptionSetsGetResponse = DiskEncryptionSet; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccess; - }; -}; +/** Optional parameters. */ +export interface DiskEncryptionSetsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type DiskAccessesGetResponse = DiskAccess & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskEncryptionSetsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccess; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type DiskEncryptionSetsListByResourceGroupResponse = DiskEncryptionSetList; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type DiskAccessesListByResourceGroupResponse = DiskAccessList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskEncryptionSetsListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccessList; - }; -}; +/** Contains response data for the list operation. */ +export type DiskEncryptionSetsListResponse = DiskEncryptionSetList; -/** - * Contains response data for the list operation. - */ -export type DiskAccessesListResponse = DiskAccessList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskEncryptionSetsListAssociatedResourcesOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccessList; - }; -}; +/** Contains response data for the listAssociatedResources operation. */ +export type DiskEncryptionSetsListAssociatedResourcesResponse = ResourceUriList; -/** - * Contains response data for the getPrivateLinkResources operation. - */ -export type DiskAccessesGetPrivateLinkResourcesResponse = PrivateLinkResourceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskEncryptionSetsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateLinkResourceListResult; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type DiskEncryptionSetsListByResourceGroupNextResponse = DiskEncryptionSetList; -/** - * Contains response data for the updateAPrivateEndpointConnection operation. - */ -export type DiskAccessesUpdateAPrivateEndpointConnectionResponse = PrivateEndpointConnection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskEncryptionSetsListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateEndpointConnection; - }; -}; +/** Contains response data for the listNext operation. */ +export type DiskEncryptionSetsListNextResponse = DiskEncryptionSetList; -/** - * Contains response data for the getAPrivateEndpointConnection operation. - */ -export type DiskAccessesGetAPrivateEndpointConnectionResponse = PrivateEndpointConnection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskEncryptionSetsListAssociatedResourcesNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateEndpointConnection; - }; -}; +/** Contains response data for the listAssociatedResourcesNext operation. */ +export type DiskEncryptionSetsListAssociatedResourcesNextResponse = ResourceUriList; -/** - * Contains response data for the listPrivateEndpointConnections operation. - */ -export type DiskAccessesListPrivateEndpointConnectionsResponse = PrivateEndpointConnectionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateEndpointConnectionListResult; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type DiskAccessesCreateOrUpdateResponse = DiskAccess; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DiskAccessesBeginCreateOrUpdateResponse = DiskAccess & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccess; - }; -}; +/** Contains response data for the update operation. */ +export type DiskAccessesUpdateResponse = DiskAccess; -/** - * Contains response data for the beginUpdate operation. - */ -export type DiskAccessesBeginUpdateResponse = DiskAccess & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccess; - }; -}; +/** Contains response data for the get operation. */ +export type DiskAccessesGetResponse = DiskAccess; -/** - * Contains response data for the beginUpdateAPrivateEndpointConnection operation. - */ -export type DiskAccessesBeginUpdateAPrivateEndpointConnectionResponse = PrivateEndpointConnection & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateEndpointConnection; - }; -}; +/** Optional parameters. */ +export interface DiskAccessesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type DiskAccessesListByResourceGroupNextResponse = DiskAccessList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroup operation. */ +export type DiskAccessesListByResourceGroupResponse = DiskAccessList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccessList; - }; -}; +/** Optional parameters. */ +export interface DiskAccessesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listNext operation. - */ -export type DiskAccessesListNextResponse = DiskAccessList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type DiskAccessesListResponse = DiskAccessList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskAccessList; - }; -}; +/** Optional parameters. */ +export interface DiskAccessesGetPrivateLinkResourcesOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listPrivateEndpointConnectionsNext operation. - */ -export type DiskAccessesListPrivateEndpointConnectionsNextResponse = PrivateEndpointConnectionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getPrivateLinkResources operation. */ +export type DiskAccessesGetPrivateLinkResourcesResponse = PrivateLinkResourceListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PrivateEndpointConnectionListResult; - }; -}; +/** Optional parameters. */ +export interface DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type DiskRestorePointGetResponse = DiskRestorePoint & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the updateAPrivateEndpointConnection operation. */ +export type DiskAccessesUpdateAPrivateEndpointConnectionResponse = PrivateEndpointConnection; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskRestorePoint; - }; -}; +/** Optional parameters. */ +export interface DiskAccessesGetAPrivateEndpointConnectionOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByRestorePoint operation. - */ -export type DiskRestorePointListByRestorePointResponse = DiskRestorePointList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getAPrivateEndpointConnection operation. */ +export type DiskAccessesGetAPrivateEndpointConnectionResponse = PrivateEndpointConnection; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskRestorePointList; - }; -}; +/** Optional parameters. */ +export interface DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByRestorePointNext operation. - */ -export type DiskRestorePointListByRestorePointNextResponse = DiskRestorePointList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesListPrivateEndpointConnectionsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DiskRestorePointList; - }; -}; +/** Contains response data for the listPrivateEndpointConnections operation. */ +export type DiskAccessesListPrivateEndpointConnectionsResponse = PrivateEndpointConnectionListResult; -/** - * Contains response data for the createOrUpdate operation. - */ -export type GalleriesCreateOrUpdateResponse = Gallery & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Gallery; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type DiskAccessesListByResourceGroupNextResponse = DiskAccessList; -/** - * Contains response data for the update operation. - */ -export type GalleriesUpdateResponse = Gallery & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Gallery; - }; -}; +/** Contains response data for the listNext operation. */ +export type DiskAccessesListNextResponse = DiskAccessList; -/** - * Contains response data for the get operation. - */ -export type GalleriesGetResponse = Gallery & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskAccessesListPrivateEndpointConnectionsNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Gallery; - }; -}; +/** Contains response data for the listPrivateEndpointConnectionsNext operation. */ +export type DiskAccessesListPrivateEndpointConnectionsNextResponse = PrivateEndpointConnectionListResult; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type GalleriesListByResourceGroupResponse = GalleryList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskRestorePointOperationsGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryList; - }; -}; +/** Contains response data for the get operation. */ +export type DiskRestorePointOperationsGetResponse = DiskRestorePoint; -/** - * Contains response data for the list operation. - */ -export type GalleriesListResponse = GalleryList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskRestorePointOperationsListByRestorePointOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryList; - }; -}; +/** Contains response data for the listByRestorePoint operation. */ +export type DiskRestorePointOperationsListByRestorePointResponse = DiskRestorePointList; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type GalleriesBeginCreateOrUpdateResponse = Gallery & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskRestorePointOperationsGrantAccessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Gallery; - }; -}; +/** Contains response data for the grantAccess operation. */ +export type DiskRestorePointOperationsGrantAccessResponse = AccessUri; -/** - * Contains response data for the beginUpdate operation. - */ -export type GalleriesBeginUpdateResponse = Gallery & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DiskRestorePointOperationsRevokeAccessOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Gallery; - }; -}; +/** Optional parameters. */ +export interface DiskRestorePointOperationsListByRestorePointNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type GalleriesListByResourceGroupNextResponse = GalleryList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByRestorePointNext operation. */ +export type DiskRestorePointOperationsListByRestorePointNextResponse = DiskRestorePointList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryList; - }; -}; +/** Optional parameters. */ +export interface GalleriesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type GalleriesListNextResponse = GalleryList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type GalleriesCreateOrUpdateResponse = Gallery; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryList; - }; -}; +/** Optional parameters. */ +export interface GalleriesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type GalleryImagesCreateOrUpdateResponse = GalleryImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type GalleriesUpdateResponse = Gallery; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImage; - }; -}; +/** Optional parameters. */ +export interface GalleriesGetOptionalParams + extends coreClient.OperationOptions { + /** The select expression to apply on the operation. */ + select?: SelectPermissions; +} -/** - * Contains response data for the update operation. - */ -export type GalleryImagesUpdateResponse = GalleryImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type GalleriesGetResponse = Gallery; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImage; - }; -}; +/** Optional parameters. */ +export interface GalleriesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type GalleryImagesGetResponse = GalleryImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleriesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImage; - }; -}; +/** Contains response data for the listByResourceGroup operation. */ +export type GalleriesListByResourceGroupResponse = GalleryList; -/** - * Contains response data for the listByGallery operation. - */ -export type GalleryImagesListByGalleryResponse = GalleryImageList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleriesListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageList; - }; -}; +/** Contains response data for the list operation. */ +export type GalleriesListResponse = GalleryList; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type GalleryImagesBeginCreateOrUpdateResponse = GalleryImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleriesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImage; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type GalleriesListByResourceGroupNextResponse = GalleryList; -/** - * Contains response data for the beginUpdate operation. - */ -export type GalleryImagesBeginUpdateResponse = GalleryImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleriesListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImage; - }; -}; +/** Contains response data for the listNext operation. */ +export type GalleriesListNextResponse = GalleryList; -/** - * Contains response data for the listByGalleryNext operation. - */ -export type GalleryImagesListByGalleryNextResponse = GalleryImageList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryImagesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageList; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type GalleryImagesCreateOrUpdateResponse = GalleryImage; -/** - * Contains response data for the createOrUpdate operation. - */ -export type GalleryImageVersionsCreateOrUpdateResponse = GalleryImageVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryImagesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersion; - }; -}; +/** Contains response data for the update operation. */ +export type GalleryImagesUpdateResponse = GalleryImage; -/** - * Contains response data for the update operation. - */ -export type GalleryImageVersionsUpdateResponse = GalleryImageVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryImagesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersion; - }; -}; +/** Contains response data for the get operation. */ +export type GalleryImagesGetResponse = GalleryImage; -/** - * Contains response data for the get operation. - */ -export type GalleryImageVersionsGetResponse = GalleryImageVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryImagesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryImagesListByGalleryOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByGalleryImage operation. - */ -export type GalleryImageVersionsListByGalleryImageResponse = GalleryImageVersionList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByGallery operation. */ +export type GalleryImagesListByGalleryResponse = GalleryImageList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersionList; - }; -}; +/** Optional parameters. */ +export interface GalleryImagesListByGalleryNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type GalleryImageVersionsBeginCreateOrUpdateResponse = GalleryImageVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByGalleryNext operation. */ +export type GalleryImagesListByGalleryNextResponse = GalleryImageList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryImageVersionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type GalleryImageVersionsBeginUpdateResponse = GalleryImageVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type GalleryImageVersionsCreateOrUpdateResponse = GalleryImageVersion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryImageVersionsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByGalleryImageNext operation. - */ -export type GalleryImageVersionsListByGalleryImageNextResponse = GalleryImageVersionList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type GalleryImageVersionsUpdateResponse = GalleryImageVersion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryImageVersionList; - }; -}; +/** Optional parameters. */ +export interface GalleryImageVersionsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: ReplicationStatusTypes; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type GalleryApplicationsCreateOrUpdateResponse = GalleryApplication & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type GalleryImageVersionsGetResponse = GalleryImageVersion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplication; - }; -}; +/** Optional parameters. */ +export interface GalleryImageVersionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the update operation. - */ -export type GalleryApplicationsUpdateResponse = GalleryApplication & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryImageVersionsListByGalleryImageOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplication; - }; -}; +/** Contains response data for the listByGalleryImage operation. */ +export type GalleryImageVersionsListByGalleryImageResponse = GalleryImageVersionList; -/** - * Contains response data for the get operation. - */ -export type GalleryApplicationsGetResponse = GalleryApplication & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryImageVersionsListByGalleryImageNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplication; - }; -}; +/** Contains response data for the listByGalleryImageNext operation. */ +export type GalleryImageVersionsListByGalleryImageNextResponse = GalleryImageVersionList; -/** - * Contains response data for the listByGallery operation. - */ -export type GalleryApplicationsListByGalleryResponse = GalleryApplicationList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryApplicationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationList; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type GalleryApplicationsCreateOrUpdateResponse = GalleryApplication; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type GalleryApplicationsBeginCreateOrUpdateResponse = GalleryApplication & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryApplicationsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplication; - }; -}; +/** Contains response data for the update operation. */ +export type GalleryApplicationsUpdateResponse = GalleryApplication; -/** - * Contains response data for the beginUpdate operation. - */ -export type GalleryApplicationsBeginUpdateResponse = GalleryApplication & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryApplicationsGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplication; - }; -}; +/** Contains response data for the get operation. */ +export type GalleryApplicationsGetResponse = GalleryApplication; -/** - * Contains response data for the listByGalleryNext operation. - */ -export type GalleryApplicationsListByGalleryNextResponse = GalleryApplicationList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryApplicationsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationList; - }; -}; +/** Optional parameters. */ +export interface GalleryApplicationsListByGalleryOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type GalleryApplicationVersionsCreateOrUpdateResponse = GalleryApplicationVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByGallery operation. */ +export type GalleryApplicationsListByGalleryResponse = GalleryApplicationList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryApplicationsListByGalleryNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the update operation. - */ -export type GalleryApplicationVersionsUpdateResponse = GalleryApplicationVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByGalleryNext operation. */ +export type GalleryApplicationsListByGalleryNextResponse = GalleryApplicationList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryApplicationVersionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type GalleryApplicationVersionsGetResponse = GalleryApplicationVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type GalleryApplicationVersionsCreateOrUpdateResponse = GalleryApplicationVersion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryApplicationVersionsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByGalleryApplication operation. - */ -export type GalleryApplicationVersionsListByGalleryApplicationResponse = GalleryApplicationVersionList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the update operation. */ +export type GalleryApplicationVersionsUpdateResponse = GalleryApplicationVersion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersionList; - }; -}; +/** Optional parameters. */ +export interface GalleryApplicationVersionsGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply on the operation. */ + expand?: ReplicationStatusTypes; +} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type GalleryApplicationVersionsBeginCreateOrUpdateResponse = GalleryApplicationVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type GalleryApplicationVersionsGetResponse = GalleryApplicationVersion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersion; - }; -}; +/** Optional parameters. */ +export interface GalleryApplicationVersionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type GalleryApplicationVersionsBeginUpdateResponse = GalleryApplicationVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryApplicationVersionsListByGalleryApplicationOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersion; - }; -}; +/** Contains response data for the listByGalleryApplication operation. */ +export type GalleryApplicationVersionsListByGalleryApplicationResponse = GalleryApplicationVersionList; -/** - * Contains response data for the listByGalleryApplicationNext operation. - */ -export type GalleryApplicationVersionsListByGalleryApplicationNextResponse = GalleryApplicationVersionList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GalleryApplicationVersionsListByGalleryApplicationNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: GalleryApplicationVersionList; - }; -}; +/** Contains response data for the listByGalleryApplicationNext operation. */ +export type GalleryApplicationVersionsListByGalleryApplicationNextResponse = GalleryApplicationVersionList; -/** - * Contains response data for the update operation. - */ -export type GallerySharingProfileUpdateResponse = SharingUpdate & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface GallerySharingProfileUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharingUpdate; - }; -}; +/** Contains response data for the update operation. */ +export type GallerySharingProfileUpdateResponse = SharingUpdate; -/** - * Contains response data for the beginUpdate operation. - */ -export type GallerySharingProfileBeginUpdateResponse = SharingUpdate & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleriesListOptionalParams + extends coreClient.OperationOptions { + /** The query parameter to decide what shared galleries to fetch when doing listing operations. */ + sharedTo?: SharedToValues; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharingUpdate; - }; -}; +/** Contains response data for the list operation. */ +export type SharedGalleriesListResponse = SharedGalleryList; -/** - * Contains response data for the list operation. - */ -export type SharedGalleriesListResponse = SharedGalleryList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleriesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SharedGalleriesGetResponse = SharedGallery; + +/** Optional parameters. */ +export interface SharedGalleriesListNextOptionalParams + extends coreClient.OperationOptions { + /** The query parameter to decide what shared galleries to fetch when doing listing operations. */ + sharedTo?: SharedToValues; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryList; - }; -}; +/** Contains response data for the listNext operation. */ +export type SharedGalleriesListNextResponse = SharedGalleryList; -/** - * Contains response data for the get operation. - */ -export type SharedGalleriesGetResponse = SharedGallery & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleryImagesListOptionalParams + extends coreClient.OperationOptions { + /** The query parameter to decide what shared galleries to fetch when doing listing operations. */ + sharedTo?: SharedToValues; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGallery; - }; -}; +/** Contains response data for the list operation. */ +export type SharedGalleryImagesListResponse = SharedGalleryImageList; -/** - * Contains response data for the listNext operation. - */ -export type SharedGalleriesListNextResponse = SharedGalleryList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleryImagesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryList; - }; -}; +/** Contains response data for the get operation. */ +export type SharedGalleryImagesGetResponse = SharedGalleryImage; -/** - * Contains response data for the list operation. - */ -export type SharedGalleryImagesListResponse = SharedGalleryImageList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleryImagesListNextOptionalParams + extends coreClient.OperationOptions { + /** The query parameter to decide what shared galleries to fetch when doing listing operations. */ + sharedTo?: SharedToValues; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryImageList; - }; -}; +/** Contains response data for the listNext operation. */ +export type SharedGalleryImagesListNextResponse = SharedGalleryImageList; -/** - * Contains response data for the get operation. - */ -export type SharedGalleryImagesGetResponse = SharedGalleryImage & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleryImageVersionsListOptionalParams + extends coreClient.OperationOptions { + /** The query parameter to decide what shared galleries to fetch when doing listing operations. */ + sharedTo?: SharedToValues; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryImage; - }; -}; +/** Contains response data for the list operation. */ +export type SharedGalleryImageVersionsListResponse = SharedGalleryImageVersionList; -/** - * Contains response data for the listNext operation. - */ -export type SharedGalleryImagesListNextResponse = SharedGalleryImageList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleryImageVersionsGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryImageList; - }; -}; +/** Contains response data for the get operation. */ +export type SharedGalleryImageVersionsGetResponse = SharedGalleryImageVersion; -/** - * Contains response data for the list operation. - */ -export type SharedGalleryImageVersionsListResponse = SharedGalleryImageVersionList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface SharedGalleryImageVersionsListNextOptionalParams + extends coreClient.OperationOptions { + /** The query parameter to decide what shared galleries to fetch when doing listing operations. */ + sharedTo?: SharedToValues; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryImageVersionList; - }; -}; +/** Contains response data for the listNext operation. */ +export type SharedGalleryImageVersionsListNextResponse = SharedGalleryImageVersionList; -/** - * Contains response data for the get operation. - */ -export type SharedGalleryImageVersionsGetResponse = SharedGalleryImageVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryImageVersion; - }; -}; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesGetOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. 'UserData' is not supported for cloud services. */ + expand?: InstanceViewTypes; +} -/** - * Contains response data for the listNext operation. - */ -export type SharedGalleryImageVersionsListNextResponse = SharedGalleryImageVersionList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type CloudServiceRoleInstancesGetResponse = RoleInstance; - /** - * The response body as parsed JSON or XML - */ - parsedBody: SharedGalleryImageVersionList; - }; -}; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesGetInstanceViewOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type CloudServiceRoleInstancesGetResponse = RoleInstance & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getInstanceView operation. */ +export type CloudServiceRoleInstancesGetInstanceViewResponse = RoleInstanceView; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleInstance; - }; -}; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesListOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. 'UserData' is not supported for cloud services. */ + expand?: InstanceViewTypes; +} -/** - * Contains response data for the getInstanceView operation. - */ -export type CloudServiceRoleInstancesGetInstanceViewResponse = RoleInstanceInstanceView & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type CloudServiceRoleInstancesListResponse = RoleInstanceListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleInstanceInstanceView; - }; -}; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesRestartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the list operation. - */ -export type CloudServiceRoleInstancesListResponse = RoleInstanceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesReimageOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleInstanceListResult; - }; -}; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesRebuildOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the getRemoteDesktopFile operation. - */ +/** Optional parameters. */ +export interface CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getRemoteDesktopFile operation. */ export type CloudServiceRoleInstancesGetRemoteDesktopFileResponse = { /** * BROWSER ONLY * * The response body as a browser Blob. - * Always undefined in node.js. + * Always `undefined` in node.js. */ blobBody?: Promise; - /** * NODEJS ONLY * * The response body as a node.js Readable stream. - * Always undefined in the browser. + * Always `undefined` in the browser. */ readableStreamBody?: NodeJS.ReadableStream; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse; }; -/** - * Contains response data for the listNext operation. - */ -export type CloudServiceRoleInstancesListNextResponse = RoleInstanceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceRoleInstancesListNextOptionalParams + extends coreClient.OperationOptions { + /** The expand expression to apply to the operation. 'UserData' is not supported for cloud services. */ + expand?: InstanceViewTypes; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleInstanceListResult; - }; -}; +/** Contains response data for the listNext operation. */ +export type CloudServiceRoleInstancesListNextResponse = RoleInstanceListResult; -/** - * Contains response data for the get operation. - */ -export type CloudServiceRolesGetResponse = CloudServiceRole & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceRolesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceRole; - }; -}; +/** Contains response data for the get operation. */ +export type CloudServiceRolesGetResponse = CloudServiceRole; -/** - * Contains response data for the list operation. - */ -export type CloudServiceRolesListResponse = CloudServiceRoleListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceRolesListOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceRoleListResult; - }; -}; +/** Contains response data for the list operation. */ +export type CloudServiceRolesListResponse = CloudServiceRoleListResult; -/** - * Contains response data for the listNext operation. - */ -export type CloudServiceRolesListNextResponse = CloudServiceRoleListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceRolesListNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceRoleListResult; - }; -}; +/** Contains response data for the listNext operation. */ +export type CloudServiceRolesListNextResponse = CloudServiceRoleListResult; -/** - * Contains response data for the createOrUpdate operation. - */ -export type CloudServicesCreateOrUpdateResponse = CloudService & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** The cloud service object. */ + parameters?: CloudService; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudService; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type CloudServicesCreateOrUpdateResponse = CloudService; -/** - * Contains response data for the update operation. - */ -export type CloudServicesUpdateResponse = CloudService & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesUpdateOptionalParams + extends coreClient.OperationOptions { + /** The cloud service object. */ + parameters?: CloudServiceUpdate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudService; - }; -}; +/** Contains response data for the update operation. */ +export type CloudServicesUpdateResponse = CloudService; -/** - * Contains response data for the get operation. - */ -export type CloudServicesGetResponse = CloudService & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudService; - }; -}; +/** Optional parameters. */ +export interface CloudServicesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getInstanceView operation. - */ -export type CloudServicesGetInstanceViewResponse = CloudServiceInstanceView & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type CloudServicesGetResponse = CloudService; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceInstanceView; - }; -}; +/** Optional parameters. */ +export interface CloudServicesGetInstanceViewOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listAll operation. - */ -export type CloudServicesListAllResponse = CloudServiceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getInstanceView operation. */ +export type CloudServicesGetInstanceViewResponse = CloudServiceInstanceView; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceListResult; - }; -}; +/** Optional parameters. */ +export interface CloudServicesListAllOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the list operation. - */ -export type CloudServicesListResponse = CloudServiceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAll operation. */ +export type CloudServicesListAllResponse = CloudServiceListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceListResult; - }; -}; +/** Optional parameters. */ +export interface CloudServicesListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type CloudServicesBeginCreateOrUpdateResponse = CloudService & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type CloudServicesListResponse = CloudServiceListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudService; - }; -}; +/** Optional parameters. */ +export interface CloudServicesStartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the beginUpdate operation. - */ -export type CloudServicesBeginUpdateResponse = CloudService & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesPowerOffOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudService; - }; -}; +/** Optional parameters. */ +export interface CloudServicesRestartOptionalParams + extends coreClient.OperationOptions { + /** List of cloud service role instance names. */ + parameters?: RoleInstances; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listAllNext operation. - */ -export type CloudServicesListAllNextResponse = CloudServiceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesReimageOptionalParams + extends coreClient.OperationOptions { + /** List of cloud service role instance names. */ + parameters?: RoleInstances; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceListResult; - }; -}; +/** Optional parameters. */ +export interface CloudServicesRebuildOptionalParams + extends coreClient.OperationOptions { + /** List of cloud service role instance names. */ + parameters?: RoleInstances; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listNext operation. - */ -export type CloudServicesListNextResponse = CloudServiceListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesDeleteInstancesOptionalParams + extends coreClient.OperationOptions { + /** List of cloud service role instance names. */ + parameters?: RoleInstances; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: CloudServiceListResult; - }; -}; +/** Optional parameters. */ +export interface CloudServicesListAllNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the getUpdateDomain operation. - */ -export type CloudServicesUpdateDomainGetUpdateDomainResponse = UpdateDomain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listAllNext operation. */ +export type CloudServicesListAllNextResponse = CloudServiceListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UpdateDomain; - }; -}; +/** Optional parameters. */ +export interface CloudServicesListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listUpdateDomains operation. - */ -export type CloudServicesUpdateDomainListUpdateDomainsResponse = UpdateDomainListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type CloudServicesListNextResponse = CloudServiceListResult; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UpdateDomainListResult; - }; -}; +/** Optional parameters. */ +export interface CloudServicesUpdateDomainWalkUpdateDomainOptionalParams + extends coreClient.OperationOptions { + /** The update domain object. */ + parameters?: UpdateDomain; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listUpdateDomainsNext operation. - */ -export type CloudServicesUpdateDomainListUpdateDomainsNextResponse = UpdateDomainListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesUpdateDomainGetUpdateDomainOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: UpdateDomainListResult; - }; -}; +/** Contains response data for the getUpdateDomain operation. */ +export type CloudServicesUpdateDomainGetUpdateDomainResponse = UpdateDomain; -/** - * Contains response data for the getOSVersion operation. - */ -export type CloudServiceOperatingSystemsGetOSVersionResponse = OSVersion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesUpdateDomainListUpdateDomainsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OSVersion; - }; -}; +/** Contains response data for the listUpdateDomains operation. */ +export type CloudServicesUpdateDomainListUpdateDomainsResponse = UpdateDomainListResult; -/** - * Contains response data for the listOSVersions operation. - */ -export type CloudServiceOperatingSystemsListOSVersionsResponse = OSVersionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServicesUpdateDomainListUpdateDomainsNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OSVersionListResult; - }; -}; +/** Contains response data for the listUpdateDomainsNext operation. */ +export type CloudServicesUpdateDomainListUpdateDomainsNextResponse = UpdateDomainListResult; -/** - * Contains response data for the getOSFamily operation. - */ -export type CloudServiceOperatingSystemsGetOSFamilyResponse = OSFamily & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceOperatingSystemsGetOSVersionOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OSFamily; - }; -}; +/** Contains response data for the getOSVersion operation. */ +export type CloudServiceOperatingSystemsGetOSVersionResponse = OSVersion; -/** - * Contains response data for the listOSFamilies operation. - */ -export type CloudServiceOperatingSystemsListOSFamiliesResponse = OSFamilyListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceOperatingSystemsListOSVersionsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OSFamilyListResult; - }; -}; +/** Contains response data for the listOSVersions operation. */ +export type CloudServiceOperatingSystemsListOSVersionsResponse = OSVersionListResult; -/** - * Contains response data for the listOSVersionsNext operation. - */ -export type CloudServiceOperatingSystemsListOSVersionsNextResponse = OSVersionListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceOperatingSystemsGetOSFamilyOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OSVersionListResult; - }; -}; +/** Contains response data for the getOSFamily operation. */ +export type CloudServiceOperatingSystemsGetOSFamilyResponse = OSFamily; -/** - * Contains response data for the listOSFamiliesNext operation. - */ -export type CloudServiceOperatingSystemsListOSFamiliesNextResponse = OSFamilyListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface CloudServiceOperatingSystemsListOSFamiliesOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OSFamilyListResult; - }; -}; +/** Contains response data for the listOSFamilies operation. */ +export type CloudServiceOperatingSystemsListOSFamiliesResponse = OSFamilyListResult; + +/** Optional parameters. */ +export interface CloudServiceOperatingSystemsListOSVersionsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOSVersionsNext operation. */ +export type CloudServiceOperatingSystemsListOSVersionsNextResponse = OSVersionListResult; + +/** Optional parameters. */ +export interface CloudServiceOperatingSystemsListOSFamiliesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOSFamiliesNext operation. */ +export type CloudServiceOperatingSystemsListOSFamiliesNextResponse = OSFamilyListResult; + +/** Optional parameters. */ +export interface ComputeManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/compute/arm-compute/src/models/logAnalyticsMappers.ts b/sdk/compute/arm-compute/src/models/logAnalyticsMappers.ts deleted file mode 100644 index 6566a5c184ee..000000000000 --- a/sdk/compute/arm-compute/src/models/logAnalyticsMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 { - CloudError, - LogAnalyticsInputBase, - LogAnalyticsOperationResult, - LogAnalyticsOutput, - RequestRateByIntervalInput, - ThrottledRequestsInput -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/mappers.ts b/sdk/compute/arm-compute/src/models/mappers.ts index aa0d889ebce5..9ab9eadbae40 100644 --- a/sdk/compute/arm-compute/src/models/mappers.ts +++ b/sdk/compute/arm-compute/src/models/mappers.ts @@ -6,27 +6,73 @@ * 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 ComputeOperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeOperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComputeOperationValue" + } + } + } + } + } + } +}; -export const RestorePointCollectionSourceProperties: msRest.CompositeMapper = { - serializedName: "RestorePointCollectionSourceProperties", +export const ComputeOperationValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointCollectionSourceProperties", + className: "ComputeOperationValue", modelProperties: { - location: { + origin: { + serializedName: "origin", readOnly: true, - serializedName: "location", type: { name: "String" } }, - id: { - serializedName: "id", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "display.operation", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "display.resource", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "display.description", + readOnly: true, + type: { + name: "String" + } + }, + provider: { + serializedName: "display.provider", + readOnly: true, type: { name: "String" } @@ -35,24 +81,51 @@ export const RestorePointCollectionSourceProperties: msRest.CompositeMapper = { } }; -export const HardwareProfile: msRest.CompositeMapper = { - serializedName: "HardwareProfile", +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HardwareProfile", + className: "Resource", modelProperties: { - vmSize: { - serializedName: "vmSize", + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } }; -export const SubResource: msRest.CompositeMapper = { - serializedName: "SubResource", +export const SubResource: coreClient.CompositeMapper = { type: { name: "Composite", className: "SubResource", @@ -67,263 +140,240 @@ export const SubResource: msRest.CompositeMapper = { } }; -export const KeyVaultSecretReference: msRest.CompositeMapper = { - serializedName: "KeyVaultSecretReference", +export const InstanceViewStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyVaultSecretReference", + className: "InstanceViewStatus", modelProperties: { - secretUrl: { - required: true, - serializedName: "secretUrl", + code: { + serializedName: "code", type: { name: "String" } }, - sourceVault: { - required: true, - serializedName: "sourceVault", + level: { + serializedName: "level", type: { - name: "Composite", - className: "SubResource" + name: "Enum", + allowedValues: ["Info", "Warning", "Error"] } - } - } - } -}; - -export const KeyVaultKeyReference: msRest.CompositeMapper = { - serializedName: "KeyVaultKeyReference", - type: { - name: "Composite", - className: "KeyVaultKeyReference", - modelProperties: { - keyUrl: { - required: true, - serializedName: "keyUrl", + }, + displayStatus: { + serializedName: "displayStatus", type: { name: "String" } }, - sourceVault: { - required: true, - serializedName: "sourceVault", + message: { + serializedName: "message", type: { - name: "Composite", - className: "SubResource" + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "DateTime" } } } } }; -export const DiskEncryptionSettings: msRest.CompositeMapper = { - serializedName: "DiskEncryptionSettings", +export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskEncryptionSettings", + className: "Sku", modelProperties: { - diskEncryptionKey: { - serializedName: "diskEncryptionKey", + name: { + serializedName: "name", type: { - name: "Composite", - className: "KeyVaultSecretReference" + name: "String" } }, - keyEncryptionKey: { - serializedName: "keyEncryptionKey", + tier: { + serializedName: "tier", type: { - name: "Composite", - className: "KeyVaultKeyReference" + name: "String" } }, - enabled: { - serializedName: "enabled", + capacity: { + serializedName: "capacity", type: { - name: "Boolean" + name: "Number" } } } } }; -export const DiskEncryptionSetParameters: msRest.CompositeMapper = { - serializedName: "DiskEncryptionSetParameters", +export const UpdateResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskEncryptionSetParameters", + className: "UpdateResource", modelProperties: { - ...SubResource.type.modelProperties + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } } } }; -export const ManagedDiskParameters: msRest.CompositeMapper = { - serializedName: "ManagedDiskParameters", +export const AvailabilitySetListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedDiskParameters", + className: "AvailabilitySetListResult", modelProperties: { - ...SubResource.type.modelProperties, - storageAccountType: { - serializedName: "storageAccountType", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailabilitySet" + } + } } }, - diskEncryptionSet: { - serializedName: "diskEncryptionSet", + nextLink: { + serializedName: "nextLink", type: { - name: "Composite", - className: "DiskEncryptionSetParameters" + name: "String" } } } } }; -export const ApiEntityReference: msRest.CompositeMapper = { - serializedName: "ApiEntityReference", +export const VirtualMachineSizeListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApiEntityReference", + className: "VirtualMachineSizeListResult", modelProperties: { - id: { - serializedName: "id", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineSize" + } + } } } } } }; -export const RestorePointSourceVMOSDisk: msRest.CompositeMapper = { - serializedName: "RestorePointSourceVMOSDisk", +export const VirtualMachineSize: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointSourceVMOSDisk", + className: "VirtualMachineSize", modelProperties: { - osType: { - serializedName: "osType", + name: { + serializedName: "name", type: { name: "String" } }, - encryptionSettings: { - serializedName: "encryptionSettings", - type: { - name: "Composite", - className: "DiskEncryptionSettings" - } - }, - name: { - serializedName: "name", + numberOfCores: { + serializedName: "numberOfCores", type: { - name: "String" + name: "Number" } }, - caching: { - serializedName: "caching", + osDiskSizeInMB: { + serializedName: "osDiskSizeInMB", type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] + name: "Number" } }, - diskSizeGB: { - serializedName: "diskSizeGB", + resourceDiskSizeInMB: { + serializedName: "resourceDiskSizeInMB", type: { name: "Number" } }, - managedDisk: { - serializedName: "managedDisk", + memoryInMB: { + serializedName: "memoryInMB", type: { - name: "Composite", - className: "ManagedDiskParameters" + name: "Number" } }, - diskRestorePoint: { - serializedName: "diskRestorePoint", + maxDataDiskCount: { + serializedName: "maxDataDiskCount", type: { - name: "Composite", - className: "ApiEntityReference" + name: "Number" } } } } }; -export const RestorePointSourceVMDataDisk: msRest.CompositeMapper = { - serializedName: "RestorePointSourceVMDataDisk", +export const ProximityPlacementGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointSourceVMDataDisk", + className: "ProximityPlacementGroupListResult", modelProperties: { - lun: { - serializedName: "lun", + value: { + serializedName: "value", + required: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProximityPlacementGroup" + } + } } }, - name: { - serializedName: "name", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - caching: { - serializedName: "caching", - type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] - } - }, - diskSizeGB: { - serializedName: "diskSizeGB", - type: { - name: "Number" - } - }, - managedDisk: { - serializedName: "managedDisk", - type: { - name: "Composite", - className: "ManagedDiskParameters" - } - }, - diskRestorePoint: { - serializedName: "diskRestorePoint", - type: { - name: "Composite", - className: "ApiEntityReference" - } } } } }; -export const RestorePointSourceVMStorageProfile: msRest.CompositeMapper = { - serializedName: "RestorePointSourceVMStorageProfile", +export const SubResourceReadOnly: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointSourceVMStorageProfile", + className: "SubResourceReadOnly", modelProperties: { - osDisk: { - serializedName: "osDisk", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Composite", - className: "RestorePointSourceVMOSDisk" + name: "String" } - }, - dataDisks: { - serializedName: "dataDisks", + } + } + } +}; + +export const DedicatedHostGroupInstanceView: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DedicatedHostGroupInstanceView", + modelProperties: { + hosts: { + serializedName: "hosts", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorePointSourceVMDataDisk" + className: "DedicatedHostInstanceViewWithName" } } } @@ -332,184 +382,131 @@ export const RestorePointSourceVMStorageProfile: msRest.CompositeMapper = { } }; -export const AdditionalUnattendContent: msRest.CompositeMapper = { - serializedName: "AdditionalUnattendContent", +export const DedicatedHostInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AdditionalUnattendContent", + className: "DedicatedHostInstanceView", modelProperties: { - passName: { - serializedName: "passName", - type: { - name: "Enum", - allowedValues: ["OobeSystem"] - } - }, - componentName: { - serializedName: "componentName", + assetId: { + serializedName: "assetId", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Microsoft-Windows-Shell-Setup"] + name: "String" } }, - settingName: { - serializedName: "settingName", + availableCapacity: { + serializedName: "availableCapacity", type: { - name: "Enum", - allowedValues: ["AutoLogon", "FirstLogonCommands"] + name: "Composite", + className: "DedicatedHostAvailableCapacity" } }, - content: { - serializedName: "content", + statuses: { + serializedName: "statuses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } } } } }; -export const PatchSettings: msRest.CompositeMapper = { - serializedName: "PatchSettings", +export const DedicatedHostAvailableCapacity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PatchSettings", + className: "DedicatedHostAvailableCapacity", modelProperties: { - patchMode: { - serializedName: "patchMode", - type: { - name: "String" - } - }, - enableHotpatching: { - serializedName: "enableHotpatching", - type: { - name: "Boolean" - } - }, - assessmentMode: { - serializedName: "assessmentMode", + allocatableVMs: { + serializedName: "allocatableVMs", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DedicatedHostAllocatableVM" + } + } } } } } }; -export const WinRMListener: msRest.CompositeMapper = { - serializedName: "WinRMListener", +export const DedicatedHostAllocatableVM: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WinRMListener", + className: "DedicatedHostAllocatableVM", modelProperties: { - protocol: { - serializedName: "protocol", + vmSize: { + serializedName: "vmSize", type: { - name: "Enum", - allowedValues: ["Http", "Https"] + name: "String" } }, - certificateUrl: { - serializedName: "certificateUrl", + count: { + serializedName: "count", type: { - name: "String" + name: "Number" } } } } }; -export const WinRMConfiguration: msRest.CompositeMapper = { - serializedName: "WinRMConfiguration", +export const DedicatedHostGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WinRMConfiguration", + className: "DedicatedHostGroupListResult", modelProperties: { - listeners: { - serializedName: "listeners", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "WinRMListener" + className: "DedicatedHostGroup" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const WindowsConfiguration: msRest.CompositeMapper = { - serializedName: "WindowsConfiguration", +export const DedicatedHostListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WindowsConfiguration", + className: "DedicatedHostListResult", modelProperties: { - provisionVMAgent: { - serializedName: "provisionVMAgent", - type: { - name: "Boolean" - } - }, - enableAutomaticUpdates: { - serializedName: "enableAutomaticUpdates", - type: { - name: "Boolean" - } - }, - timeZone: { - serializedName: "timeZone", - type: { - name: "String" - } - }, - additionalUnattendContent: { - serializedName: "additionalUnattendContent", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "AdditionalUnattendContent" + className: "DedicatedHost" } } } }, - patchSettings: { - serializedName: "patchSettings", - type: { - name: "Composite", - className: "PatchSettings" - } - }, - winRM: { - serializedName: "winRM", - type: { - name: "Composite", - className: "WinRMConfiguration" - } - } - } - } -}; - -export const SshPublicKey: msRest.CompositeMapper = { - serializedName: "SshPublicKey", - type: { - name: "Composite", - className: "SshPublicKey", - modelProperties: { - path: { - serializedName: "path", - type: { - name: "String" - } - }, - keyData: { - serializedName: "keyData", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -518,42 +515,56 @@ export const SshPublicKey: msRest.CompositeMapper = { } }; -export const SshConfiguration: msRest.CompositeMapper = { - serializedName: "SshConfiguration", +export const SshPublicKeysGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SshConfiguration", + className: "SshPublicKeysGroupListResult", modelProperties: { - publicKeys: { - serializedName: "publicKeys", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SshPublicKey" + className: "SshPublicKeyResource" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const LinuxPatchSettings: msRest.CompositeMapper = { - serializedName: "LinuxPatchSettings", +export const SshPublicKeyGenerateKeyPairResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinuxPatchSettings", + className: "SshPublicKeyGenerateKeyPairResult", modelProperties: { - patchMode: { - serializedName: "patchMode", + privateKey: { + serializedName: "privateKey", + required: true, type: { name: "String" } }, - assessmentMode: { - serializedName: "assessmentMode", + publicKey: { + serializedName: "publicKey", + required: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + required: true, type: { name: "String" } @@ -562,85 +573,70 @@ export const LinuxPatchSettings: msRest.CompositeMapper = { } }; -export const LinuxConfiguration: msRest.CompositeMapper = { - serializedName: "LinuxConfiguration", +export const VirtualMachineExtensionInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinuxConfiguration", + className: "VirtualMachineExtensionInstanceView", modelProperties: { - disablePasswordAuthentication: { - serializedName: "disablePasswordAuthentication", + name: { + serializedName: "name", type: { - name: "Boolean" + name: "String" } }, - ssh: { - serializedName: "ssh", + type: { + serializedName: "type", type: { - name: "Composite", - className: "SshConfiguration" + name: "String" } }, - provisionVMAgent: { - serializedName: "provisionVMAgent", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", type: { - name: "Boolean" + name: "String" } }, - patchSettings: { - serializedName: "patchSettings", - type: { - name: "Composite", - className: "LinuxPatchSettings" - } - } - } - } -}; - -export const VaultCertificate: msRest.CompositeMapper = { - serializedName: "VaultCertificate", - type: { - name: "Composite", - className: "VaultCertificate", - modelProperties: { - certificateUrl: { - serializedName: "certificateUrl", + substatuses: { + serializedName: "substatuses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } }, - certificateStore: { - serializedName: "certificateStore", + statuses: { + serializedName: "statuses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } } } } }; -export const VaultSecretGroup: msRest.CompositeMapper = { - serializedName: "VaultSecretGroup", +export const VirtualMachineExtensionsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VaultSecretGroup", + className: "VirtualMachineExtensionsListResult", modelProperties: { - sourceVault: { - serializedName: "sourceVault", - type: { - name: "Composite", - className: "SubResource" - } - }, - vaultCertificates: { - serializedName: "vaultCertificates", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VaultCertificate" + className: "VirtualMachineExtension" } } } @@ -649,252 +645,223 @@ export const VaultSecretGroup: msRest.CompositeMapper = { } }; -export const OSProfile: msRest.CompositeMapper = { - serializedName: "OSProfile", +export const ExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSProfile", + className: "ExtendedLocation", modelProperties: { - computerName: { - serializedName: "computerName", + name: { + serializedName: "name", type: { name: "String" } }, - adminUsername: { - serializedName: "adminUsername", + type: { + serializedName: "type", type: { name: "String" } - }, - adminPassword: { - serializedName: "adminPassword", + } + } + } +}; + +export const PurchasePlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PurchasePlan", + modelProperties: { + publisher: { + serializedName: "publisher", + required: true, type: { name: "String" } }, - customData: { - serializedName: "customData", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - windowsConfiguration: { - serializedName: "windowsConfiguration", - type: { - name: "Composite", - className: "WindowsConfiguration" - } - }, - linuxConfiguration: { - serializedName: "linuxConfiguration", - type: { - name: "Composite", - className: "LinuxConfiguration" - } - }, - secrets: { - serializedName: "secrets", + product: { + serializedName: "product", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VaultSecretGroup" - } - } + name: "String" } - }, - allowExtensionOperations: { - serializedName: "allowExtensionOperations", + } + } + } +}; + +export const OSDiskImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSDiskImage", + modelProperties: { + operatingSystem: { + serializedName: "operatingSystem", + required: true, type: { - name: "Boolean" + name: "Enum", + allowedValues: ["Windows", "Linux"] } - }, - requireGuestProvisionSignal: { - serializedName: "requireGuestProvisionSignal", + } + } + } +}; + +export const DataDiskImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataDiskImage", + modelProperties: { + lun: { + serializedName: "lun", + readOnly: true, type: { - name: "Boolean" + name: "Number" } } } } }; -export const BootDiagnostics: msRest.CompositeMapper = { - serializedName: "BootDiagnostics", +export const AutomaticOSUpgradeProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BootDiagnostics", + className: "AutomaticOSUpgradeProperties", modelProperties: { - enabled: { - serializedName: "enabled", + automaticOSUpgradeSupported: { + serializedName: "automaticOSUpgradeSupported", + required: true, type: { name: "Boolean" } - }, - storageUri: { - serializedName: "storageUri", - type: { - name: "String" - } } } } }; -export const DiagnosticsProfile: msRest.CompositeMapper = { - serializedName: "DiagnosticsProfile", +export const DisallowedConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProfile", + className: "DisallowedConfiguration", modelProperties: { - bootDiagnostics: { - serializedName: "bootDiagnostics", + vmDiskType: { + serializedName: "vmDiskType", type: { - name: "Composite", - className: "BootDiagnostics" + name: "String" } } } } }; -export const UefiSettings: msRest.CompositeMapper = { - serializedName: "UefiSettings", +export const VirtualMachineImageFeature: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UefiSettings", + className: "VirtualMachineImageFeature", modelProperties: { - secureBootEnabled: { - serializedName: "secureBootEnabled", + name: { + serializedName: "name", type: { - name: "Boolean" + name: "String" } }, - vTpmEnabled: { - serializedName: "vTpmEnabled", + value: { + serializedName: "value", type: { - name: "Boolean" + name: "String" } } } } }; -export const SecurityProfile: msRest.CompositeMapper = { - serializedName: "SecurityProfile", +export const CloudError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityProfile", + className: "CloudError", modelProperties: { - uefiSettings: { - serializedName: "uefiSettings", + error: { + serializedName: "error", type: { name: "Composite", - className: "UefiSettings" - } - }, - encryptionAtHost: { - serializedName: "encryptionAtHost", - type: { - name: "Boolean" - } - }, - securityType: { - serializedName: "securityType", - type: { - name: "Enum", - allowedValues: ["TrustedLaunch"] + className: "ApiError" } } } } }; -export const RestorePointSourceMetadata: msRest.CompositeMapper = { - serializedName: "RestorePointSourceMetadata", +export const ApiError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointSourceMetadata", + className: "ApiError", modelProperties: { - hardwareProfile: { - serializedName: "hardwareProfile", + details: { + serializedName: "details", type: { - name: "Composite", - className: "HardwareProfile" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApiErrorBase" + } + } } }, - storageProfile: { - serializedName: "storageProfile", + innererror: { + serializedName: "innererror", type: { name: "Composite", - className: "RestorePointSourceVMStorageProfile" + className: "InnerError" } }, - osProfile: { - serializedName: "osProfile", + code: { + serializedName: "code", type: { - name: "Composite", - className: "OSProfile" + name: "String" } }, - diagnosticsProfile: { - serializedName: "diagnosticsProfile", + target: { + serializedName: "target", type: { - name: "Composite", - className: "DiagnosticsProfile" + name: "String" } }, - licenseType: { - serializedName: "licenseType", + message: { + serializedName: "message", type: { name: "String" } - }, - vmId: { - serializedName: "vmId", - type: { - name: "String" - } - }, - securityProfile: { - serializedName: "securityProfile", - type: { - name: "Composite", - className: "SecurityProfile" - } } } } }; -export const RestorePointProvisioningDetails: msRest.CompositeMapper = { - serializedName: "RestorePointProvisioningDetails", +export const ApiErrorBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointProvisioningDetails", + className: "ApiErrorBase", modelProperties: { - creationTime: { - serializedName: "creationTime", - type: { - name: "DateTime" - } - }, - totalUsedSizeInBytes: { - serializedName: "totalUsedSizeInBytes", + code: { + serializedName: "code", type: { - name: "Number" + name: "String" } }, - statusCode: { - serializedName: "statusCode", + target: { + serializedName: "target", type: { - name: "Number" + name: "String" } }, - statusMessage: { - serializedName: "statusMessage", + message: { + serializedName: "message", type: { name: "String" } @@ -903,29 +870,47 @@ export const RestorePointProvisioningDetails: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const InnerError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "InnerError", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + exceptiontype: { + serializedName: "exceptiontype", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + errordetail: { + serializedName: "errordetail", type: { name: "String" } + } + } + } +}; + +export const ListUsagesResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListUsagesResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage" + } + } + } }, - type: { - readOnly: true, - serializedName: "type", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -934,211 +919,168 @@ export const ProxyResource: msRest.CompositeMapper = { } }; -export const RestorePoint: msRest.CompositeMapper = { - serializedName: "RestorePoint", +export const Usage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePoint", + className: "Usage", modelProperties: { - ...ProxyResource.type.modelProperties, - sourceMetadata: { - readOnly: true, - serializedName: "sourceMetadata", - type: { - name: "Composite", - className: "RestorePointSourceMetadata" - } - }, - provisioningState: { - readOnly: true, - serializedName: "provisioningState", + unit: { + defaultValue: "Count", + isConstant: true, + serializedName: "unit", type: { name: "String" } }, - consistencyMode: { - readOnly: true, - serializedName: "consistencyMode", + currentValue: { + serializedName: "currentValue", + required: true, type: { - name: "String" + name: "Number" } }, - provisioningDetails: { - readOnly: true, - serializedName: "provisioningDetails", + limit: { + serializedName: "limit", + required: true, type: { - name: "Composite", - className: "RestorePointProvisioningDetails" + name: "Number" } }, - excludeDisks: { - serializedName: "excludeDisks", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiEntityReference" - } - } + name: "Composite", + className: "UsageName" } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const UsageName: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "UsageName", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + value: { + serializedName: "value", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + localizedValue: { + serializedName: "localizedValue", type: { name: "String" } - }, - location: { + } + } + } +}; + +export const VirtualMachineListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineListResult", + modelProperties: { + value: { + serializedName: "value", required: true, - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachine" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const RestorePointCollection: msRest.CompositeMapper = { - serializedName: "RestorePointCollection", +export const Plan: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointCollection", + className: "Plan", modelProperties: { - ...Resource.type.modelProperties, - source: { - serializedName: "properties.source", + name: { + serializedName: "name", type: { - name: "Composite", - className: "RestorePointCollectionSourceProperties" + name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + publisher: { + serializedName: "publisher", type: { name: "String" } }, - restorePointCollectionId: { - readOnly: true, - serializedName: "properties.restorePointCollectionId", + product: { + serializedName: "product", type: { name: "String" } }, - restorePoints: { - readOnly: true, - serializedName: "properties.restorePoints", + promotionCode: { + serializedName: "promotionCode", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorePoint" - } - } + name: "String" } } } } }; -export const UpdateResource: msRest.CompositeMapper = { - serializedName: "UpdateResource", +export const HardwareProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpdateResource", + className: "HardwareProfile", modelProperties: { - tags: { - serializedName: "tags", + vmSize: { + serializedName: "vmSize", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const RestorePointCollectionUpdate: msRest.CompositeMapper = { - serializedName: "RestorePointCollectionUpdate", +export const StorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointCollectionUpdate", + className: "StorageProfile", modelProperties: { - ...UpdateResource.type.modelProperties, - source: { - serializedName: "properties.source", + imageReference: { + serializedName: "imageReference", type: { name: "Composite", - className: "RestorePointCollectionSourceProperties" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" + className: "ImageReference" } }, - restorePointCollectionId: { - readOnly: true, - serializedName: "properties.restorePointCollectionId", + osDisk: { + serializedName: "osDisk", type: { - name: "String" + name: "Composite", + className: "OSDisk" } }, - restorePoints: { - readOnly: true, - serializedName: "properties.restorePoints", + dataDisks: { + serializedName: "dataDisks", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorePoint" + className: "DataDisk" } } } @@ -1147,50 +1089,87 @@ export const RestorePointCollectionUpdate: msRest.CompositeMapper = { } }; -export const ComputeOperationValue: msRest.CompositeMapper = { - serializedName: "ComputeOperationValue", +export const OSDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComputeOperationValue", + className: "OSDisk", modelProperties: { - origin: { - readOnly: true, - serializedName: "origin", + osType: { + serializedName: "osType", type: { - name: "String" + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - name: { - readOnly: true, + encryptionSettings: { + serializedName: "encryptionSettings", + type: { + name: "Composite", + className: "DiskEncryptionSettings" + } + }, + name: { serializedName: "name", type: { name: "String" } }, - operation: { - readOnly: true, - serializedName: "display.operation", + vhd: { + serializedName: "vhd", type: { - name: "String" + name: "Composite", + className: "VirtualHardDisk" } }, - resource: { - readOnly: true, - serializedName: "display.resource", + image: { + serializedName: "image", type: { - name: "String" + name: "Composite", + className: "VirtualHardDisk" } }, - description: { - readOnly: true, - serializedName: "display.description", + caching: { + serializedName: "caching", + type: { + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] + } + }, + writeAcceleratorEnabled: { + serializedName: "writeAcceleratorEnabled", + type: { + name: "Boolean" + } + }, + diffDiskSettings: { + serializedName: "diffDiskSettings", + type: { + name: "Composite", + className: "DiffDiskSettings" + } + }, + createOption: { + serializedName: "createOption", + required: true, type: { name: "String" } }, - provider: { - readOnly: true, - serializedName: "display.provider", + diskSizeGB: { + serializedName: "diskSizeGB", + type: { + name: "Number" + } + }, + managedDisk: { + serializedName: "managedDisk", + type: { + name: "Composite", + className: "ManagedDiskParameters" + } + }, + deleteOption: { + serializedName: "deleteOption", type: { name: "String" } @@ -1199,377 +1178,414 @@ export const ComputeOperationValue: msRest.CompositeMapper = { } }; -export const DisallowedConfiguration: msRest.CompositeMapper = { - serializedName: "DisallowedConfiguration", +export const DiskEncryptionSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DisallowedConfiguration", + className: "DiskEncryptionSettings", modelProperties: { - vmDiskType: { - serializedName: "vmDiskType", + diskEncryptionKey: { + serializedName: "diskEncryptionKey", type: { - name: "String" + name: "Composite", + className: "KeyVaultSecretReference" + } + }, + keyEncryptionKey: { + serializedName: "keyEncryptionKey", + type: { + name: "Composite", + className: "KeyVaultKeyReference" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" } } } } }; -export const RetrieveBootDiagnosticsDataResult: msRest.CompositeMapper = { - serializedName: "RetrieveBootDiagnosticsDataResult", +export const KeyVaultSecretReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RetrieveBootDiagnosticsDataResult", + className: "KeyVaultSecretReference", modelProperties: { - consoleScreenshotBlobUri: { - readOnly: true, - serializedName: "consoleScreenshotBlobUri", + secretUrl: { + serializedName: "secretUrl", + required: true, type: { name: "String" } }, - serialConsoleLogBlobUri: { - readOnly: true, - serializedName: "serialConsoleLogBlobUri", + sourceVault: { + serializedName: "sourceVault", type: { - name: "String" + name: "Composite", + className: "SubResource" } } } } }; -export const InstanceViewStatus: msRest.CompositeMapper = { - serializedName: "InstanceViewStatus", +export const KeyVaultKeyReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InstanceViewStatus", + className: "KeyVaultKeyReference", modelProperties: { - code: { - serializedName: "code", + keyUrl: { + serializedName: "keyUrl", + required: true, type: { name: "String" } }, - level: { - serializedName: "level", - type: { - name: "Enum", - allowedValues: ["Info", "Warning", "Error"] - } - }, - displayStatus: { - serializedName: "displayStatus", + sourceVault: { + serializedName: "sourceVault", type: { - name: "String" + name: "Composite", + className: "SubResource" } - }, - message: { - serializedName: "message", + } + } + } +}; + +export const VirtualHardDisk: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualHardDisk", + modelProperties: { + uri: { + serializedName: "uri", type: { name: "String" } - }, - time: { - serializedName: "time", - type: { - name: "DateTime" - } } } } }; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const DiffDiskSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Sku", + className: "DiffDiskSettings", modelProperties: { - name: { - serializedName: "name", + option: { + serializedName: "option", type: { name: "String" } }, - tier: { - serializedName: "tier", + placement: { + serializedName: "placement", type: { name: "String" } - }, - capacity: { - serializedName: "capacity", - type: { - name: "Number" - } } } } }; -export const AvailabilitySet: msRest.CompositeMapper = { - serializedName: "AvailabilitySet", +export const DataDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailabilitySet", + className: "DataDisk", modelProperties: { - ...Resource.type.modelProperties, - platformUpdateDomainCount: { - serializedName: "properties.platformUpdateDomainCount", + lun: { + serializedName: "lun", + required: true, type: { name: "Number" } }, - platformFaultDomainCount: { - serializedName: "properties.platformFaultDomainCount", + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } }, - virtualMachines: { - serializedName: "properties.virtualMachines", + vhd: { + serializedName: "vhd", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "Composite", + className: "VirtualHardDisk" } }, - proximityPlacementGroup: { - serializedName: "properties.proximityPlacementGroup", + image: { + serializedName: "image", type: { name: "Composite", - className: "SubResource" + className: "VirtualHardDisk" } }, - statuses: { - readOnly: true, - serializedName: "properties.statuses", + caching: { + serializedName: "caching", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - sku: { - serializedName: "sku", + writeAcceleratorEnabled: { + serializedName: "writeAcceleratorEnabled", type: { - name: "Composite", - className: "Sku" + name: "Boolean" } - } - } - } -}; - -export const AvailabilitySetUpdate: msRest.CompositeMapper = { - serializedName: "AvailabilitySetUpdate", - type: { - name: "Composite", - className: "AvailabilitySetUpdate", - modelProperties: { - ...UpdateResource.type.modelProperties, - platformUpdateDomainCount: { - serializedName: "properties.platformUpdateDomainCount", + }, + createOption: { + serializedName: "createOption", + required: true, type: { - name: "Number" + name: "String" } }, - platformFaultDomainCount: { - serializedName: "properties.platformFaultDomainCount", + diskSizeGB: { + serializedName: "diskSizeGB", type: { name: "Number" } }, - virtualMachines: { - serializedName: "properties.virtualMachines", + managedDisk: { + serializedName: "managedDisk", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "Composite", + className: "ManagedDiskParameters" } }, - proximityPlacementGroup: { - serializedName: "properties.proximityPlacementGroup", - type: { - name: "Composite", - className: "SubResource" + toBeDetached: { + serializedName: "toBeDetached", + type: { + name: "Boolean" } }, - statuses: { + diskIopsReadWrite: { + serializedName: "diskIOPSReadWrite", readOnly: true, - serializedName: "properties.statuses", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } + name: "Number" } }, - sku: { - serializedName: "sku", + diskMBpsReadWrite: { + serializedName: "diskMBpsReadWrite", + readOnly: true, type: { - name: "Composite", - className: "Sku" + name: "Number" + } + }, + detachOption: { + serializedName: "detachOption", + type: { + name: "String" + } + }, + deleteOption: { + serializedName: "deleteOption", + type: { + name: "String" } } } } }; -export const SubResourceWithColocationStatus: msRest.CompositeMapper = { - serializedName: "SubResourceWithColocationStatus", +export const AdditionalCapabilities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SubResourceWithColocationStatus", + className: "AdditionalCapabilities", modelProperties: { - ...SubResource.type.modelProperties, - colocationStatus: { - serializedName: "colocationStatus", + ultraSSDEnabled: { + serializedName: "ultraSSDEnabled", type: { - name: "Composite", - className: "InstanceViewStatus" + name: "Boolean" } } } } }; -export const ProximityPlacementGroup: msRest.CompositeMapper = { - serializedName: "ProximityPlacementGroup", +export const OSProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProximityPlacementGroup", + className: "OSProfile", modelProperties: { - ...Resource.type.modelProperties, - proximityPlacementGroupType: { - serializedName: "properties.proximityPlacementGroupType", + computerName: { + serializedName: "computerName", type: { name: "String" } }, - virtualMachines: { - readOnly: true, - serializedName: "properties.virtualMachines", + adminUsername: { + serializedName: "adminUsername", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResourceWithColocationStatus" - } - } + name: "String" } }, - virtualMachineScaleSets: { - readOnly: true, - serializedName: "properties.virtualMachineScaleSets", + adminPassword: { + serializedName: "adminPassword", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResourceWithColocationStatus" - } - } + name: "String" } }, - availabilitySets: { - readOnly: true, - serializedName: "properties.availabilitySets", + customData: { + serializedName: "customData", + type: { + name: "String" + } + }, + windowsConfiguration: { + serializedName: "windowsConfiguration", + type: { + name: "Composite", + className: "WindowsConfiguration" + } + }, + linuxConfiguration: { + serializedName: "linuxConfiguration", + type: { + name: "Composite", + className: "LinuxConfiguration" + } + }, + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SubResourceWithColocationStatus" + className: "VaultSecretGroup" } } } }, - colocationStatus: { - serializedName: "properties.colocationStatus", + allowExtensionOperations: { + serializedName: "allowExtensionOperations", type: { - name: "Composite", - className: "InstanceViewStatus" + name: "Boolean" + } + }, + requireGuestProvisionSignal: { + serializedName: "requireGuestProvisionSignal", + type: { + name: "Boolean" } } } } }; -export const ProximityPlacementGroupUpdate: msRest.CompositeMapper = { - serializedName: "ProximityPlacementGroupUpdate", +export const WindowsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProximityPlacementGroupUpdate", + className: "WindowsConfiguration", modelProperties: { - ...UpdateResource.type.modelProperties + provisionVMAgent: { + serializedName: "provisionVMAgent", + type: { + name: "Boolean" + } + }, + enableAutomaticUpdates: { + serializedName: "enableAutomaticUpdates", + type: { + name: "Boolean" + } + }, + timeZone: { + serializedName: "timeZone", + type: { + name: "String" + } + }, + additionalUnattendContent: { + serializedName: "additionalUnattendContent", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalUnattendContent" + } + } + } + }, + patchSettings: { + serializedName: "patchSettings", + type: { + name: "Composite", + className: "PatchSettings" + } + }, + winRM: { + serializedName: "winRM", + type: { + name: "Composite", + className: "WinRMConfiguration" + } + } } } }; -export const DedicatedHostInstanceView: msRest.CompositeMapper = { - serializedName: "DedicatedHostInstanceView", +export const AdditionalUnattendContent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostInstanceView", + className: "AdditionalUnattendContent", modelProperties: { - assetId: { - readOnly: true, - serializedName: "assetId", + passName: { + defaultValue: "OobeSystem", + isConstant: true, + serializedName: "passName", type: { name: "String" } }, - availableCapacity: { - serializedName: "availableCapacity", + componentName: { + defaultValue: "Microsoft-Windows-Shell-Setup", + isConstant: true, + serializedName: "componentName", type: { - name: "Composite", - className: "DedicatedHostAvailableCapacity" + name: "String" } }, - statuses: { - serializedName: "statuses", + settingName: { + serializedName: "settingName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } + name: "Enum", + allowedValues: ["AutoLogon", "FirstLogonCommands"] + } + }, + content: { + serializedName: "content", + type: { + name: "String" } } } } }; -export const DedicatedHostInstanceViewWithName: msRest.CompositeMapper = { - serializedName: "DedicatedHostInstanceViewWithName", +export const PatchSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostInstanceViewWithName", + className: "PatchSettings", modelProperties: { - ...DedicatedHostInstanceView.type.modelProperties, - name: { - readOnly: true, - serializedName: "name", + patchMode: { + serializedName: "patchMode", + type: { + name: "String" + } + }, + enableHotpatching: { + serializedName: "enableHotpatching", + type: { + name: "Boolean" + } + }, + assessmentMode: { + serializedName: "assessmentMode", type: { name: "String" } @@ -1578,20 +1594,19 @@ export const DedicatedHostInstanceViewWithName: msRest.CompositeMapper = { } }; -export const DedicatedHostGroupInstanceView: msRest.CompositeMapper = { - serializedName: "DedicatedHostGroupInstanceView", +export const WinRMConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostGroupInstanceView", + className: "WinRMConfiguration", modelProperties: { - hosts: { - serializedName: "hosts", + listeners: { + serializedName: "listeners", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DedicatedHostInstanceViewWithName" + className: "WinRMListener" } } } @@ -1600,15 +1615,20 @@ export const DedicatedHostGroupInstanceView: msRest.CompositeMapper = { } }; -export const SubResourceReadOnly: msRest.CompositeMapper = { - serializedName: "SubResourceReadOnly", +export const WinRMListener: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SubResourceReadOnly", + className: "WinRMListener", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + protocol: { + serializedName: "protocol", + type: { + name: "Enum", + allowedValues: ["Http", "Https"] + } + }, + certificateUrl: { + serializedName: "certificateUrl", type: { name: "String" } @@ -1617,160 +1637,124 @@ export const SubResourceReadOnly: msRest.CompositeMapper = { } }; -export const DedicatedHostGroup: msRest.CompositeMapper = { - serializedName: "DedicatedHostGroup", +export const LinuxConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostGroup", + className: "LinuxConfiguration", modelProperties: { - ...Resource.type.modelProperties, - platformFaultDomainCount: { - required: true, - serializedName: "properties.platformFaultDomainCount", - constraints: { - InclusiveMinimum: 1 - }, + disablePasswordAuthentication: { + serializedName: "disablePasswordAuthentication", type: { - name: "Number" - } - }, - hosts: { - readOnly: true, - serializedName: "properties.hosts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResourceReadOnly" - } - } + name: "Boolean" } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", + ssh: { + serializedName: "ssh", type: { name: "Composite", - className: "DedicatedHostGroupInstanceView" + className: "SshConfiguration" } }, - supportAutomaticPlacement: { - serializedName: "properties.supportAutomaticPlacement", + provisionVMAgent: { + serializedName: "provisionVMAgent", type: { name: "Boolean" } }, - zones: { - serializedName: "zones", + patchSettings: { + serializedName: "patchSettings", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "LinuxPatchSettings" } } } } }; -export const DedicatedHostGroupUpdate: msRest.CompositeMapper = { - serializedName: "DedicatedHostGroupUpdate", +export const SshConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostGroupUpdate", + className: "SshConfiguration", modelProperties: { - ...UpdateResource.type.modelProperties, - platformFaultDomainCount: { - required: true, - serializedName: "properties.platformFaultDomainCount", - constraints: { - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - }, - hosts: { - readOnly: true, - serializedName: "properties.hosts", + publicKeys: { + serializedName: "publicKeys", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SubResourceReadOnly" + className: "SshPublicKey" } } } - }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", - type: { - name: "Composite", - className: "DedicatedHostGroupInstanceView" - } - }, - supportAutomaticPlacement: { - serializedName: "properties.supportAutomaticPlacement", + } + } + } +}; + +export const SshPublicKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshPublicKey", + modelProperties: { + path: { + serializedName: "path", type: { - name: "Boolean" + name: "String" } }, - zones: { - serializedName: "zones", + keyData: { + serializedName: "keyData", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const DedicatedHostAllocatableVM: msRest.CompositeMapper = { - serializedName: "DedicatedHostAllocatableVM", +export const LinuxPatchSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostAllocatableVM", + className: "LinuxPatchSettings", modelProperties: { - vmSize: { - serializedName: "vmSize", + patchMode: { + serializedName: "patchMode", type: { name: "String" } }, - count: { - serializedName: "count", + assessmentMode: { + serializedName: "assessmentMode", type: { - name: "Number" + name: "String" } } } } }; -export const DedicatedHostAvailableCapacity: msRest.CompositeMapper = { - serializedName: "DedicatedHostAvailableCapacity", +export const VaultSecretGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostAvailableCapacity", + className: "VaultSecretGroup", modelProperties: { - allocatableVMs: { - serializedName: "allocatableVMs", + sourceVault: { + serializedName: "sourceVault", + type: { + name: "Composite", + className: "SubResource" + } + }, + vaultCertificates: { + serializedName: "vaultCertificates", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DedicatedHostAllocatableVM" + className: "VaultCertificate" } } } @@ -1779,333 +1763,324 @@ export const DedicatedHostAvailableCapacity: msRest.CompositeMapper = { } }; -export const DedicatedHost: msRest.CompositeMapper = { - serializedName: "DedicatedHost", +export const VaultCertificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHost", + className: "VaultCertificate", modelProperties: { - ...Resource.type.modelProperties, - platformFaultDomain: { - serializedName: "properties.platformFaultDomain", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - autoReplaceOnFailure: { - serializedName: "properties.autoReplaceOnFailure", + certificateUrl: { + serializedName: "certificateUrl", type: { - name: "Boolean" + name: "String" } }, - hostId: { - readOnly: true, - serializedName: "properties.hostId", + certificateStore: { + serializedName: "certificateStore", type: { name: "String" } - }, - virtualMachines: { - readOnly: true, - serializedName: "properties.virtualMachines", + } + } + } +}; + +export const NetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + networkInterfaces: { + serializedName: "networkInterfaces", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SubResourceReadOnly" + className: "NetworkInterfaceReference" } } } }, - licenseType: { - serializedName: "properties.licenseType", - type: { - name: "Enum", - allowedValues: ["None", "Windows_Server_Hybrid", "Windows_Server_Perpetual"] - } - }, - provisioningTime: { - readOnly: true, - serializedName: "properties.provisioningTime", - type: { - name: "DateTime" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + networkApiVersion: { + serializedName: "networkApiVersion", type: { name: "String" } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", - type: { - name: "Composite", - className: "DedicatedHostInstanceView" - } - }, - sku: { - required: true, - serializedName: "sku", + networkInterfaceConfigurations: { + serializedName: "networkInterfaceConfigurations", type: { - name: "Composite", - className: "Sku" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineNetworkInterfaceConfiguration" + } + } } } } } }; -export const DedicatedHostUpdate: msRest.CompositeMapper = { - serializedName: "DedicatedHostUpdate", +export const VirtualMachineNetworkInterfaceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostUpdate", + className: "VirtualMachineNetworkInterfaceConfiguration", modelProperties: { - ...UpdateResource.type.modelProperties, - platformFaultDomain: { - serializedName: "properties.platformFaultDomain", - constraints: { - InclusiveMinimum: 0 - }, + name: { + serializedName: "name", + required: true, type: { - name: "Number" + name: "String" } }, - autoReplaceOnFailure: { - serializedName: "properties.autoReplaceOnFailure", + primary: { + serializedName: "properties.primary", type: { name: "Boolean" } }, - hostId: { - readOnly: true, - serializedName: "properties.hostId", + deleteOption: { + serializedName: "properties.deleteOption", type: { name: "String" } }, - virtualMachines: { - readOnly: true, - serializedName: "properties.virtualMachines", + enableAcceleratedNetworking: { + serializedName: "properties.enableAcceleratedNetworking", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResourceReadOnly" - } - } + name: "Boolean" } }, - licenseType: { - serializedName: "properties.licenseType", + enableFpga: { + serializedName: "properties.enableFpga", type: { - name: "Enum", - allowedValues: ["None", "Windows_Server_Hybrid", "Windows_Server_Perpetual"] + name: "Boolean" } }, - provisioningTime: { - readOnly: true, - serializedName: "properties.provisioningTime", + enableIPForwarding: { + serializedName: "properties.enableIPForwarding", type: { - name: "DateTime" + name: "Boolean" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + networkSecurityGroup: { + serializedName: "properties.networkSecurityGroup", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", + dnsSettings: { + serializedName: "properties.dnsSettings", type: { name: "Composite", - className: "DedicatedHostInstanceView" - } - } - } - } -}; - -export const SshPublicKeyGenerateKeyPairResult: msRest.CompositeMapper = { - serializedName: "SshPublicKeyGenerateKeyPairResult", - type: { - name: "Composite", - className: "SshPublicKeyGenerateKeyPairResult", - modelProperties: { - privateKey: { - required: true, - serializedName: "privateKey", - type: { - name: "String" + className: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration" } }, - publicKey: { - required: true, - serializedName: "publicKey", + ipConfigurations: { + serializedName: "properties.ipConfigurations", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineNetworkInterfaceIPConfiguration" + } + } } }, - id: { - required: true, - serializedName: "id", - type: { - name: "String" - } - } - } - } -}; - -export const SshPublicKeyResource: msRest.CompositeMapper = { - serializedName: "SshPublicKeyResource", - type: { - name: "Composite", - className: "SshPublicKeyResource", - modelProperties: { - ...Resource.type.modelProperties, - publicKey: { - serializedName: "properties.publicKey", + dscpConfiguration: { + serializedName: "properties.dscpConfiguration", type: { - name: "String" + name: "Composite", + className: "SubResource" } } } } }; -export const SshPublicKeyUpdateResource: msRest.CompositeMapper = { - serializedName: "SshPublicKeyUpdateResource", +export const VirtualMachineNetworkInterfaceDnsSettingsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SshPublicKeyUpdateResource", + className: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration", modelProperties: { - ...UpdateResource.type.modelProperties, - publicKey: { - serializedName: "properties.publicKey", + dnsServers: { + serializedName: "dnsServers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const VirtualMachineSize: msRest.CompositeMapper = { - serializedName: "VirtualMachineSize", +export const VirtualMachineNetworkInterfaceIPConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineSize", + className: "VirtualMachineNetworkInterfaceIPConfiguration", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, - numberOfCores: { - serializedName: "numberOfCores", + subnet: { + serializedName: "properties.subnet", type: { - name: "Number" + name: "Composite", + className: "SubResource" } }, - osDiskSizeInMB: { - serializedName: "osDiskSizeInMB", + primary: { + serializedName: "properties.primary", type: { - name: "Number" + name: "Boolean" } }, - resourceDiskSizeInMB: { - serializedName: "resourceDiskSizeInMB", + publicIPAddressConfiguration: { + serializedName: "properties.publicIPAddressConfiguration", type: { - name: "Number" + name: "Composite", + className: "VirtualMachinePublicIPAddressConfiguration" } }, - memoryInMB: { - serializedName: "memoryInMB", + privateIPAddressVersion: { + serializedName: "properties.privateIPAddressVersion", type: { - name: "Number" + name: "String" } }, - maxDataDiskCount: { - serializedName: "maxDataDiskCount", + applicationSecurityGroups: { + serializedName: "properties.applicationSecurityGroups", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + applicationGatewayBackendAddressPools: { + serializedName: "properties.applicationGatewayBackendAddressPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + loadBalancerBackendAddressPools: { + serializedName: "properties.loadBalancerBackendAddressPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } } } } } }; -export const VirtualMachineExtensionImage: msRest.CompositeMapper = { - serializedName: "VirtualMachineExtensionImage", +export const VirtualMachinePublicIPAddressConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtensionImage", + className: "VirtualMachinePublicIPAddressConfiguration", modelProperties: { - ...Resource.type.modelProperties, - operatingSystem: { + name: { + serializedName: "name", required: true, - serializedName: "properties.operatingSystem", type: { name: "String" } }, - computeRole: { - required: true, - serializedName: "properties.computeRole", + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "PublicIPAddressSku" } }, - handlerSchema: { - required: true, - serializedName: "properties.handlerSchema", + idleTimeoutInMinutes: { + serializedName: "properties.idleTimeoutInMinutes", + type: { + name: "Number" + } + }, + deleteOption: { + serializedName: "properties.deleteOption", type: { name: "String" } }, - vmScaleSetEnabled: { - serializedName: "properties.vmScaleSetEnabled", + dnsSettings: { + serializedName: "properties.dnsSettings", type: { - name: "Boolean" + name: "Composite", + className: "VirtualMachinePublicIPAddressDnsSettingsConfiguration" } }, - supportsMultipleExtensions: { - serializedName: "properties.supportsMultipleExtensions", + ipTags: { + serializedName: "properties.ipTags", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineIpTag" + } + } + } + }, + publicIPPrefix: { + serializedName: "properties.publicIPPrefix", + type: { + name: "Composite", + className: "SubResource" + } + }, + publicIPAddressVersion: { + serializedName: "properties.publicIPAddressVersion", + type: { + name: "String" + } + }, + publicIPAllocationMethod: { + serializedName: "properties.publicIPAllocationMethod", + type: { + name: "String" } } } } }; -export const ExtendedLocation: msRest.CompositeMapper = { - serializedName: "ExtendedLocation", +export const VirtualMachinePublicIPAddressDnsSettingsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedLocation", + className: "VirtualMachinePublicIPAddressDnsSettingsConfiguration", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", + domainNameLabel: { + serializedName: "domainNameLabel", + required: true, type: { name: "String" } @@ -2114,54 +2089,31 @@ export const ExtendedLocation: msRest.CompositeMapper = { } }; -export const VirtualMachineImageResource: msRest.CompositeMapper = { - serializedName: "VirtualMachineImageResource", +export const VirtualMachineIpTag: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineImageResource", + className: "VirtualMachineIpTag", modelProperties: { - ...SubResource.type.modelProperties, - name: { - required: true, - serializedName: "name", + ipTagType: { + serializedName: "ipTagType", type: { name: "String" } }, - location: { - required: true, - serializedName: "location", + tag: { + serializedName: "tag", type: { name: "String" } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - extendedLocation: { - serializedName: "extendedLocation", - type: { - name: "Composite", - className: "ExtendedLocation" - } } } } }; -export const VirtualMachineExtensionInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineExtensionInstanceView", +export const PublicIPAddressSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtensionInstanceView", + className: "PublicIPAddressSku", modelProperties: { name: { serializedName: "name", @@ -2169,352 +2121,401 @@ export const VirtualMachineExtensionInstanceView: msRest.CompositeMapper = { name: "String" } }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + tier: { + serializedName: "tier", type: { name: "String" } - }, - substatuses: { - serializedName: "substatuses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } - } - }, - statuses: { - serializedName: "statuses", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } - } } } } }; -export const VirtualMachineExtension: msRest.CompositeMapper = { - serializedName: "VirtualMachineExtension", +export const SecurityProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtension", + className: "SecurityProfile", modelProperties: { - ...Resource.type.modelProperties, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", - type: { - name: "String" - } - }, - publisher: { - serializedName: "properties.publisher", + uefiSettings: { + serializedName: "uefiSettings", type: { - name: "String" + name: "Composite", + className: "UefiSettings" } }, - virtualMachineExtensionType: { - serializedName: "properties.type", + encryptionAtHost: { + serializedName: "encryptionAtHost", type: { - name: "String" + name: "Boolean" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + securityType: { + serializedName: "securityType", type: { name: "String" } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + } + } + } +}; + +export const UefiSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UefiSettings", + modelProperties: { + secureBootEnabled: { + serializedName: "secureBootEnabled", type: { name: "Boolean" } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", + vTpmEnabled: { + serializedName: "vTpmEnabled", type: { name: "Boolean" } - }, - settings: { - serializedName: "properties.settings", + } + } + } +}; + +export const DiagnosticsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsProfile", + modelProperties: { + bootDiagnostics: { + serializedName: "bootDiagnostics", type: { - name: "Object" + name: "Composite", + className: "BootDiagnostics" } - }, - protectedSettings: { - serializedName: "properties.protectedSettings", + } + } + } +}; + +export const BootDiagnostics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BootDiagnostics", + modelProperties: { + enabled: { + serializedName: "enabled", type: { - name: "Object" + name: "Boolean" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + storageUri: { + serializedName: "storageUri", type: { name: "String" } - }, - instanceView: { - serializedName: "properties.instanceView", + } + } + } +}; + +export const BillingProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingProfile", + modelProperties: { + maxPrice: { + serializedName: "maxPrice", type: { - name: "Composite", - className: "VirtualMachineExtensionInstanceView" + name: "Number" } } } } }; -export const VirtualMachineScaleSetVMExtension: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMExtension", +export const VirtualMachineInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMExtension", + className: "VirtualMachineInstanceView", modelProperties: { - ...SubResourceReadOnly.type.modelProperties, - name: { - readOnly: true, - serializedName: "name", + platformUpdateDomain: { + serializedName: "platformUpdateDomain", type: { - name: "String" + name: "Number" } }, - type: { - readOnly: true, - serializedName: "type", + platformFaultDomain: { + serializedName: "platformFaultDomain", + type: { + name: "Number" + } + }, + computerName: { + serializedName: "computerName", type: { name: "String" } }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + osName: { + serializedName: "osName", type: { name: "String" } }, - publisher: { - serializedName: "properties.publisher", + osVersion: { + serializedName: "osVersion", type: { name: "String" } }, - type1: { - serializedName: "properties.type", + hyperVGeneration: { + serializedName: "hyperVGeneration", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + rdpThumbPrint: { + serializedName: "rdpThumbPrint", type: { name: "String" } }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + vmAgent: { + serializedName: "vmAgent", type: { - name: "Boolean" + name: "Composite", + className: "VirtualMachineAgentInstanceView" } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", + maintenanceRedeployStatus: { + serializedName: "maintenanceRedeployStatus", type: { - name: "Boolean" + name: "Composite", + className: "MaintenanceRedeployStatus" } }, - settings: { - serializedName: "properties.settings", + disks: { + serializedName: "disks", type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskInstanceView" + } + } } }, - protectedSettings: { - serializedName: "properties.protectedSettings", + extensions: { + serializedName: "extensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineExtensionInstanceView" + } + } + } + }, + vmHealth: { + serializedName: "vmHealth", type: { - name: "Object" + name: "Composite", + className: "VirtualMachineHealthStatus" } }, - provisioningState: { + bootDiagnostics: { + serializedName: "bootDiagnostics", + type: { + name: "Composite", + className: "BootDiagnosticsInstanceView" + } + }, + assignedHost: { + serializedName: "assignedHost", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - instanceView: { - serializedName: "properties.instanceView", + statuses: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } + } + }, + patchStatus: { + serializedName: "patchStatus", type: { name: "Composite", - className: "VirtualMachineExtensionInstanceView" + className: "VirtualMachinePatchStatus" } } } } }; -export const VirtualMachineExtensionUpdate: msRest.CompositeMapper = { - serializedName: "VirtualMachineExtensionUpdate", +export const VirtualMachineAgentInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtensionUpdate", + className: "VirtualMachineAgentInstanceView", modelProperties: { - ...UpdateResource.type.modelProperties, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + vmAgentVersion: { + serializedName: "vmAgentVersion", type: { name: "String" } }, - publisher: { - serializedName: "properties.publisher", + extensionHandlers: { + serializedName: "extensionHandlers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineExtensionHandlerInstanceView" + } + } } }, - type: { - serializedName: "properties.type", + statuses: { + serializedName: "statuses", type: { - name: "String" - } - }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", - type: { - name: "String" - } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean" - } - }, - settings: { - serializedName: "properties.settings", - type: { - name: "Object" - } - }, - protectedSettings: { - serializedName: "properties.protectedSettings", - type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } } } } }; -export const VirtualMachineScaleSetVMExtensionUpdate: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMExtensionUpdate", +export const VirtualMachineExtensionHandlerInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMExtensionUpdate", + className: "VirtualMachineExtensionHandlerInstanceView", modelProperties: { - ...SubResourceReadOnly.type.modelProperties, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, type: { - readOnly: true, serializedName: "type", type: { name: "String" } }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", type: { name: "String" } }, - publisher: { - serializedName: "properties.publisher", + status: { + serializedName: "status", type: { - name: "String" + name: "Composite", + className: "InstanceViewStatus" + } + } + } + } +}; + +export const MaintenanceRedeployStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaintenanceRedeployStatus", + modelProperties: { + isCustomerInitiatedMaintenanceAllowed: { + serializedName: "isCustomerInitiatedMaintenanceAllowed", + type: { + name: "Boolean" } }, - type1: { - serializedName: "properties.type", + preMaintenanceWindowStartTime: { + serializedName: "preMaintenanceWindowStartTime", type: { - name: "String" + name: "DateTime" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + preMaintenanceWindowEndTime: { + serializedName: "preMaintenanceWindowEndTime", type: { - name: "String" + name: "DateTime" } }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + maintenanceWindowStartTime: { + serializedName: "maintenanceWindowStartTime", type: { - name: "Boolean" + name: "DateTime" } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", + maintenanceWindowEndTime: { + serializedName: "maintenanceWindowEndTime", type: { - name: "Boolean" + name: "DateTime" } }, - settings: { - serializedName: "properties.settings", + lastOperationResultCode: { + serializedName: "lastOperationResultCode", type: { - name: "Object" + name: "Enum", + allowedValues: [ + "None", + "RetryLater", + "MaintenanceAborted", + "MaintenanceCompleted" + ] } }, - protectedSettings: { - serializedName: "properties.protectedSettings", + lastOperationMessage: { + serializedName: "lastOperationMessage", type: { - name: "Object" + name: "String" } } } } }; -export const VirtualMachineExtensionsListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineExtensionsListResult", +export const DiskInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtensionsListResult", + className: "DiskInstanceView", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + encryptionSettings: { + serializedName: "encryptionSettings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineExtension" + className: "DiskEncryptionSettings" + } + } + } + }, + statuses: { + serializedName: "statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" } } } @@ -2523,273 +2524,229 @@ export const VirtualMachineExtensionsListResult: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetVMExtensionsListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMExtensionsListResult", +export const VirtualMachineHealthStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMExtensionsListResult", + className: "VirtualMachineHealthStatus", modelProperties: { - value: { - serializedName: "value", + status: { + serializedName: "status", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMExtension" - } - } + name: "Composite", + className: "InstanceViewStatus" } } } } }; -export const VirtualMachineSoftwarePatchProperties: msRest.CompositeMapper = { - serializedName: "VirtualMachineSoftwarePatchProperties", +export const BootDiagnosticsInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineSoftwarePatchProperties", + className: "BootDiagnosticsInstanceView", modelProperties: { - patchId: { + consoleScreenshotBlobUri: { + serializedName: "consoleScreenshotBlobUri", readOnly: true, - serializedName: "patchId", type: { name: "String" } }, - name: { + serialConsoleLogBlobUri: { + serializedName: "serialConsoleLogBlobUri", readOnly: true, - serializedName: "name", type: { name: "String" } }, - version: { - readOnly: true, - serializedName: "version", + status: { + serializedName: "status", type: { - name: "String" + name: "Composite", + className: "InstanceViewStatus" + } + } + } + } +}; + +export const VirtualMachinePatchStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachinePatchStatus", + modelProperties: { + availablePatchSummary: { + serializedName: "availablePatchSummary", + type: { + name: "Composite", + className: "AvailablePatchSummary" } }, - kbId: { - readOnly: true, - serializedName: "kbId", + lastPatchInstallationSummary: { + serializedName: "lastPatchInstallationSummary", type: { - name: "String" + name: "Composite", + className: "LastPatchInstallationSummary" } }, - classifications: { + configurationStatuses: { + serializedName: "configurationStatuses", readOnly: true, - serializedName: "classifications", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "InstanceViewStatus" } } } - }, - rebootBehavior: { + } + } + } +}; + +export const AvailablePatchSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailablePatchSummary", + modelProperties: { + status: { + serializedName: "status", readOnly: true, - serializedName: "rebootBehavior", type: { name: "String" } }, - activityId: { + assessmentActivityId: { + serializedName: "assessmentActivityId", readOnly: true, - serializedName: "activityId", type: { name: "String" } }, - publishedDate: { + rebootPending: { + serializedName: "rebootPending", readOnly: true, - serializedName: "publishedDate", type: { - name: "DateTime" + name: "Boolean" } }, - lastModifiedDateTime: { + criticalAndSecurityPatchCount: { + serializedName: "criticalAndSecurityPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + otherPatchCount: { + serializedName: "otherPatchCount", + readOnly: true, + type: { + name: "Number" + } + }, + startTime: { + serializedName: "startTime", readOnly: true, - serializedName: "lastModifiedDateTime", type: { name: "DateTime" } }, - assessmentState: { + lastModifiedTime: { + serializedName: "lastModifiedTime", readOnly: true, - serializedName: "assessmentState", type: { - name: "String" + name: "DateTime" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ApiError" } } } } }; -export const ApiErrorBase: msRest.CompositeMapper = { - serializedName: "ApiErrorBase", +export const LastPatchInstallationSummary: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApiErrorBase", + className: "LastPatchInstallationSummary", modelProperties: { - code: { - serializedName: "code", + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } }, - target: { - serializedName: "target", + installationActivityId: { + serializedName: "installationActivityId", + readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const InnerError: msRest.CompositeMapper = { - serializedName: "InnerError", - type: { - name: "Composite", - className: "InnerError", - modelProperties: { - exceptiontype: { - serializedName: "exceptiontype", - type: { - name: "String" - } - }, - errordetail: { - serializedName: "errordetail", - type: { - name: "String" - } - } - } - } -}; - -export const ApiError: msRest.CompositeMapper = { - serializedName: "ApiError", - type: { - name: "Composite", - className: "ApiError", - modelProperties: { - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiErrorBase" - } - } - } - }, - innererror: { - serializedName: "innererror", - type: { - name: "Composite", - className: "InnerError" - } - }, - code: { - serializedName: "code", - type: { - name: "String" - } - }, - target: { - serializedName: "target", + maintenanceWindowExceeded: { + serializedName: "maintenanceWindowExceeded", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const VirtualMachineAssessPatchesResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineAssessPatchesResult", - type: { - name: "Composite", - className: "VirtualMachineAssessPatchesResult", - modelProperties: { - status: { + notSelectedPatchCount: { + serializedName: "notSelectedPatchCount", readOnly: true, - serializedName: "status", type: { - name: "String" + name: "Number" } }, - assessmentActivityId: { + excludedPatchCount: { + serializedName: "excludedPatchCount", readOnly: true, - serializedName: "assessmentActivityId", type: { - name: "String" + name: "Number" } }, - rebootPending: { + pendingPatchCount: { + serializedName: "pendingPatchCount", readOnly: true, - serializedName: "rebootPending", type: { - name: "Boolean" + name: "Number" } }, - criticalAndSecurityPatchCount: { + installedPatchCount: { + serializedName: "installedPatchCount", readOnly: true, - serializedName: "criticalAndSecurityPatchCount", type: { name: "Number" } }, - otherPatchCount: { + failedPatchCount: { + serializedName: "failedPatchCount", readOnly: true, - serializedName: "otherPatchCount", type: { name: "Number" } }, - startDateTime: { + startTime: { + serializedName: "startTime", readOnly: true, - serializedName: "startDateTime", type: { name: "DateTime" } }, - availablePatches: { + lastModifiedTime: { + serializedName: "lastModifiedTime", readOnly: true, - serializedName: "availablePatches", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineSoftwarePatchProperties" - } - } + name: "DateTime" } }, error: { - readOnly: true, serializedName: "error", type: { name: "Composite", @@ -2800,197 +2757,133 @@ export const VirtualMachineAssessPatchesResult: msRest.CompositeMapper = { } }; -export const WindowsParameters: msRest.CompositeMapper = { - serializedName: "WindowsParameters", +export const ScheduledEventsProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WindowsParameters", + className: "ScheduledEventsProfile", modelProperties: { - classificationsToInclude: { - serializedName: "classificationsToInclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - kbNumbersToInclude: { - serializedName: "kbNumbersToInclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - kbNumbersToExclude: { - serializedName: "kbNumbersToExclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - excludeKbsRequiringReboot: { - serializedName: "excludeKbsRequiringReboot", - type: { - name: "Boolean" - } - }, - maxPatchPublishDate: { - serializedName: "maxPatchPublishDate", + terminateNotificationProfile: { + serializedName: "terminateNotificationProfile", type: { - name: "DateTime" + name: "Composite", + className: "TerminateNotificationProfile" } } } } }; -export const LinuxParameters: msRest.CompositeMapper = { - serializedName: "LinuxParameters", +export const TerminateNotificationProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinuxParameters", + className: "TerminateNotificationProfile", modelProperties: { - classificationsToInclude: { - serializedName: "classificationsToInclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - packageNameMasksToInclude: { - serializedName: "packageNameMasksToInclude", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - packageNameMasksToExclude: { - serializedName: "packageNameMasksToExclude", + notBeforeTimeout: { + serializedName: "notBeforeTimeout", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - maintenanceRunId: { - serializedName: "maintenanceRunId", + enable: { + serializedName: "enable", type: { - name: "String" + name: "Boolean" } } } } }; -export const VirtualMachineInstallPatchesParameters: msRest.CompositeMapper = { - serializedName: "VirtualMachineInstallPatchesParameters", +export const VirtualMachineIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineInstallPatchesParameters", + className: "VirtualMachineIdentity", modelProperties: { - maximumDuration: { - required: true, - serializedName: "maximumDuration", + principalId: { + serializedName: "principalId", + readOnly: true, type: { name: "String" } }, - rebootSetting: { - required: true, - serializedName: "rebootSetting", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { name: "String" } }, - windowsParameters: { - serializedName: "windowsParameters", + type: { + serializedName: "type", type: { - name: "Composite", - className: "WindowsParameters" + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] } }, - linuxParameters: { - serializedName: "linuxParameters", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "Composite", - className: "LinuxParameters" + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedIdentitiesValue" + } + } } } } } }; -export const PatchInstallationDetail: msRest.CompositeMapper = { - serializedName: "PatchInstallationDetail", +export const UserAssignedIdentitiesValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PatchInstallationDetail", + className: "UserAssignedIdentitiesValue", modelProperties: { - patchId: { + principalId: { + serializedName: "principalId", readOnly: true, - serializedName: "patchId", type: { name: "String" } }, - name: { + clientId: { + serializedName: "clientId", readOnly: true, - serializedName: "name", type: { name: "String" } - }, - version: { - readOnly: true, - serializedName: "version", - type: { - name: "String" - } - }, - kbId: { - readOnly: true, - serializedName: "kbId", - type: { - name: "String" - } - }, - classifications: { - readOnly: true, - serializedName: "classifications", + } + } + } +}; + +export const VirtualMachineScaleSetListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSet" } } } }, - installationState: { - readOnly: true, - serializedName: "installationState", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -2999,188 +2892,106 @@ export const PatchInstallationDetail: msRest.CompositeMapper = { } }; -export const VirtualMachineInstallPatchesResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineInstallPatchesResult", +export const UpgradePolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineInstallPatchesResult", + className: "UpgradePolicy", modelProperties: { - status: { - readOnly: true, - serializedName: "status", - type: { - name: "String" - } - }, - installationActivityId: { - readOnly: true, - serializedName: "installationActivityId", - type: { - name: "String" - } - }, - rebootStatus: { - readOnly: true, - serializedName: "rebootStatus", - type: { - name: "String" - } - }, - maintenanceWindowExceeded: { - readOnly: true, - serializedName: "maintenanceWindowExceeded", - type: { - name: "Boolean" - } - }, - excludedPatchCount: { - readOnly: true, - serializedName: "excludedPatchCount", - type: { - name: "Number" - } - }, - notSelectedPatchCount: { - readOnly: true, - serializedName: "notSelectedPatchCount", - type: { - name: "Number" - } - }, - pendingPatchCount: { - readOnly: true, - serializedName: "pendingPatchCount", - type: { - name: "Number" - } - }, - installedPatchCount: { - readOnly: true, - serializedName: "installedPatchCount", - type: { - name: "Number" - } - }, - failedPatchCount: { - readOnly: true, - serializedName: "failedPatchCount", - type: { - name: "Number" - } - }, - patches: { - readOnly: true, - serializedName: "patches", + mode: { + serializedName: "mode", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PatchInstallationDetail" - } - } + name: "Enum", + allowedValues: ["Automatic", "Manual", "Rolling"] } }, - startDateTime: { - readOnly: true, - serializedName: "startDateTime", + rollingUpgradePolicy: { + serializedName: "rollingUpgradePolicy", type: { - name: "DateTime" + name: "Composite", + className: "RollingUpgradePolicy" } }, - error: { - readOnly: true, - serializedName: "error", + automaticOSUpgradePolicy: { + serializedName: "automaticOSUpgradePolicy", type: { name: "Composite", - className: "ApiError" + className: "AutomaticOSUpgradePolicy" } } } } }; -export const PurchasePlan: msRest.CompositeMapper = { - serializedName: "PurchasePlan", +export const RollingUpgradePolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PurchasePlan", + className: "RollingUpgradePolicy", modelProperties: { - publisher: { - required: true, - serializedName: "publisher", + maxBatchInstancePercent: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 5 + }, + serializedName: "maxBatchInstancePercent", type: { - name: "String" + name: "Number" } }, - name: { - required: true, - serializedName: "name", + maxUnhealthyInstancePercent: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 5 + }, + serializedName: "maxUnhealthyInstancePercent", type: { - name: "String" + name: "Number" } }, - product: { - required: true, - serializedName: "product", + maxUnhealthyUpgradedInstancePercent: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "maxUnhealthyUpgradedInstancePercent", type: { - name: "String" + name: "Number" } }, - promotionCode: { - serializedName: "promotionCode", + pauseTimeBetweenBatches: { + serializedName: "pauseTimeBetweenBatches", type: { name: "String" } - } - } - } -}; - -export const OSDiskImage: msRest.CompositeMapper = { - serializedName: "OSDiskImage", - type: { - name: "Composite", - className: "OSDiskImage", - modelProperties: { - operatingSystem: { - required: true, - serializedName: "operatingSystem", + }, + enableCrossZoneUpgrade: { + serializedName: "enableCrossZoneUpgrade", type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "Boolean" } - } - } - } -}; - -export const DataDiskImage: msRest.CompositeMapper = { - serializedName: "DataDiskImage", - type: { - name: "Composite", - className: "DataDiskImage", - modelProperties: { - lun: { - readOnly: true, - serializedName: "lun", + }, + prioritizeUnhealthyInstances: { + serializedName: "prioritizeUnhealthyInstances", type: { - name: "Number" + name: "Boolean" } } } } }; -export const AutomaticOSUpgradeProperties: msRest.CompositeMapper = { - serializedName: "AutomaticOSUpgradeProperties", +export const AutomaticOSUpgradePolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutomaticOSUpgradeProperties", + className: "AutomaticOSUpgradePolicy", modelProperties: { - automaticOSUpgradeSupported: { - required: true, - serializedName: "automaticOSUpgradeSupported", + enableAutomaticOSUpgrade: { + serializedName: "enableAutomaticOSUpgrade", + type: { + name: "Boolean" + } + }, + disableAutomaticRollback: { + serializedName: "disableAutomaticRollback", type: { name: "Boolean" } @@ -3189,20 +3000,19 @@ export const AutomaticOSUpgradeProperties: msRest.CompositeMapper = { } }; -export const VirtualMachineImageFeature: msRest.CompositeMapper = { - serializedName: "VirtualMachineImageFeature", +export const AutomaticRepairsPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineImageFeature", + className: "AutomaticRepairsPolicy", modelProperties: { - name: { - serializedName: "name", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - value: { - serializedName: "value", + gracePeriod: { + serializedName: "gracePeriod", type: { name: "String" } @@ -3211,221 +3021,181 @@ export const VirtualMachineImageFeature: msRest.CompositeMapper = { } }; -export const VirtualMachineImage: msRest.CompositeMapper = { - serializedName: "VirtualMachineImage", +export const VirtualMachineScaleSetVMProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineImage", + className: "VirtualMachineScaleSetVMProfile", modelProperties: { - ...VirtualMachineImageResource.type.modelProperties, - plan: { - serializedName: "properties.plan", + osProfile: { + serializedName: "osProfile", type: { name: "Composite", - className: "PurchasePlan" + className: "VirtualMachineScaleSetOSProfile" } }, - osDiskImage: { - serializedName: "properties.osDiskImage", + storageProfile: { + serializedName: "storageProfile", type: { name: "Composite", - className: "OSDiskImage" + className: "VirtualMachineScaleSetStorageProfile" } }, - dataDiskImages: { - serializedName: "properties.dataDiskImages", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataDiskImage" - } - } - } - }, - automaticOSUpgradeProperties: { - serializedName: "properties.automaticOSUpgradeProperties", + networkProfile: { + serializedName: "networkProfile", type: { name: "Composite", - className: "AutomaticOSUpgradeProperties" + className: "VirtualMachineScaleSetNetworkProfile" } }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + securityProfile: { + serializedName: "securityProfile", type: { - name: "String" + name: "Composite", + className: "SecurityProfile" } }, - disallowed: { - serializedName: "properties.disallowed", + diagnosticsProfile: { + serializedName: "diagnosticsProfile", type: { name: "Composite", - className: "DisallowedConfiguration" + className: "DiagnosticsProfile" } }, - features: { - serializedName: "properties.features", + extensionProfile: { + serializedName: "extensionProfile", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineImageFeature" - } - } + name: "Composite", + className: "VirtualMachineScaleSetExtensionProfile" } - } - } - } -}; - -export const UsageName: msRest.CompositeMapper = { - serializedName: "UsageName", - type: { - name: "Composite", - className: "UsageName", - modelProperties: { - value: { - serializedName: "value", + }, + licenseType: { + serializedName: "licenseType", type: { name: "String" } }, - localizedValue: { - serializedName: "localizedValue", + priority: { + serializedName: "priority", type: { name: "String" } - } - } - } -}; - -export const Usage: msRest.CompositeMapper = { - serializedName: "Usage", - type: { - name: "Composite", - className: "Usage", - modelProperties: { - unit: { - required: true, - isConstant: true, - serializedName: "unit", - defaultValue: "Count", + }, + evictionPolicy: { + serializedName: "evictionPolicy", type: { name: "String" } }, - currentValue: { - required: true, - serializedName: "currentValue", + billingProfile: { + serializedName: "billingProfile", type: { - name: "Number" + name: "Composite", + className: "BillingProfile" } }, - limit: { - required: true, - serializedName: "limit", + scheduledEventsProfile: { + serializedName: "scheduledEventsProfile", type: { - name: "Number" + name: "Composite", + className: "ScheduledEventsProfile" } }, - name: { - required: true, - serializedName: "name", + userData: { + serializedName: "userData", type: { - name: "Composite", - className: "UsageName" + name: "String" } } } } }; -export const VirtualMachineReimageParameters: msRest.CompositeMapper = { - serializedName: "VirtualMachineReimageParameters", +export const VirtualMachineScaleSetOSProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineReimageParameters", + className: "VirtualMachineScaleSetOSProfile", modelProperties: { - tempDisk: { - serializedName: "tempDisk", + computerNamePrefix: { + serializedName: "computerNamePrefix", type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const VirtualMachineCaptureParameters: msRest.CompositeMapper = { - serializedName: "VirtualMachineCaptureParameters", - type: { - name: "Composite", - className: "VirtualMachineCaptureParameters", - modelProperties: { - vhdPrefix: { - required: true, - serializedName: "vhdPrefix", + }, + adminUsername: { + serializedName: "adminUsername", type: { name: "String" } }, - destinationContainerName: { - required: true, - serializedName: "destinationContainerName", + adminPassword: { + serializedName: "adminPassword", type: { name: "String" } }, - overwriteVhds: { - required: true, - serializedName: "overwriteVhds", + customData: { + serializedName: "customData", type: { - name: "Boolean" + name: "String" + } + }, + windowsConfiguration: { + serializedName: "windowsConfiguration", + type: { + name: "Composite", + className: "WindowsConfiguration" + } + }, + linuxConfiguration: { + serializedName: "linuxConfiguration", + type: { + name: "Composite", + className: "LinuxConfiguration" + } + }, + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VaultSecretGroup" + } + } } } } } }; -export const VirtualMachineCaptureResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineCaptureResult", +export const VirtualMachineScaleSetStorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineCaptureResult", + className: "VirtualMachineScaleSetStorageProfile", modelProperties: { - ...SubResource.type.modelProperties, - schema: { - readOnly: true, - serializedName: "$schema", - type: { - name: "String" - } - }, - contentVersion: { - readOnly: true, - serializedName: "contentVersion", + imageReference: { + serializedName: "imageReference", type: { - name: "String" + name: "Composite", + className: "ImageReference" } }, - parameters: { - readOnly: true, - serializedName: "parameters", + osDisk: { + serializedName: "osDisk", type: { - name: "Object" + name: "Composite", + className: "VirtualMachineScaleSetOSDisk" } }, - resources: { - readOnly: true, - serializedName: "resources", + dataDisks: { + serializedName: "dataDisks", type: { name: "Sequence", element: { type: { - name: "Object" + name: "Composite", + className: "VirtualMachineScaleSetDataDisk" } } } @@ -3434,11 +3204,10 @@ export const VirtualMachineCaptureResult: msRest.CompositeMapper = { } }; -export const Plan: msRest.CompositeMapper = { - serializedName: "Plan", +export const VirtualMachineScaleSetOSDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Plan", + className: "VirtualMachineScaleSetOSDisk", modelProperties: { name: { serializedName: "name", @@ -3446,146 +3215,113 @@ export const Plan: msRest.CompositeMapper = { name: "String" } }, - publisher: { - serializedName: "publisher", + caching: { + serializedName: "caching", type: { - name: "String" + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - product: { - serializedName: "product", + writeAcceleratorEnabled: { + serializedName: "writeAcceleratorEnabled", type: { - name: "String" + name: "Boolean" } }, - promotionCode: { - serializedName: "promotionCode", + createOption: { + serializedName: "createOption", + required: true, type: { name: "String" } - } - } - } -}; - -export const ImageReference: msRest.CompositeMapper = { - serializedName: "ImageReference", - type: { - name: "Composite", - className: "ImageReference", - modelProperties: { - ...SubResource.type.modelProperties, - publisher: { - serializedName: "publisher", + }, + diffDiskSettings: { + serializedName: "diffDiskSettings", type: { - name: "String" + name: "Composite", + className: "DiffDiskSettings" } }, - offer: { - serializedName: "offer", + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "String" + name: "Number" } }, - sku: { - serializedName: "sku", + osType: { + serializedName: "osType", type: { - name: "String" + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - version: { - serializedName: "version", + image: { + serializedName: "image", type: { - name: "String" + name: "Composite", + className: "VirtualHardDisk" } }, - exactVersion: { - readOnly: true, - serializedName: "exactVersion", + vhdContainers: { + serializedName: "vhdContainers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const VirtualHardDisk: msRest.CompositeMapper = { - serializedName: "VirtualHardDisk", - type: { - name: "Composite", - className: "VirtualHardDisk", - modelProperties: { - uri: { - serializedName: "uri", + }, + managedDisk: { + serializedName: "managedDisk", type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetManagedDiskParameters" } } } } }; -export const DiffDiskSettings: msRest.CompositeMapper = { - serializedName: "DiffDiskSettings", +export const VirtualMachineScaleSetManagedDiskParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiffDiskSettings", + className: "VirtualMachineScaleSetManagedDiskParameters", modelProperties: { - option: { - serializedName: "option", + storageAccountType: { + serializedName: "storageAccountType", type: { name: "String" } }, - placement: { - serializedName: "placement", + diskEncryptionSet: { + serializedName: "diskEncryptionSet", type: { - name: "String" + name: "Composite", + className: "DiskEncryptionSetParameters" } } } } }; -export const OSDisk: msRest.CompositeMapper = { - serializedName: "OSDisk", +export const VirtualMachineScaleSetDataDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSDisk", + className: "VirtualMachineScaleSetDataDisk", modelProperties: { - osType: { - serializedName: "osType", - type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] - } - }, - encryptionSettings: { - serializedName: "encryptionSettings", - type: { - name: "Composite", - className: "DiskEncryptionSettings" - } - }, name: { serializedName: "name", type: { name: "String" } }, - vhd: { - serializedName: "vhd", - type: { - name: "Composite", - className: "VirtualHardDisk" - } - }, - image: { - serializedName: "image", + lun: { + serializedName: "lun", + required: true, type: { - name: "Composite", - className: "VirtualHardDisk" + name: "Number" } }, caching: { @@ -3601,16 +3337,9 @@ export const OSDisk: msRest.CompositeMapper = { name: "Boolean" } }, - diffDiskSettings: { - serializedName: "diffDiskSettings", - type: { - name: "Composite", - className: "DiffDiskSettings" - } - }, createOption: { - required: true, serializedName: "createOption", + required: true, type: { name: "String" } @@ -3625,113 +3354,154 @@ export const OSDisk: msRest.CompositeMapper = { serializedName: "managedDisk", type: { name: "Composite", - className: "ManagedDiskParameters" + className: "VirtualMachineScaleSetManagedDiskParameters" } }, - deleteOption: { - serializedName: "deleteOption", + diskIopsReadWrite: { + serializedName: "diskIOPSReadWrite", type: { - name: "String" + name: "Number" + } + }, + diskMBpsReadWrite: { + serializedName: "diskMBpsReadWrite", + type: { + name: "Number" } } } } }; -export const DataDisk: msRest.CompositeMapper = { - serializedName: "DataDisk", +export const VirtualMachineScaleSetNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataDisk", + className: "VirtualMachineScaleSetNetworkProfile", modelProperties: { - lun: { - required: true, - serializedName: "lun", - type: { - name: "Number" - } - }, - name: { - serializedName: "name", + healthProbe: { + serializedName: "healthProbe", type: { - name: "String" + name: "Composite", + className: "ApiEntityReference" } }, - vhd: { - serializedName: "vhd", + networkInterfaceConfigurations: { + serializedName: "networkInterfaceConfigurations", type: { - name: "Composite", - className: "VirtualHardDisk" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfiguration" + } + } } }, - image: { - serializedName: "image", + networkApiVersion: { + serializedName: "networkApiVersion", type: { - name: "Composite", - className: "VirtualHardDisk" + name: "String" } - }, - caching: { - serializedName: "caching", + } + } + } +}; + +export const ApiEntityReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApiEntityReference", + modelProperties: { + id: { + serializedName: "id", type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] + name: "String" } - }, - writeAcceleratorEnabled: { - serializedName: "writeAcceleratorEnabled", + } + } + } +}; + +export const VirtualMachineScaleSetNetworkConfigurationDnsSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - createOption: { + } + } + } +}; + +export const VirtualMachineScaleSetPublicIPAddressConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetPublicIPAddressConfiguration", + modelProperties: { + name: { + serializedName: "name", required: true, - serializedName: "createOption", type: { name: "String" } }, - diskSizeGB: { - serializedName: "diskSizeGB", + sku: { + serializedName: "sku", type: { - name: "Number" + name: "Composite", + className: "PublicIPAddressSku" } }, - managedDisk: { - serializedName: "managedDisk", + idleTimeoutInMinutes: { + serializedName: "properties.idleTimeoutInMinutes", type: { - name: "Composite", - className: "ManagedDiskParameters" + name: "Number" } }, - toBeDetached: { - serializedName: "toBeDetached", + dnsSettings: { + serializedName: "properties.dnsSettings", type: { - name: "Boolean" + name: "Composite", + className: + "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings" } }, - diskIOPSReadWrite: { - readOnly: true, - serializedName: "diskIOPSReadWrite", + ipTags: { + serializedName: "properties.ipTags", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetIpTag" + } + } } }, - diskMBpsReadWrite: { - readOnly: true, - serializedName: "diskMBpsReadWrite", + publicIPPrefix: { + serializedName: "properties.publicIPPrefix", type: { - name: "Number" + name: "Composite", + className: "SubResource" } }, - detachOption: { - serializedName: "detachOption", + publicIPAddressVersion: { + serializedName: "properties.publicIPAddressVersion", type: { name: "String" } }, deleteOption: { - serializedName: "deleteOption", + serializedName: "properties.deleteOption", type: { name: "String" } @@ -3740,72 +3510,62 @@ export const DataDisk: msRest.CompositeMapper = { } }; -export const StorageProfile: msRest.CompositeMapper = { - serializedName: "StorageProfile", +export const VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageProfile", + className: "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", modelProperties: { - imageReference: { - serializedName: "imageReference", + domainNameLabel: { + serializedName: "domainNameLabel", + required: true, type: { - name: "Composite", - className: "ImageReference" + name: "String" } - }, - osDisk: { - serializedName: "osDisk", + } + } + } +}; + +export const VirtualMachineScaleSetIpTag: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetIpTag", + modelProperties: { + ipTagType: { + serializedName: "ipTagType", type: { - name: "Composite", - className: "OSDisk" + name: "String" } }, - dataDisks: { - serializedName: "dataDisks", + tag: { + serializedName: "tag", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataDisk" - } - } + name: "String" } } } } }; -export const AdditionalCapabilities: msRest.CompositeMapper = { - serializedName: "AdditionalCapabilities", +export const VirtualMachineScaleSetExtensionProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AdditionalCapabilities", + className: "VirtualMachineScaleSetExtensionProfile", modelProperties: { - ultraSSDEnabled: { - serializedName: "ultraSSDEnabled", - type: { - name: "Boolean" - } - } - } - } -}; - -export const AutomaticRepairsPolicy: msRest.CompositeMapper = { - serializedName: "AutomaticRepairsPolicy", - type: { - name: "Composite", - className: "AutomaticRepairsPolicy", - modelProperties: { - enabled: { - serializedName: "enabled", + extensions: { + serializedName: "extensions", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetExtension" + } + } } }, - gracePeriod: { - serializedName: "gracePeriod", + extensionsTimeBudget: { + serializedName: "extensionsTimeBudget", type: { name: "String" } @@ -3814,83 +3574,89 @@ export const AutomaticRepairsPolicy: msRest.CompositeMapper = { } }; -export const NetworkInterfaceReference: msRest.CompositeMapper = { - serializedName: "NetworkInterfaceReference", +export const ScaleInPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkInterfaceReference", + className: "ScaleInPolicy", modelProperties: { - ...SubResource.type.modelProperties, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - deleteOption: { - serializedName: "properties.deleteOption", + rules: { + serializedName: "rules", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const VirtualMachineIpTag: msRest.CompositeMapper = { - serializedName: "VirtualMachineIpTag", +export const VirtualMachineScaleSetIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineIpTag", + className: "VirtualMachineScaleSetIdentity", modelProperties: { - ipTagType: { - serializedName: "ipTagType", + principalId: { + serializedName: "principalId", + readOnly: true, type: { name: "String" } }, - tag: { - serializedName: "tag", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const VirtualMachinePublicIPAddressDnsSettingsConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachinePublicIPAddressDnsSettingsConfiguration", - type: { - name: "Composite", - className: "VirtualMachinePublicIPAddressDnsSettingsConfiguration", - modelProperties: { - domainNameLabel: { - required: true, - serializedName: "domainNameLabel", + }, + type: { + serializedName: "type", type: { - name: "String" + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: + "VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue" + } + } } } } } }; -export const PublicIPAddressSku: msRest.CompositeMapper = { - serializedName: "PublicIPAddressSku", +export const VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PublicIPAddressSku", + className: "VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue", modelProperties: { - publicIPAddressSkuName: { - required: true, - serializedName: "publicIPAddressSkuName", + principalId: { + serializedName: "principalId", + readOnly: true, type: { name: "String" } }, - publicIPAddressSkuTier: { - serializedName: "publicIPAddressSkuTier", + clientId: { + serializedName: "clientId", + readOnly: true, type: { name: "String" } @@ -3899,378 +3665,287 @@ export const PublicIPAddressSku: msRest.CompositeMapper = { } }; -export const VirtualMachinePublicIPAddressConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachinePublicIPAddressConfiguration", +export const ImageStorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachinePublicIPAddressConfiguration", + className: "ImageStorageProfile", modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", - type: { - name: "Number" - } - }, - deleteOption: { - serializedName: "properties.deleteOption", - type: { - name: "String" - } - }, - dnsSettings: { - serializedName: "properties.dnsSettings", + osDisk: { + serializedName: "osDisk", type: { name: "Composite", - className: "VirtualMachinePublicIPAddressDnsSettingsConfiguration" + className: "ImageOSDisk" } }, - ipTags: { - serializedName: "properties.ipTags", + dataDisks: { + serializedName: "dataDisks", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineIpTag" + className: "ImageDataDisk" } } } }, - publicIPPrefix: { - serializedName: "properties.publicIPPrefix", - type: { - name: "Composite", - className: "SubResource" - } - }, - publicIPAddressVersion: { - serializedName: "properties.publicIPAddressVersion", - type: { - name: "String" - } - }, - publicIPAllocationMethod: { - serializedName: "properties.publicIPAllocationMethod", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", + zoneResilient: { + serializedName: "zoneResilient", type: { - name: "Composite", - className: "PublicIPAddressSku" + name: "Boolean" } } } } }; -export const VirtualMachineNetworkInterfaceIPConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineNetworkInterfaceIPConfiguration", +export const ImageDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineNetworkInterfaceIPConfiguration", + className: "ImageDisk", modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - subnet: { - serializedName: "properties.subnet", + snapshot: { + serializedName: "snapshot", type: { name: "Composite", className: "SubResource" } }, - primary: { - serializedName: "properties.primary", + managedDisk: { + serializedName: "managedDisk", type: { - name: "Boolean" + name: "Composite", + className: "SubResource" } }, - publicIPAddressConfiguration: { - serializedName: "properties.publicIPAddressConfiguration", + blobUri: { + serializedName: "blobUri", type: { - name: "Composite", - className: "VirtualMachinePublicIPAddressConfiguration" + name: "String" } }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", + caching: { + serializedName: "caching", type: { - name: "String" + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "Number" } }, - applicationGatewayBackendAddressPools: { - serializedName: "properties.applicationGatewayBackendAddressPools", + storageAccountType: { + serializedName: "storageAccountType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "String" } }, - loadBalancerBackendAddressPools: { - serializedName: "properties.loadBalancerBackendAddressPools", + diskEncryptionSet: { + serializedName: "diskEncryptionSet", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "Composite", + className: "DiskEncryptionSetParameters" } } } } }; -export const VirtualMachineNetworkInterfaceDnsSettingsConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration", +export const ImageListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration", + className: "ImageListResult", modelProperties: { - dnsServers: { - serializedName: "dnsServers", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Image" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const VirtualMachineNetworkInterfaceConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineNetworkInterfaceConfiguration", +export const VirtualMachineCaptureParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineNetworkInterfaceConfiguration", + className: "VirtualMachineCaptureParameters", modelProperties: { - name: { + vhdPrefix: { + serializedName: "vhdPrefix", required: true, - serializedName: "name", type: { name: "String" } }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - deleteOption: { - serializedName: "properties.deleteOption", + destinationContainerName: { + serializedName: "destinationContainerName", + required: true, type: { name: "String" } }, - enableAcceleratedNetworking: { - serializedName: "properties.enableAcceleratedNetworking", - type: { - name: "Boolean" - } - }, - enableFpga: { - serializedName: "properties.enableFpga", - type: { - name: "Boolean" - } - }, - enableIPForwarding: { - serializedName: "properties.enableIPForwarding", - type: { - name: "Boolean" - } - }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", - type: { - name: "Composite", - className: "SubResource" - } - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration" - } - }, - ipConfigurations: { + overwriteVhds: { + serializedName: "overwriteVhds", required: true, - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineNetworkInterfaceIPConfiguration" - } - } - } - }, - dscpConfiguration: { - serializedName: "properties.dscpConfiguration", type: { - name: "Composite", - className: "SubResource" + name: "Boolean" } } } } }; -export const NetworkProfile: msRest.CompositeMapper = { - serializedName: "NetworkProfile", +export const RestorePointCollectionSourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkProfile", + className: "RestorePointCollectionSourceProperties", modelProperties: { - networkInterfaces: { - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceReference" - } - } - } - }, - networkApiVersion: { - serializedName: "networkApiVersion", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } }, - networkInterfaceConfigurations: { - serializedName: "networkInterfaceConfigurations", + id: { + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineNetworkInterfaceConfiguration" - } - } + name: "String" } } } } }; -export const BillingProfile: msRest.CompositeMapper = { - serializedName: "BillingProfile", +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingProfile", + className: "ProxyResource", modelProperties: { - maxPrice: { - serializedName: "maxPrice", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Number" + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" } } } } }; -export const VirtualMachineExtensionHandlerInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineExtensionHandlerInstanceView", +export const RestorePointSourceMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineExtensionHandlerInstanceView", + className: "RestorePointSourceMetadata", modelProperties: { - type: { - serializedName: "type", + hardwareProfile: { + serializedName: "hardwareProfile", + type: { + name: "Composite", + className: "HardwareProfile" + } + }, + storageProfile: { + serializedName: "storageProfile", + type: { + name: "Composite", + className: "RestorePointSourceVMStorageProfile" + } + }, + osProfile: { + serializedName: "osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + diagnosticsProfile: { + serializedName: "diagnosticsProfile", + type: { + name: "Composite", + className: "DiagnosticsProfile" + } + }, + licenseType: { + serializedName: "licenseType", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + vmId: { + serializedName: "vmId", type: { name: "String" } }, - status: { - serializedName: "status", + securityProfile: { + serializedName: "securityProfile", type: { name: "Composite", - className: "InstanceViewStatus" + className: "SecurityProfile" + } + }, + location: { + serializedName: "location", + type: { + name: "String" } } } } }; -export const VirtualMachineAgentInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineAgentInstanceView", +export const RestorePointSourceVMStorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineAgentInstanceView", + className: "RestorePointSourceVMStorageProfile", modelProperties: { - vmAgentVersion: { - serializedName: "vmAgentVersion", - type: { - name: "String" - } - }, - extensionHandlers: { - serializedName: "extensionHandlers", + osDisk: { + serializedName: "osDisk", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineExtensionHandlerInstanceView" - } - } + name: "Composite", + className: "RestorePointSourceVmosDisk" } }, - statuses: { - serializedName: "statuses", + dataDisks: { + serializedName: "dataDisks", type: { name: "Sequence", element: { type: { name: "Composite", - className: "InstanceViewStatus" + className: "RestorePointSourceVMDataDisk" } } } @@ -4279,14 +3954,13 @@ export const VirtualMachineAgentInstanceView: msRest.CompositeMapper = { } }; -export const DiskInstanceView: msRest.CompositeMapper = { - serializedName: "DiskInstanceView", +export const RestorePointSourceVmosDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskInstanceView", + className: "RestorePointSourceVmosDisk", modelProperties: { - name: { - serializedName: "name", + osType: { + serializedName: "osType", type: { name: "String" } @@ -4294,175 +3968,147 @@ export const DiskInstanceView: msRest.CompositeMapper = { encryptionSettings: { serializedName: "encryptionSettings", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiskEncryptionSettings" - } - } + name: "Composite", + className: "DiskEncryptionSettings" } }, - statuses: { - serializedName: "statuses", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } + name: "String" } - } - } - } -}; - -export const BootDiagnosticsInstanceView: msRest.CompositeMapper = { - serializedName: "BootDiagnosticsInstanceView", - type: { - name: "Composite", - className: "BootDiagnosticsInstanceView", - modelProperties: { - consoleScreenshotBlobUri: { - readOnly: true, - serializedName: "consoleScreenshotBlobUri", + }, + caching: { + serializedName: "caching", type: { - name: "String" + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - serialConsoleLogBlobUri: { - readOnly: true, - serializedName: "serialConsoleLogBlobUri", + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "String" + name: "Number" } }, - status: { - readOnly: true, - serializedName: "status", + managedDisk: { + serializedName: "managedDisk", type: { name: "Composite", - className: "InstanceViewStatus" + className: "ManagedDiskParameters" + } + }, + diskRestorePoint: { + serializedName: "diskRestorePoint", + type: { + name: "Composite", + className: "ApiEntityReference" } } } } }; -export const VirtualMachineIdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = { - serializedName: "VirtualMachineIdentity_userAssignedIdentitiesValue", +export const RestorePointSourceVMDataDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineIdentityUserAssignedIdentitiesValue", + className: "RestorePointSourceVMDataDisk", modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", + lun: { + serializedName: "lun", type: { - name: "String" + name: "Number" } }, - clientId: { - readOnly: true, - serializedName: "clientId", + name: { + serializedName: "name", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineIdentity: msRest.CompositeMapper = { - serializedName: "VirtualMachineIdentity", - type: { - name: "Composite", - className: "VirtualMachineIdentity", - modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", + }, + caching: { + serializedName: "caching", type: { - name: "String" + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - tenantId: { - readOnly: true, - serializedName: "tenantId", + diskSizeGB: { + serializedName: "diskSizeGB", type: { - name: "String" + name: "Number" } }, - type: { - serializedName: "type", + managedDisk: { + serializedName: "managedDisk", type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None"] + name: "Composite", + className: "ManagedDiskParameters" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + diskRestorePoint: { + serializedName: "diskRestorePoint", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "VirtualMachineIdentityUserAssignedIdentitiesValue" - } - } + name: "Composite", + className: "ApiEntityReference" } } } } }; -export const MaintenanceRedeployStatus: msRest.CompositeMapper = { - serializedName: "MaintenanceRedeployStatus", +export const RestorePointProvisioningDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaintenanceRedeployStatus", + className: "RestorePointProvisioningDetails", modelProperties: { - isCustomerInitiatedMaintenanceAllowed: { - serializedName: "isCustomerInitiatedMaintenanceAllowed", - type: { - name: "Boolean" - } - }, - preMaintenanceWindowStartTime: { - serializedName: "preMaintenanceWindowStartTime", + creationTime: { + serializedName: "creationTime", type: { name: "DateTime" } }, - preMaintenanceWindowEndTime: { - serializedName: "preMaintenanceWindowEndTime", + totalUsedSizeInBytes: { + serializedName: "totalUsedSizeInBytes", type: { - name: "DateTime" + name: "Number" } }, - maintenanceWindowStartTime: { - serializedName: "maintenanceWindowStartTime", + statusCode: { + serializedName: "statusCode", type: { - name: "DateTime" + name: "Number" } }, - maintenanceWindowEndTime: { - serializedName: "maintenanceWindowEndTime", + statusMessage: { + serializedName: "statusMessage", type: { - name: "DateTime" + name: "String" } - }, - lastOperationResultCode: { - serializedName: "lastOperationResultCode", + } + } + } +}; + +export const RestorePointCollectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorePointCollectionListResult", + modelProperties: { + value: { + serializedName: "value", type: { - name: "Enum", - allowedValues: ["None", "RetryLater", "MaintenanceAborted", "MaintenanceCompleted"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorePointCollection" + } + } } }, - lastOperationMessage: { - serializedName: "lastOperationMessage", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -4471,81 +4117,105 @@ export const MaintenanceRedeployStatus: msRest.CompositeMapper = { } }; -export const VirtualMachineHealthStatus: msRest.CompositeMapper = { - serializedName: "VirtualMachineHealthStatus", +export const VirtualMachineReimageParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineHealthStatus", + className: "VirtualMachineReimageParameters", modelProperties: { - status: { + tempDisk: { + serializedName: "tempDisk", + type: { + name: "Boolean" + } + } + } + } +}; + +export const RetrieveBootDiagnosticsDataResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RetrieveBootDiagnosticsDataResult", + modelProperties: { + consoleScreenshotBlobUri: { + serializedName: "consoleScreenshotBlobUri", readOnly: true, - serializedName: "status", type: { - name: "Composite", - className: "InstanceViewStatus" + name: "String" + } + }, + serialConsoleLogBlobUri: { + serializedName: "serialConsoleLogBlobUri", + readOnly: true, + type: { + name: "String" } } } } }; -export const AvailablePatchSummary: msRest.CompositeMapper = { - serializedName: "AvailablePatchSummary", +export const VirtualMachineAssessPatchesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailablePatchSummary", + className: "VirtualMachineAssessPatchesResult", modelProperties: { status: { - readOnly: true, serializedName: "status", + readOnly: true, type: { name: "String" } }, assessmentActivityId: { - readOnly: true, serializedName: "assessmentActivityId", + readOnly: true, type: { name: "String" } }, rebootPending: { - readOnly: true, serializedName: "rebootPending", + readOnly: true, type: { name: "Boolean" } }, criticalAndSecurityPatchCount: { - readOnly: true, serializedName: "criticalAndSecurityPatchCount", + readOnly: true, type: { name: "Number" } }, otherPatchCount: { - readOnly: true, serializedName: "otherPatchCount", + readOnly: true, type: { name: "Number" } }, - startTime: { + startDateTime: { + serializedName: "startDateTime", readOnly: true, - serializedName: "startTime", type: { name: "DateTime" } }, - lastModifiedTime: { + availablePatches: { + serializedName: "availablePatches", readOnly: true, - serializedName: "lastModifiedTime", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineSoftwarePatchProperties" + } + } } }, error: { - readOnly: true, serializedName: "error", type: { name: "Composite", @@ -4556,692 +4226,666 @@ export const AvailablePatchSummary: msRest.CompositeMapper = { } }; -export const LastPatchInstallationSummary: msRest.CompositeMapper = { - serializedName: "LastPatchInstallationSummary", +export const VirtualMachineSoftwarePatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LastPatchInstallationSummary", + className: "VirtualMachineSoftwarePatchProperties", modelProperties: { - status: { + patchId: { + serializedName: "patchId", readOnly: true, - serializedName: "status", type: { name: "String" } }, - installationActivityId: { + name: { + serializedName: "name", readOnly: true, - serializedName: "installationActivityId", type: { name: "String" } }, - maintenanceWindowExceeded: { - readOnly: true, - serializedName: "maintenanceWindowExceeded", - type: { - name: "Boolean" - } - }, - notSelectedPatchCount: { + version: { + serializedName: "version", readOnly: true, - serializedName: "notSelectedPatchCount", type: { - name: "Number" + name: "String" } }, - excludedPatchCount: { + kbId: { + serializedName: "kbId", readOnly: true, - serializedName: "excludedPatchCount", type: { - name: "Number" + name: "String" } }, - pendingPatchCount: { + classifications: { + serializedName: "classifications", readOnly: true, - serializedName: "pendingPatchCount", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - installedPatchCount: { + rebootBehavior: { + serializedName: "rebootBehavior", readOnly: true, - serializedName: "installedPatchCount", type: { - name: "Number" + name: "String" } }, - failedPatchCount: { + activityId: { + serializedName: "activityId", readOnly: true, - serializedName: "failedPatchCount", type: { - name: "Number" + name: "String" } }, - startTime: { + publishedDate: { + serializedName: "publishedDate", readOnly: true, - serializedName: "startTime", type: { name: "DateTime" } }, - lastModifiedTime: { + lastModifiedDateTime: { + serializedName: "lastModifiedDateTime", readOnly: true, - serializedName: "lastModifiedTime", type: { name: "DateTime" } }, - error: { + assessmentState: { + serializedName: "assessmentState", readOnly: true, - serializedName: "error", type: { - name: "Composite", - className: "ApiError" + name: "String" } } } } }; -export const VirtualMachinePatchStatus: msRest.CompositeMapper = { - serializedName: "VirtualMachinePatchStatus", +export const VirtualMachineInstallPatchesParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachinePatchStatus", + className: "VirtualMachineInstallPatchesParameters", modelProperties: { - availablePatchSummary: { - serializedName: "availablePatchSummary", + maximumDuration: { + serializedName: "maximumDuration", + required: true, type: { - name: "Composite", - className: "AvailablePatchSummary" + name: "String" } }, - lastPatchInstallationSummary: { - serializedName: "lastPatchInstallationSummary", + rebootSetting: { + serializedName: "rebootSetting", + required: true, type: { - name: "Composite", - className: "LastPatchInstallationSummary" + name: "String" } }, - configurationStatuses: { - readOnly: true, - serializedName: "configurationStatuses", + windowsParameters: { + serializedName: "windowsParameters", + type: { + name: "Composite", + className: "WindowsParameters" + } + }, + linuxParameters: { + serializedName: "linuxParameters", + type: { + name: "Composite", + className: "LinuxParameters" + } + } + } + } +}; + +export const WindowsParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WindowsParameters", + modelProperties: { + classificationsToInclude: { + serializedName: "classificationsToInclude", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "InstanceViewStatus" + name: "String" + } + } + } + }, + kbNumbersToInclude: { + serializedName: "kbNumbersToInclude", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + kbNumbersToExclude: { + serializedName: "kbNumbersToExclude", + type: { + name: "Sequence", + element: { + type: { + name: "String" } } } + }, + excludeKbsRequiringReboot: { + serializedName: "excludeKbsRequiringReboot", + type: { + name: "Boolean" + } + }, + maxPatchPublishDate: { + serializedName: "maxPatchPublishDate", + type: { + name: "DateTime" + } } } } }; -export const VirtualMachineInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineInstanceView", +export const LinuxParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineInstanceView", + className: "LinuxParameters", modelProperties: { - platformUpdateDomain: { - serializedName: "platformUpdateDomain", + classificationsToInclude: { + serializedName: "classificationsToInclude", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - platformFaultDomain: { - serializedName: "platformFaultDomain", + packageNameMasksToInclude: { + serializedName: "packageNameMasksToInclude", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - computerName: { - serializedName: "computerName", + packageNameMasksToExclude: { + serializedName: "packageNameMasksToExclude", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - osName: { - serializedName: "osName", + maintenanceRunId: { + serializedName: "maintenanceRunId", type: { name: "String" } - }, - osVersion: { - serializedName: "osVersion", + } + } + } +}; + +export const VirtualMachineInstallPatchesResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineInstallPatchesResult", + modelProperties: { + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } }, - hyperVGeneration: { - serializedName: "hyperVGeneration", + installationActivityId: { + serializedName: "installationActivityId", + readOnly: true, type: { name: "String" } }, - rdpThumbPrint: { - serializedName: "rdpThumbPrint", + rebootStatus: { + serializedName: "rebootStatus", + readOnly: true, type: { name: "String" } }, - vmAgent: { - serializedName: "vmAgent", - type: { - name: "Composite", - className: "VirtualMachineAgentInstanceView" - } - }, - maintenanceRedeployStatus: { - serializedName: "maintenanceRedeployStatus", + maintenanceWindowExceeded: { + serializedName: "maintenanceWindowExceeded", + readOnly: true, type: { - name: "Composite", - className: "MaintenanceRedeployStatus" + name: "Boolean" } }, - disks: { - serializedName: "disks", + excludedPatchCount: { + serializedName: "excludedPatchCount", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiskInstanceView" - } - } + name: "Number" } }, - extensions: { - serializedName: "extensions", + notSelectedPatchCount: { + serializedName: "notSelectedPatchCount", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineExtensionInstanceView" - } - } + name: "Number" } }, - vmHealth: { + pendingPatchCount: { + serializedName: "pendingPatchCount", readOnly: true, - serializedName: "vmHealth", type: { - name: "Composite", - className: "VirtualMachineHealthStatus" + name: "Number" } }, - bootDiagnostics: { - serializedName: "bootDiagnostics", + installedPatchCount: { + serializedName: "installedPatchCount", + readOnly: true, type: { - name: "Composite", - className: "BootDiagnosticsInstanceView" + name: "Number" } }, - assignedHost: { + failedPatchCount: { + serializedName: "failedPatchCount", readOnly: true, - serializedName: "assignedHost", type: { - name: "String" + name: "Number" } }, - statuses: { - serializedName: "statuses", + patches: { + serializedName: "patches", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "InstanceViewStatus" + className: "PatchInstallationDetail" } } } }, - patchStatus: { - serializedName: "patchStatus", + startDateTime: { + serializedName: "startDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + error: { + serializedName: "error", type: { name: "Composite", - className: "VirtualMachinePatchStatus" + className: "ApiError" } } } } }; -export const TerminateNotificationProfile: msRest.CompositeMapper = { - serializedName: "TerminateNotificationProfile", +export const PatchInstallationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TerminateNotificationProfile", + className: "PatchInstallationDetail", modelProperties: { - notBeforeTimeout: { - serializedName: "notBeforeTimeout", + patchId: { + serializedName: "patchId", + readOnly: true, type: { name: "String" } }, - enable: { - serializedName: "enable", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Boolean" + name: "String" + } + }, + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + }, + kbId: { + serializedName: "kbId", + readOnly: true, + type: { + name: "String" + } + }, + classifications: { + serializedName: "classifications", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + installationState: { + serializedName: "installationState", + readOnly: true, + type: { + name: "String" } } } } }; -export const ScheduledEventsProfile: msRest.CompositeMapper = { - serializedName: "ScheduledEventsProfile", +export const VirtualMachineScaleSetUpdateVMProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScheduledEventsProfile", + className: "VirtualMachineScaleSetUpdateVMProfile", modelProperties: { - terminateNotificationProfile: { - serializedName: "terminateNotificationProfile", - type: { - name: "Composite", - className: "TerminateNotificationProfile" - } - } - } - } -}; - -export const VirtualMachine: msRest.CompositeMapper = { - serializedName: "VirtualMachine", - type: { - name: "Composite", - className: "VirtualMachine", - modelProperties: { - ...Resource.type.modelProperties, - plan: { - serializedName: "plan", - type: { - name: "Composite", - className: "Plan" - } - }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", + osProfile: { + serializedName: "osProfile", type: { name: "Composite", - className: "HardwareProfile" + className: "VirtualMachineScaleSetUpdateOSProfile" } }, storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - additionalCapabilities: { - serializedName: "properties.additionalCapabilities", - type: { - name: "Composite", - className: "AdditionalCapabilities" - } - }, - osProfile: { - serializedName: "properties.osProfile", + serializedName: "storageProfile", type: { name: "Composite", - className: "OSProfile" + className: "VirtualMachineScaleSetUpdateStorageProfile" } }, networkProfile: { - serializedName: "properties.networkProfile", + serializedName: "networkProfile", type: { name: "Composite", - className: "NetworkProfile" + className: "VirtualMachineScaleSetUpdateNetworkProfile" } }, securityProfile: { - serializedName: "properties.securityProfile", + serializedName: "securityProfile", type: { name: "Composite", className: "SecurityProfile" } }, diagnosticsProfile: { - serializedName: "properties.diagnosticsProfile", + serializedName: "diagnosticsProfile", type: { name: "Composite", className: "DiagnosticsProfile" } }, - availabilitySet: { - serializedName: "properties.availabilitySet", + extensionProfile: { + serializedName: "extensionProfile", type: { name: "Composite", - className: "SubResource" + className: "VirtualMachineScaleSetExtensionProfile" } }, - virtualMachineScaleSet: { - serializedName: "properties.virtualMachineScaleSet", + licenseType: { + serializedName: "licenseType", + type: { + name: "String" + } + }, + billingProfile: { + serializedName: "billingProfile", type: { name: "Composite", - className: "SubResource" + className: "BillingProfile" } }, - proximityPlacementGroup: { - serializedName: "properties.proximityPlacementGroup", + scheduledEventsProfile: { + serializedName: "scheduledEventsProfile", type: { name: "Composite", - className: "SubResource" + className: "ScheduledEventsProfile" } }, - priority: { - serializedName: "properties.priority", + userData: { + serializedName: "userData", type: { name: "String" } - }, - evictionPolicy: { - serializedName: "properties.evictionPolicy", + } + } + } +}; + +export const VirtualMachineScaleSetUpdateOSProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdateOSProfile", + modelProperties: { + customData: { + serializedName: "customData", type: { name: "String" } }, - billingProfile: { - serializedName: "properties.billingProfile", + windowsConfiguration: { + serializedName: "windowsConfiguration", type: { name: "Composite", - className: "BillingProfile" + className: "WindowsConfiguration" } }, - host: { - serializedName: "properties.host", + linuxConfiguration: { + serializedName: "linuxConfiguration", type: { name: "Composite", - className: "SubResource" + className: "LinuxConfiguration" } }, - hostGroup: { - serializedName: "properties.hostGroup", + secrets: { + serializedName: "secrets", type: { - name: "Composite", - className: "SubResource" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VaultSecretGroup" + } + } } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + } + } + } +}; + +export const VirtualMachineScaleSetUpdateStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdateStorageProfile", + modelProperties: { + imageReference: { + serializedName: "imageReference", type: { - name: "String" + name: "Composite", + className: "ImageReference" } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", + osDisk: { + serializedName: "osDisk", type: { name: "Composite", - className: "VirtualMachineInstanceView" + className: "VirtualMachineScaleSetUpdateOSDisk" } }, - licenseType: { - serializedName: "properties.licenseType", + dataDisks: { + serializedName: "dataDisks", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetDataDisk" + } + } } - }, - vmId: { - readOnly: true, - serializedName: "properties.vmId", + } + } + } +}; + +export const VirtualMachineScaleSetUpdateOSDisk: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdateOSDisk", + modelProperties: { + caching: { + serializedName: "caching", type: { - name: "String" + name: "Enum", + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - extensionsTimeBudget: { - serializedName: "properties.extensionsTimeBudget", + writeAcceleratorEnabled: { + serializedName: "writeAcceleratorEnabled", type: { - name: "String" + name: "Boolean" } }, - platformFaultDomain: { - serializedName: "properties.platformFaultDomain", + diskSizeGB: { + serializedName: "diskSizeGB", type: { name: "Number" } }, - scheduledEventsProfile: { - serializedName: "properties.scheduledEventsProfile", + image: { + serializedName: "image", type: { name: "Composite", - className: "ScheduledEventsProfile" - } - }, - userData: { - serializedName: "properties.userData", - type: { - name: "String" + className: "VirtualHardDisk" } }, - resources: { - readOnly: true, - serializedName: "resources", + vhdContainers: { + serializedName: "vhdContainers", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "VirtualMachineExtension" + name: "String" } } } }, - identity: { - serializedName: "identity", + managedDisk: { + serializedName: "managedDisk", type: { name: "Composite", - className: "VirtualMachineIdentity" + className: "VirtualMachineScaleSetManagedDiskParameters" + } + } + } + } +}; + +export const VirtualMachineScaleSetUpdateNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdateNetworkProfile", + modelProperties: { + healthProbe: { + serializedName: "healthProbe", + type: { + name: "Composite", + className: "ApiEntityReference" } }, - zones: { - serializedName: "zones", + networkInterfaceConfigurations: { + serializedName: "networkInterfaceConfigurations", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetUpdateNetworkConfiguration" } } } }, - extendedLocation: { - serializedName: "extendedLocation", + networkApiVersion: { + serializedName: "networkApiVersion", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } } } } }; -export const VirtualMachineUpdate: msRest.CompositeMapper = { - serializedName: "VirtualMachineUpdate", +export const VirtualMachineScaleSetUpdatePublicIPAddressConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineUpdate", + className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration", modelProperties: { - ...UpdateResource.type.modelProperties, - plan: { - serializedName: "plan", + name: { + serializedName: "name", type: { - name: "Composite", - className: "Plan" + name: "String" } }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", - type: { - name: "Composite", - className: "HardwareProfile" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "StorageProfile" - } - }, - additionalCapabilities: { - serializedName: "properties.additionalCapabilities", - type: { - name: "Composite", - className: "AdditionalCapabilities" - } - }, - osProfile: { - serializedName: "properties.osProfile", - type: { - name: "Composite", - className: "OSProfile" - } - }, - networkProfile: { - serializedName: "properties.networkProfile", - type: { - name: "Composite", - className: "NetworkProfile" - } - }, - securityProfile: { - serializedName: "properties.securityProfile", - type: { - name: "Composite", - className: "SecurityProfile" - } - }, - diagnosticsProfile: { - serializedName: "properties.diagnosticsProfile", - type: { - name: "Composite", - className: "DiagnosticsProfile" - } - }, - availabilitySet: { - serializedName: "properties.availabilitySet", - type: { - name: "Composite", - className: "SubResource" - } - }, - virtualMachineScaleSet: { - serializedName: "properties.virtualMachineScaleSet", - type: { - name: "Composite", - className: "SubResource" - } - }, - proximityPlacementGroup: { - serializedName: "properties.proximityPlacementGroup", - type: { - name: "Composite", - className: "SubResource" - } - }, - priority: { - serializedName: "properties.priority", - type: { - name: "String" - } - }, - evictionPolicy: { - serializedName: "properties.evictionPolicy", - type: { - name: "String" - } - }, - billingProfile: { - serializedName: "properties.billingProfile", - type: { - name: "Composite", - className: "BillingProfile" - } - }, - host: { - serializedName: "properties.host", - type: { - name: "Composite", - className: "SubResource" - } - }, - hostGroup: { - serializedName: "properties.hostGroup", - type: { - name: "Composite", - className: "SubResource" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", - type: { - name: "Composite", - className: "VirtualMachineInstanceView" - } - }, - licenseType: { - serializedName: "properties.licenseType", - type: { - name: "String" - } - }, - vmId: { - readOnly: true, - serializedName: "properties.vmId", - type: { - name: "String" - } - }, - extensionsTimeBudget: { - serializedName: "properties.extensionsTimeBudget", - type: { - name: "String" - } - }, - platformFaultDomain: { - serializedName: "properties.platformFaultDomain", + idleTimeoutInMinutes: { + serializedName: "properties.idleTimeoutInMinutes", type: { name: "Number" } }, - scheduledEventsProfile: { - serializedName: "properties.scheduledEventsProfile", + dnsSettings: { + serializedName: "properties.dnsSettings", type: { name: "Composite", - className: "ScheduledEventsProfile" + className: + "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings" } }, - userData: { - serializedName: "properties.userData", + deleteOption: { + serializedName: "properties.deleteOption", type: { name: "String" } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "VirtualMachineIdentity" - } - }, - zones: { - serializedName: "zones", + } + } + } +}; + +export const VirtualMachineScaleSetVMInstanceIDs: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMInstanceIDs", + modelProperties: { + instanceIds: { + serializedName: "instanceIds", type: { name: "Sequence", element: { @@ -5255,130 +4899,95 @@ export const VirtualMachineUpdate: msRest.CompositeMapper = { } }; -export const AutomaticOSUpgradePolicy: msRest.CompositeMapper = { - serializedName: "AutomaticOSUpgradePolicy", +export const VirtualMachineScaleSetVMInstanceRequiredIDs: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutomaticOSUpgradePolicy", + className: "VirtualMachineScaleSetVMInstanceRequiredIDs", modelProperties: { - enableAutomaticOSUpgrade: { - serializedName: "enableAutomaticOSUpgrade", - type: { - name: "Boolean" - } - }, - disableAutomaticRollback: { - serializedName: "disableAutomaticRollback", + instanceIds: { + serializedName: "instanceIds", + required: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const RollingUpgradePolicy: msRest.CompositeMapper = { - serializedName: "RollingUpgradePolicy", +export const VirtualMachineScaleSetInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RollingUpgradePolicy", + className: "VirtualMachineScaleSetInstanceView", modelProperties: { - maxBatchInstancePercent: { - serializedName: "maxBatchInstancePercent", - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 5 - }, - type: { - name: "Number" - } - }, - maxUnhealthyInstancePercent: { - serializedName: "maxUnhealthyInstancePercent", - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 5 - }, - type: { - name: "Number" - } - }, - maxUnhealthyUpgradedInstancePercent: { - serializedName: "maxUnhealthyUpgradedInstancePercent", - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - pauseTimeBetweenBatches: { - serializedName: "pauseTimeBetweenBatches", - type: { - name: "String" - } - }, - enableCrossZoneUpgrade: { - serializedName: "enableCrossZoneUpgrade", + virtualMachine: { + serializedName: "virtualMachine", type: { - name: "Boolean" + name: "Composite", + className: "VirtualMachineScaleSetInstanceViewStatusesSummary" } }, - prioritizeUnhealthyInstances: { - serializedName: "prioritizeUnhealthyInstances", - type: { - name: "Boolean" - } - } - } - } -}; - -export const UpgradePolicy: msRest.CompositeMapper = { - serializedName: "UpgradePolicy", - type: { - name: "Composite", - className: "UpgradePolicy", - modelProperties: { - mode: { - serializedName: "mode", + extensions: { + serializedName: "extensions", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Automatic", "Manual", "Rolling"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMExtensionsSummary" + } + } } }, - rollingUpgradePolicy: { - serializedName: "rollingUpgradePolicy", + statuses: { + serializedName: "statuses", type: { - name: "Composite", - className: "RollingUpgradePolicy" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } }, - automaticOSUpgradePolicy: { - serializedName: "automaticOSUpgradePolicy", + orchestrationServices: { + serializedName: "orchestrationServices", + readOnly: true, type: { - name: "Composite", - className: "AutomaticOSUpgradePolicy" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OrchestrationServiceSummary" + } + } } } } } }; -export const ScaleInPolicy: msRest.CompositeMapper = { - serializedName: "ScaleInPolicy", +export const VirtualMachineScaleSetInstanceViewStatusesSummary: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleInPolicy", + className: "VirtualMachineScaleSetInstanceViewStatusesSummary", modelProperties: { - rules: { - serializedName: "rules", + statusesSummary: { + serializedName: "statusesSummary", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachineStatusCodeCount" } } } @@ -5387,241 +4996,253 @@ export const ScaleInPolicy: msRest.CompositeMapper = { } }; -export const ImageDisk: msRest.CompositeMapper = { - serializedName: "ImageDisk", +export const VirtualMachineStatusCodeCount: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageDisk", + className: "VirtualMachineStatusCodeCount", modelProperties: { - snapshot: { - serializedName: "snapshot", + code: { + serializedName: "code", + readOnly: true, type: { - name: "Composite", - className: "SubResource" + name: "String" } }, - managedDisk: { - serializedName: "managedDisk", + count: { + serializedName: "count", + readOnly: true, type: { - name: "Composite", - className: "SubResource" + name: "Number" } - }, - blobUri: { - serializedName: "blobUri", + } + } + } +}; + +export const VirtualMachineScaleSetVMExtensionsSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMExtensionsSummary", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - caching: { - serializedName: "caching", - type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] - } - }, - diskSizeGB: { - serializedName: "diskSizeGB", + statusesSummary: { + serializedName: "statusesSummary", + readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineStatusCodeCount" + } + } } - }, - storageAccountType: { - serializedName: "storageAccountType", + } + } + } +}; + +export const OrchestrationServiceSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OrchestrationServiceSummary", + modelProperties: { + serviceName: { + serializedName: "serviceName", + readOnly: true, type: { name: "String" } }, - diskEncryptionSet: { - serializedName: "diskEncryptionSet", + serviceState: { + serializedName: "serviceState", + readOnly: true, type: { - name: "Composite", - className: "DiskEncryptionSetParameters" + name: "String" } } } } }; -export const ImageOSDisk: msRest.CompositeMapper = { - serializedName: "ImageOSDisk", +export const VirtualMachineScaleSetExtensionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageOSDisk", + className: "VirtualMachineScaleSetExtensionListResult", modelProperties: { - ...ImageDisk.type.modelProperties, - osType: { + value: { + serializedName: "value", required: true, - serializedName: "osType", type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetExtension" + } + } } }, - osState: { - required: true, - serializedName: "osState", + nextLink: { + serializedName: "nextLink", type: { - name: "Enum", - allowedValues: ["Generalized", "Specialized"] + name: "String" } } } } }; -export const ImageDataDisk: msRest.CompositeMapper = { - serializedName: "ImageDataDisk", +export const VirtualMachineScaleSetListWithLinkResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageDataDisk", + className: "VirtualMachineScaleSetListWithLinkResult", modelProperties: { - ...ImageDisk.type.modelProperties, - lun: { + value: { + serializedName: "value", required: true, - serializedName: "lun", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSet" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const ImageStorageProfile: msRest.CompositeMapper = { - serializedName: "ImageStorageProfile", +export const VirtualMachineScaleSetListSkusResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageStorageProfile", + className: "VirtualMachineScaleSetListSkusResult", modelProperties: { - osDisk: { - serializedName: "osDisk", - type: { - name: "Composite", - className: "ImageOSDisk" - } - }, - dataDisks: { - serializedName: "dataDisks", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ImageDataDisk" + className: "VirtualMachineScaleSetSku" } } } }, - zoneResilient: { - serializedName: "zoneResilient", + nextLink: { + serializedName: "nextLink", type: { - name: "Boolean" + name: "String" } } } } }; -export const Image: msRest.CompositeMapper = { - serializedName: "Image", +export const VirtualMachineScaleSetSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Image", + className: "VirtualMachineScaleSetSku", modelProperties: { - ...Resource.type.modelProperties, - sourceVirtualMachine: { - serializedName: "properties.sourceVirtualMachine", - type: { - name: "Composite", - className: "SubResource" - } - }, - storageProfile: { - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "ImageStorageProfile" - } - }, - provisioningState: { + resourceType: { + serializedName: "resourceType", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } }, - extendedLocation: { - serializedName: "extendedLocation", + capacity: { + serializedName: "capacity", type: { name: "Composite", - className: "ExtendedLocation" + className: "VirtualMachineScaleSetSkuCapacity" } } } } }; -export const ImageUpdate: msRest.CompositeMapper = { - serializedName: "ImageUpdate", +export const VirtualMachineScaleSetSkuCapacity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageUpdate", + className: "VirtualMachineScaleSetSkuCapacity", modelProperties: { - ...UpdateResource.type.modelProperties, - sourceVirtualMachine: { - serializedName: "properties.sourceVirtualMachine", + minimum: { + serializedName: "minimum", + readOnly: true, type: { - name: "Composite", - className: "SubResource" + name: "Number" } }, - storageProfile: { - serializedName: "properties.storageProfile", + maximum: { + serializedName: "maximum", + readOnly: true, type: { - name: "Composite", - className: "ImageStorageProfile" + name: "Number" } }, - provisioningState: { + defaultCapacity: { + serializedName: "defaultCapacity", readOnly: true, - serializedName: "properties.provisioningState", type: { - name: "String" + name: "Number" } }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + scaleType: { + serializedName: "scaleType", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Automatic", "None"] } } } } }; -export const VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetIdentity_userAssignedIdentitiesValue", +export const VirtualMachineScaleSetListOSUpgradeHistory: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue", + className: "VirtualMachineScaleSetListOSUpgradeHistory", modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpgradeOperationHistoricalStatusInfo" + } + } } }, - clientId: { - readOnly: true, - serializedName: "clientId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -5630,441 +5251,424 @@ export const VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue: msRest.C } }; -export const VirtualMachineScaleSetIdentity: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetIdentity", +export const UpgradeOperationHistoricalStatusInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetIdentity", + className: "UpgradeOperationHistoricalStatusInfo", modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { - readOnly: true, - serializedName: "tenantId", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "UpgradeOperationHistoricalStatusInfoProperties" } }, type: { serializedName: "type", + readOnly: true, type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None"] + name: "String" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + location: { + serializedName: "location", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue" - } - } + name: "String" } } } } }; -export const VirtualMachineScaleSetOSProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetOSProfile", +export const UpgradeOperationHistoricalStatusInfoProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetOSProfile", + className: "UpgradeOperationHistoricalStatusInfoProperties", modelProperties: { - computerNamePrefix: { - serializedName: "computerNamePrefix", + runningStatus: { + serializedName: "runningStatus", type: { - name: "String" + name: "Composite", + className: "UpgradeOperationHistoryStatus" } }, - adminUsername: { - serializedName: "adminUsername", + progress: { + serializedName: "progress", type: { - name: "String" + name: "Composite", + className: "RollingUpgradeProgressInfo" } }, - adminPassword: { - serializedName: "adminPassword", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ApiError" } }, - customData: { - serializedName: "customData", + startedBy: { + serializedName: "startedBy", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Unknown", "User", "Platform"] } }, - windowsConfiguration: { - serializedName: "windowsConfiguration", + targetImageReference: { + serializedName: "targetImageReference", + type: { + name: "Composite", + className: "ImageReference" + } + }, + rollbackInfo: { + serializedName: "rollbackInfo", + type: { + name: "Composite", + className: "RollbackStatusInfo" + } + } + } + } +}; + +export const UpgradeOperationHistoryStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpgradeOperationHistoryStatus", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, type: { - name: "Composite", - className: "WindowsConfiguration" + name: "Enum", + allowedValues: ["RollingForward", "Cancelled", "Completed", "Faulted"] } }, - linuxConfiguration: { - serializedName: "linuxConfiguration", + startTime: { + serializedName: "startTime", + readOnly: true, type: { - name: "Composite", - className: "LinuxConfiguration" + name: "DateTime" } }, - secrets: { - serializedName: "secrets", + endTime: { + serializedName: "endTime", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VaultSecretGroup" - } - } + name: "DateTime" } } } } }; -export const VirtualMachineScaleSetUpdateOSProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateOSProfile", +export const RollingUpgradeProgressInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateOSProfile", + className: "RollingUpgradeProgressInfo", modelProperties: { - customData: { - serializedName: "customData", + successfulInstanceCount: { + serializedName: "successfulInstanceCount", + readOnly: true, type: { - name: "String" + name: "Number" } }, - windowsConfiguration: { - serializedName: "windowsConfiguration", + failedInstanceCount: { + serializedName: "failedInstanceCount", + readOnly: true, type: { - name: "Composite", - className: "WindowsConfiguration" + name: "Number" } }, - linuxConfiguration: { - serializedName: "linuxConfiguration", + inProgressInstanceCount: { + serializedName: "inProgressInstanceCount", + readOnly: true, type: { - name: "Composite", - className: "LinuxConfiguration" + name: "Number" } }, - secrets: { - serializedName: "secrets", + pendingInstanceCount: { + serializedName: "pendingInstanceCount", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VaultSecretGroup" - } - } + name: "Number" } } } } }; -export const VirtualMachineScaleSetManagedDiskParameters: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetManagedDiskParameters", +export const RollbackStatusInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetManagedDiskParameters", + className: "RollbackStatusInfo", modelProperties: { - storageAccountType: { - serializedName: "storageAccountType", + successfullyRolledbackInstanceCount: { + serializedName: "successfullyRolledbackInstanceCount", + readOnly: true, type: { - name: "String" + name: "Number" } }, - diskEncryptionSet: { - serializedName: "diskEncryptionSet", + failedRolledbackInstanceCount: { + serializedName: "failedRolledbackInstanceCount", + readOnly: true, + type: { + name: "Number" + } + }, + rollbackError: { + serializedName: "rollbackError", type: { name: "Composite", - className: "DiskEncryptionSetParameters" + className: "ApiError" } } } } }; -export const VirtualMachineScaleSetOSDisk: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetOSDisk", +export const RollingUpgradeRunningStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetOSDisk", + className: "RollingUpgradeRunningStatus", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - caching: { - serializedName: "caching", + code: { + serializedName: "code", + readOnly: true, type: { name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] - } - }, - writeAcceleratorEnabled: { - serializedName: "writeAcceleratorEnabled", - type: { - name: "Boolean" - } - }, - createOption: { - required: true, - serializedName: "createOption", - type: { - name: "String" - } - }, - diffDiskSettings: { - serializedName: "diffDiskSettings", - type: { - name: "Composite", - className: "DiffDiskSettings" + allowedValues: ["RollingForward", "Cancelled", "Completed", "Faulted"] } }, - diskSizeGB: { - serializedName: "diskSizeGB", + startTime: { + serializedName: "startTime", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - osType: { - serializedName: "osType", + lastAction: { + serializedName: "lastAction", + readOnly: true, type: { name: "Enum", - allowedValues: ["Windows", "Linux"] + allowedValues: ["Start", "Cancel"] } }, - image: { - serializedName: "image", + lastActionTime: { + serializedName: "lastActionTime", + readOnly: true, type: { - name: "Composite", - className: "VirtualHardDisk" + name: "DateTime" } - }, - vhdContainers: { - serializedName: "vhdContainers", + } + } + } +}; + +export const RecoveryWalkResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoveryWalkResponse", + modelProperties: { + walkPerformed: { + serializedName: "walkPerformed", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - managedDisk: { - serializedName: "managedDisk", + nextPlatformUpdateDomain: { + serializedName: "nextPlatformUpdateDomain", + readOnly: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetManagedDiskParameters" + name: "Number" } } } } }; -export const VirtualMachineScaleSetUpdateOSDisk: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateOSDisk", +export const VMScaleSetConvertToSinglePlacementGroupInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateOSDisk", + className: "VMScaleSetConvertToSinglePlacementGroupInput", modelProperties: { - caching: { - serializedName: "caching", - type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] - } - }, - writeAcceleratorEnabled: { - serializedName: "writeAcceleratorEnabled", + activePlacementGroupId: { + serializedName: "activePlacementGroupId", type: { - name: "Boolean" + name: "String" } - }, - diskSizeGB: { - serializedName: "diskSizeGB", + } + } + } +}; + +export const OrchestrationServiceStateInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OrchestrationServiceStateInput", + modelProperties: { + serviceName: { + serializedName: "serviceName", + required: true, type: { - name: "Number" + name: "String" } }, - image: { - serializedName: "image", + action: { + serializedName: "action", + required: true, type: { - name: "Composite", - className: "VirtualHardDisk" + name: "String" } - }, - vhdContainers: { - serializedName: "vhdContainers", + } + } + } +}; + +export const VirtualMachineScaleSetVMExtensionsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMExtensionsListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetVMExtension" } } } - }, - managedDisk: { - serializedName: "managedDisk", - type: { - name: "Composite", - className: "VirtualMachineScaleSetManagedDiskParameters" - } } } } }; -export const VirtualMachineScaleSetDataDisk: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetDataDisk", +export const VirtualMachineScaleSetVMInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetDataDisk", + className: "VirtualMachineScaleSetVMInstanceView", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - lun: { - required: true, - serializedName: "lun", + platformUpdateDomain: { + serializedName: "platformUpdateDomain", type: { name: "Number" } }, - caching: { - serializedName: "caching", - type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] - } - }, - writeAcceleratorEnabled: { - serializedName: "writeAcceleratorEnabled", + platformFaultDomain: { + serializedName: "platformFaultDomain", type: { - name: "Boolean" + name: "Number" } }, - createOption: { - required: true, - serializedName: "createOption", + rdpThumbPrint: { + serializedName: "rdpThumbPrint", type: { name: "String" } }, - diskSizeGB: { - serializedName: "diskSizeGB", + vmAgent: { + serializedName: "vmAgent", type: { - name: "Number" + name: "Composite", + className: "VirtualMachineAgentInstanceView" } }, - managedDisk: { - serializedName: "managedDisk", + maintenanceRedeployStatus: { + serializedName: "maintenanceRedeployStatus", type: { name: "Composite", - className: "VirtualMachineScaleSetManagedDiskParameters" + className: "MaintenanceRedeployStatus" } }, - diskIOPSReadWrite: { - serializedName: "diskIOPSReadWrite", + disks: { + serializedName: "disks", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskInstanceView" + } + } } }, - diskMBpsReadWrite: { - serializedName: "diskMBpsReadWrite", + extensions: { + serializedName: "extensions", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineExtensionInstanceView" + } + } } - } - } - } -}; - -export const VirtualMachineScaleSetStorageProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetStorageProfile", - type: { - name: "Composite", - className: "VirtualMachineScaleSetStorageProfile", - modelProperties: { - imageReference: { - serializedName: "imageReference", + }, + vmHealth: { + serializedName: "vmHealth", type: { name: "Composite", - className: "ImageReference" + className: "VirtualMachineHealthStatus" } }, - osDisk: { - serializedName: "osDisk", + bootDiagnostics: { + serializedName: "bootDiagnostics", type: { name: "Composite", - className: "VirtualMachineScaleSetOSDisk" + className: "BootDiagnosticsInstanceView" } }, - dataDisks: { - serializedName: "dataDisks", + statuses: { + serializedName: "statuses", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineScaleSetDataDisk" + className: "InstanceViewStatus" } } } + }, + assignedHost: { + serializedName: "assignedHost", + readOnly: true, + type: { + name: "String" + } + }, + placementGroupId: { + serializedName: "placementGroupId", + type: { + name: "String" + } } } } }; -export const VirtualMachineScaleSetUpdateStorageProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateStorageProfile", +export const VirtualMachineScaleSetVMNetworkProfileConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateStorageProfile", + className: "VirtualMachineScaleSetVMNetworkProfileConfiguration", modelProperties: { - imageReference: { - serializedName: "imageReference", - type: { - name: "Composite", - className: "ImageReference" - } - }, - osDisk: { - serializedName: "osDisk", - type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdateOSDisk" - } - }, - dataDisks: { - serializedName: "dataDisks", + networkInterfaceConfigurations: { + serializedName: "networkInterfaceConfigurations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineScaleSetDataDisk" + className: "VirtualMachineScaleSetNetworkConfiguration" } } } @@ -6073,37 +5677,47 @@ export const VirtualMachineScaleSetUpdateStorageProfile: msRest.CompositeMapper } }; -export const VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", +export const VirtualMachineScaleSetVMProtectionPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", + className: "VirtualMachineScaleSetVMProtectionPolicy", modelProperties: { - domainNameLabel: { - required: true, - serializedName: "domainNameLabel", + protectFromScaleIn: { + serializedName: "protectFromScaleIn", type: { - name: "String" + name: "Boolean" + } + }, + protectFromScaleSetActions: { + serializedName: "protectFromScaleSetActions", + type: { + name: "Boolean" } } } } }; -export const VirtualMachineScaleSetIpTag: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetIpTag", +export const VirtualMachineScaleSetVMListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetIpTag", + className: "VirtualMachineScaleSetVMListResult", modelProperties: { - ipTagType: { - serializedName: "ipTagType", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetVM" + } + } } }, - tag: { - serializedName: "tag", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -6112,101 +5726,118 @@ export const VirtualMachineScaleSetIpTag: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetPublicIPAddressConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetPublicIPAddressConfiguration", +export const LogAnalyticsInputBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfiguration", + className: "LogAnalyticsInputBase", modelProperties: { - name: { + blobContainerSasUri: { + serializedName: "blobContainerSasUri", required: true, - serializedName: "name", type: { name: "String" } }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", + fromTime: { + serializedName: "fromTime", + required: true, type: { - name: "Number" + name: "DateTime" } }, - dnsSettings: { - serializedName: "properties.dnsSettings", + toTime: { + serializedName: "toTime", + required: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings" + name: "DateTime" } }, - ipTags: { - serializedName: "properties.ipTags", + groupByThrottlePolicy: { + serializedName: "groupByThrottlePolicy", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetIpTag" - } - } + name: "Boolean" } }, - publicIPPrefix: { - serializedName: "properties.publicIPPrefix", + groupByOperationName: { + serializedName: "groupByOperationName", type: { - name: "Composite", - className: "SubResource" + name: "Boolean" } }, - publicIPAddressVersion: { - serializedName: "properties.publicIPAddressVersion", + groupByResourceName: { + serializedName: "groupByResourceName", type: { - name: "String" + name: "Boolean" } }, - deleteOption: { - serializedName: "properties.deleteOption", + groupByClientApplicationId: { + serializedName: "groupByClientApplicationId", type: { - name: "String" + name: "Boolean" } }, - sku: { - serializedName: "sku", + groupByUserAgent: { + serializedName: "groupByUserAgent", type: { - name: "Composite", - className: "PublicIPAddressSku" + name: "Boolean" } } } } }; -export const VirtualMachineScaleSetUpdatePublicIPAddressConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration", +export const LogAnalyticsOperationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration", + className: "LogAnalyticsOperationResult", modelProperties: { - name: { - serializedName: "name", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "LogAnalyticsOutput" } - }, - idleTimeoutInMinutes: { - serializedName: "properties.idleTimeoutInMinutes", + } + } + } +}; + +export const LogAnalyticsOutput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogAnalyticsOutput", + modelProperties: { + output: { + serializedName: "output", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - dnsSettings: { - serializedName: "properties.dnsSettings", + } + } + } +}; + +export const RunCommandListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandDocumentBase" + } + } } }, - deleteOption: { - serializedName: "properties.deleteOption", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -6215,202 +5846,161 @@ export const VirtualMachineScaleSetUpdatePublicIPAddressConfiguration: msRest.Co } }; -export const VirtualMachineScaleSetIPConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetIPConfiguration", +export const RunCommandDocumentBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetIPConfiguration", + className: "RunCommandDocumentBase", modelProperties: { - ...SubResource.type.modelProperties, - name: { + schema: { + serializedName: "$schema", required: true, - serializedName: "name", type: { name: "String" } }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "Composite", - className: "ApiEntityReference" - } - }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - publicIPAddressConfiguration: { - serializedName: "properties.publicIPAddressConfiguration", - type: { - name: "Composite", - className: "VirtualMachineScaleSetPublicIPAddressConfiguration" - } - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", + id: { + serializedName: "id", + required: true, type: { name: "String" } }, - applicationGatewayBackendAddressPools: { - serializedName: "properties.applicationGatewayBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } - } - }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", + osType: { + serializedName: "osType", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - loadBalancerBackendAddressPools: { - serializedName: "properties.loadBalancerBackendAddressPools", + label: { + serializedName: "label", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "String" } }, - loadBalancerInboundNatPools: { - serializedName: "properties.loadBalancerInboundNatPools", + description: { + serializedName: "description", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "String" } } } } }; -export const VirtualMachineScaleSetUpdateIPConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateIPConfiguration", +export const RunCommandParameterDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateIPConfiguration", + className: "RunCommandParameterDefinition", modelProperties: { - ...SubResource.type.modelProperties, name: { serializedName: "name", + required: true, type: { name: "String" } }, - subnet: { - serializedName: "properties.subnet", + type: { + serializedName: "type", + required: true, type: { - name: "Composite", - className: "ApiEntityReference" + name: "String" } }, - primary: { - serializedName: "properties.primary", + defaultValue: { + serializedName: "defaultValue", type: { - name: "Boolean" + name: "String" } }, - publicIPAddressConfiguration: { - serializedName: "properties.publicIPAddressConfiguration", + required: { + serializedName: "required", type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration" + name: "Boolean" } - }, - privateIPAddressVersion: { - serializedName: "properties.privateIPAddressVersion", + } + } + } +}; + +export const RunCommandInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandInput", + modelProperties: { + commandId: { + serializedName: "commandId", + required: true, type: { name: "String" } }, - applicationGatewayBackendAddressPools: { - serializedName: "properties.applicationGatewayBackendAddressPools", + script: { + serializedName: "script", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SubResource" + name: "String" } } } }, - applicationSecurityGroups: { - serializedName: "properties.applicationSecurityGroups", + parameters: { + serializedName: "parameters", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SubResource" + className: "RunCommandInputParameter" } } } - }, - loadBalancerBackendAddressPools: { - serializedName: "properties.loadBalancerBackendAddressPools", + } + } + } +}; + +export const RunCommandInputParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RunCommandInputParameter", + modelProperties: { + name: { + serializedName: "name", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "String" } }, - loadBalancerInboundNatPools: { - serializedName: "properties.loadBalancerInboundNatPools", + value: { + serializedName: "value", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource" - } - } + name: "String" } } } } }; -export const VirtualMachineScaleSetNetworkConfigurationDnsSettings: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetNetworkConfigurationDnsSettings", +export const RunCommandResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings", + className: "RunCommandResult", modelProperties: { - dnsServers: { - serializedName: "dnsServers", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "InstanceViewStatus" } } } @@ -6419,73 +6009,25 @@ export const VirtualMachineScaleSetNetworkConfigurationDnsSettings: msRest.Compo } }; -export const VirtualMachineScaleSetNetworkConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetNetworkConfiguration", +export const VirtualMachineRunCommandScriptSource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetNetworkConfiguration", + className: "VirtualMachineRunCommandScriptSource", modelProperties: { - ...SubResource.type.modelProperties, - name: { - required: true, - serializedName: "name", + script: { + serializedName: "script", type: { name: "String" } }, - primary: { - serializedName: "properties.primary", - type: { - name: "Boolean" - } - }, - enableAcceleratedNetworking: { - serializedName: "properties.enableAcceleratedNetworking", - type: { - name: "Boolean" - } - }, - enableFpga: { - serializedName: "properties.enableFpga", - type: { - name: "Boolean" - } - }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", - type: { - name: "Composite", - className: "SubResource" - } - }, - dnsSettings: { - serializedName: "properties.dnsSettings", - type: { - name: "Composite", - className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" - } - }, - ipConfigurations: { - required: true, - serializedName: "properties.ipConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetIPConfiguration" - } - } - } - }, - enableIPForwarding: { - serializedName: "properties.enableIPForwarding", + scriptUri: { + serializedName: "scriptUri", type: { - name: "Boolean" + name: "String" } }, - deleteOption: { - serializedName: "properties.deleteOption", + commandId: { + serializedName: "commandId", type: { name: "String" } @@ -6494,106 +6036,89 @@ export const VirtualMachineScaleSetNetworkConfiguration: msRest.CompositeMapper } }; -export const VirtualMachineScaleSetUpdateNetworkConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateNetworkConfiguration", +export const VirtualMachineRunCommandInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateNetworkConfiguration", + className: "VirtualMachineRunCommandInstanceView", modelProperties: { - ...SubResource.type.modelProperties, - name: { - serializedName: "name", + executionState: { + serializedName: "executionState", type: { name: "String" } }, - primary: { - serializedName: "properties.primary", + executionMessage: { + serializedName: "executionMessage", type: { - name: "Boolean" + name: "String" } }, - enableAcceleratedNetworking: { - serializedName: "properties.enableAcceleratedNetworking", + exitCode: { + serializedName: "exitCode", type: { - name: "Boolean" + name: "Number" } }, - enableFpga: { - serializedName: "properties.enableFpga", + output: { + serializedName: "output", type: { - name: "Boolean" + name: "String" } }, - networkSecurityGroup: { - serializedName: "properties.networkSecurityGroup", + error: { + serializedName: "error", type: { - name: "Composite", - className: "SubResource" + name: "String" } }, - dnsSettings: { - serializedName: "properties.dnsSettings", + startTime: { + serializedName: "startTime", type: { - name: "Composite", - className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" + name: "DateTime" } }, - ipConfigurations: { - serializedName: "properties.ipConfigurations", + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + statuses: { + serializedName: "statuses", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateIPConfiguration" + className: "InstanceViewStatus" } } } - }, - enableIPForwarding: { - serializedName: "properties.enableIPForwarding", - type: { - name: "Boolean" - } - }, - deleteOption: { - serializedName: "properties.deleteOption", - type: { - name: "String" - } } } } }; -export const VirtualMachineScaleSetNetworkProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetNetworkProfile", +export const VirtualMachineRunCommandsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetNetworkProfile", + className: "VirtualMachineRunCommandsListResult", modelProperties: { - healthProbe: { - serializedName: "healthProbe", - type: { - name: "Composite", - className: "ApiEntityReference" - } - }, - networkInterfaceConfigurations: { - serializedName: "networkInterfaceConfigurations", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineScaleSetNetworkConfiguration" + className: "VirtualMachineRunCommand" } } } }, - networkApiVersion: { - serializedName: "networkApiVersion", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -6602,33 +6127,26 @@ export const VirtualMachineScaleSetNetworkProfile: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetUpdateNetworkProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateNetworkProfile", +export const ResourceSkusResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateNetworkProfile", + className: "ResourceSkusResult", modelProperties: { - healthProbe: { - serializedName: "healthProbe", - type: { - name: "Composite", - className: "ApiEntityReference" - } - }, - networkInterfaceConfigurations: { - serializedName: "networkInterfaceConfigurations", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateNetworkConfiguration" + className: "ResourceSku" } } } }, - networkApiVersion: { - serializedName: "networkApiVersion", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -6637,88 +6155,245 @@ export const VirtualMachineScaleSetUpdateNetworkProfile: msRest.CompositeMapper } }; -export const VirtualMachineScaleSetExtension: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetExtension", +export const ResourceSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetExtension", + className: "ResourceSku", modelProperties: { - ...SubResourceReadOnly.type.modelProperties, + resourceType: { + serializedName: "resourceType", + readOnly: true, + type: { + name: "String" + } + }, name: { serializedName: "name", + readOnly: true, type: { name: "String" } }, - type: { + tier: { + serializedName: "tier", readOnly: true, - serializedName: "type", type: { name: "String" } }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + size: { + serializedName: "size", + readOnly: true, type: { name: "String" } }, - publisher: { - serializedName: "properties.publisher", + family: { + serializedName: "family", + readOnly: true, type: { name: "String" } }, - type1: { - serializedName: "properties.type", + kind: { + serializedName: "kind", + readOnly: true, type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + capacity: { + serializedName: "capacity", type: { - name: "String" + name: "Composite", + className: "ResourceSkuCapacity" } }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + locations: { + serializedName: "locations", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", + locationInfo: { + serializedName: "locationInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuLocationInfo" + } + } + } + }, + apiVersions: { + serializedName: "apiVersions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + costs: { + serializedName: "costs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuCosts" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuCapabilities" + } + } + } + }, + restrictions: { + serializedName: "restrictions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuRestrictions" + } + } + } + } + } + } +}; + +export const ResourceSkuCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + readOnly: true, + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + readOnly: true, + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + readOnly: true, + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Automatic", "Manual", "None"] + } + } + } + } +}; + +export const ResourceSkuLocationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuLocationInfo", + modelProperties: { + location: { + serializedName: "location", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - settings: { - serializedName: "properties.settings", + zones: { + serializedName: "zones", + readOnly: true, type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - protectedSettings: { - serializedName: "properties.protectedSettings", + zoneDetails: { + serializedName: "zoneDetails", + readOnly: true, type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuZoneDetails" + } + } } - }, - provisioningState: { + } + } + } +}; + +export const ResourceSkuZoneDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuZoneDetails", + modelProperties: { + name: { + serializedName: "name", readOnly: true, - serializedName: "properties.provisioningState", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - provisionAfterExtensions: { - serializedName: "properties.provisionAfterExtensions", + capabilities: { + serializedName: "capabilities", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ResourceSkuCapabilities" } } } @@ -6727,84 +6402,123 @@ export const VirtualMachineScaleSetExtension: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetExtensionUpdate: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetExtensionUpdate", +export const ResourceSkuCapabilities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetExtensionUpdate", + className: "ResourceSkuCapabilities", modelProperties: { - ...SubResourceReadOnly.type.modelProperties, name: { - readOnly: true, serializedName: "name", - type: { - name: "String" - } - }, - type: { readOnly: true, - serializedName: "type", type: { name: "String" } }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", + value: { + serializedName: "value", + readOnly: true, type: { name: "String" } - }, - publisher: { - serializedName: "properties.publisher", + } + } + } +}; + +export const ResourceSkuCosts: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuCosts", + modelProperties: { + meterID: { + serializedName: "meterID", + readOnly: true, type: { name: "String" } }, - type1: { - serializedName: "properties.type", + quantity: { + serializedName: "quantity", + readOnly: true, type: { - name: "String" + name: "Number" } }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", + extendedUnit: { + serializedName: "extendedUnit", + readOnly: true, type: { name: "String" } - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", + } + } + } +}; + +export const ResourceSkuRestrictions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuRestrictions", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, type: { - name: "Boolean" + name: "Enum", + allowedValues: ["Location", "Zone"] } }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", + values: { + serializedName: "values", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - settings: { - serializedName: "properties.settings", + restrictionInfo: { + serializedName: "restrictionInfo", type: { - name: "Object" + name: "Composite", + className: "ResourceSkuRestrictionInfo" } }, - protectedSettings: { - serializedName: "properties.protectedSettings", + reasonCode: { + serializedName: "reasonCode", + readOnly: true, type: { - name: "Object" + name: "Enum", + allowedValues: ["QuotaId", "NotAvailableForSubscription"] } - }, - provisioningState: { + } + } + } +}; + +export const ResourceSkuRestrictionInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceSkuRestrictionInfo", + modelProperties: { + locations: { + serializedName: "locations", readOnly: true, - serializedName: "properties.provisioningState", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - provisionAfterExtensions: { - serializedName: "properties.provisionAfterExtensions", + zones: { + serializedName: "zones", + readOnly: true, type: { name: "Sequence", element: { @@ -6818,26 +6532,20 @@ export const VirtualMachineScaleSetExtensionUpdate: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetExtensionProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetExtensionProfile", +export const DiskSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetExtensionProfile", + className: "DiskSku", modelProperties: { - extensions: { - serializedName: "extensions", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetExtension" - } - } + name: "String" } }, - extensionsTimeBudget: { - serializedName: "extensionsTimeBudget", + tier: { + serializedName: "tier", + readOnly: true, type: { name: "String" } @@ -6846,88 +6554,34 @@ export const VirtualMachineScaleSetExtensionProfile: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetVMProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMProfile", +export const PurchasePlanAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMProfile", + className: "PurchasePlanAutoGenerated", modelProperties: { - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "VirtualMachineScaleSetOSProfile" - } - }, - storageProfile: { - serializedName: "storageProfile", - type: { - name: "Composite", - className: "VirtualMachineScaleSetStorageProfile" - } - }, - networkProfile: { - serializedName: "networkProfile", - type: { - name: "Composite", - className: "VirtualMachineScaleSetNetworkProfile" - } - }, - securityProfile: { - serializedName: "securityProfile", - type: { - name: "Composite", - className: "SecurityProfile" - } - }, - diagnosticsProfile: { - serializedName: "diagnosticsProfile", - type: { - name: "Composite", - className: "DiagnosticsProfile" - } - }, - extensionProfile: { - serializedName: "extensionProfile", - type: { - name: "Composite", - className: "VirtualMachineScaleSetExtensionProfile" - } - }, - licenseType: { - serializedName: "licenseType", - type: { - name: "String" - } - }, - priority: { - serializedName: "priority", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - evictionPolicy: { - serializedName: "evictionPolicy", + publisher: { + serializedName: "publisher", + required: true, type: { name: "String" } }, - billingProfile: { - serializedName: "billingProfile", - type: { - name: "Composite", - className: "BillingProfile" - } - }, - scheduledEventsProfile: { - serializedName: "scheduledEventsProfile", + product: { + serializedName: "product", + required: true, type: { - name: "Composite", - className: "ScheduledEventsProfile" + name: "String" } }, - userData: { - serializedName: "userData", + promotionCode: { + serializedName: "promotionCode", type: { name: "String" } @@ -6936,417 +6590,447 @@ export const VirtualMachineScaleSetVMProfile: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetUpdateVMProfile: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdateVMProfile", +export const CreationData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdateVMProfile", + className: "CreationData", modelProperties: { - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdateOSProfile" - } - }, - storageProfile: { - serializedName: "storageProfile", + createOption: { + serializedName: "createOption", + required: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdateStorageProfile" + name: "String" } }, - networkProfile: { - serializedName: "networkProfile", + storageAccountId: { + serializedName: "storageAccountId", type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdateNetworkProfile" + name: "String" } }, - securityProfile: { - serializedName: "securityProfile", + imageReference: { + serializedName: "imageReference", type: { name: "Composite", - className: "SecurityProfile" + className: "ImageDiskReference" } }, - diagnosticsProfile: { - serializedName: "diagnosticsProfile", + galleryImageReference: { + serializedName: "galleryImageReference", type: { name: "Composite", - className: "DiagnosticsProfile" + className: "ImageDiskReference" } }, - extensionProfile: { - serializedName: "extensionProfile", + sourceUri: { + serializedName: "sourceUri", type: { - name: "Composite", - className: "VirtualMachineScaleSetExtensionProfile" + name: "String" } }, - licenseType: { - serializedName: "licenseType", + sourceResourceId: { + serializedName: "sourceResourceId", type: { name: "String" } }, - billingProfile: { - serializedName: "billingProfile", + sourceUniqueId: { + serializedName: "sourceUniqueId", + readOnly: true, type: { - name: "Composite", - className: "BillingProfile" + name: "String" } }, - scheduledEventsProfile: { - serializedName: "scheduledEventsProfile", + uploadSizeBytes: { + serializedName: "uploadSizeBytes", type: { - name: "Composite", - className: "ScheduledEventsProfile" + name: "Number" } }, - userData: { - serializedName: "userData", + logicalSectorSize: { + serializedName: "logicalSectorSize", type: { - name: "String" + name: "Number" } } } } }; -export const VirtualMachineScaleSet: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSet", +export const ImageDiskReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSet", + className: "ImageDiskReference", modelProperties: { - ...Resource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - plan: { - serializedName: "plan", - type: { - name: "Composite", - className: "Plan" - } - }, - upgradePolicy: { - serializedName: "properties.upgradePolicy", - type: { - name: "Composite", - className: "UpgradePolicy" - } - }, - automaticRepairsPolicy: { - serializedName: "properties.automaticRepairsPolicy", - type: { - name: "Composite", - className: "AutomaticRepairsPolicy" - } - }, - virtualMachineProfile: { - serializedName: "properties.virtualMachineProfile", + id: { + serializedName: "id", + required: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetVMProfile" + name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + lun: { + serializedName: "lun", type: { - name: "String" + name: "Number" } - }, - overprovision: { - serializedName: "properties.overprovision", + } + } + } +}; + +export const EncryptionSettingsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionSettingsCollection", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, type: { name: "Boolean" } }, - doNotRunExtensionsOnOverprovisionedVMs: { - serializedName: "properties.doNotRunExtensionsOnOverprovisionedVMs", + encryptionSettings: { + serializedName: "encryptionSettings", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EncryptionSettingsElement" + } + } } }, - uniqueId: { - readOnly: true, - serializedName: "properties.uniqueId", + encryptionSettingsVersion: { + serializedName: "encryptionSettingsVersion", type: { name: "String" } - }, - singlePlacementGroup: { - serializedName: "properties.singlePlacementGroup", + } + } + } +}; + +export const EncryptionSettingsElement: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionSettingsElement", + modelProperties: { + diskEncryptionKey: { + serializedName: "diskEncryptionKey", type: { - name: "Boolean" + name: "Composite", + className: "KeyVaultAndSecretReference" } }, - zoneBalance: { - serializedName: "properties.zoneBalance", + keyEncryptionKey: { + serializedName: "keyEncryptionKey", type: { - name: "Boolean" + name: "Composite", + className: "KeyVaultAndKeyReference" } - }, - platformFaultDomainCount: { - serializedName: "properties.platformFaultDomainCount", + } + } + } +}; + +export const KeyVaultAndSecretReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultAndSecretReference", + modelProperties: { + sourceVault: { + serializedName: "sourceVault", type: { - name: "Number" + name: "Composite", + className: "SourceVault" } }, - proximityPlacementGroup: { - serializedName: "properties.proximityPlacementGroup", + secretUrl: { + serializedName: "secretUrl", + required: true, type: { - name: "Composite", - className: "SubResource" + name: "String" } - }, - hostGroup: { - serializedName: "properties.hostGroup", + } + } + } +}; + +export const SourceVault: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceVault", + modelProperties: { + id: { + serializedName: "id", type: { - name: "Composite", - className: "SubResource" + name: "String" } - }, - additionalCapabilities: { - serializedName: "properties.additionalCapabilities", + } + } + } +}; + +export const KeyVaultAndKeyReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultAndKeyReference", + modelProperties: { + sourceVault: { + serializedName: "sourceVault", type: { name: "Composite", - className: "AdditionalCapabilities" + className: "SourceVault" } }, - scaleInPolicy: { - serializedName: "properties.scaleInPolicy", + keyUrl: { + serializedName: "keyUrl", + required: true, type: { - name: "Composite", - className: "ScaleInPolicy" + name: "String" } - }, - orchestrationMode: { - serializedName: "properties.orchestrationMode", + } + } + } +}; + +export const Encryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Encryption", + modelProperties: { + diskEncryptionSetId: { + serializedName: "diskEncryptionSetId", type: { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "VirtualMachineScaleSetIdentity" - } - }, - zones: { - serializedName: "zones", + type: { + serializedName: "type", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - }, - extendedLocation: { - serializedName: "extendedLocation", + } + } + } +}; + +export const ShareInfoElement: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ShareInfoElement", + modelProperties: { + vmUri: { + serializedName: "vmUri", + readOnly: true, type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } } } } }; -export const VirtualMachineScaleSetVMReimageParameters: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMReimageParameters", +export const PropertyUpdatesInProgress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMReimageParameters", + className: "PropertyUpdatesInProgress", modelProperties: { - ...VirtualMachineReimageParameters.type.modelProperties + targetTier: { + serializedName: "targetTier", + type: { + name: "String" + } + } } } }; -export const VirtualMachineScaleSetReimageParameters: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetReimageParameters", +export const DiskSecurityProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetReimageParameters", + className: "DiskSecurityProfile", modelProperties: { - ...VirtualMachineScaleSetVMReimageParameters.type.modelProperties, - instanceIds: { - serializedName: "instanceIds", + securityType: { + serializedName: "securityType", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const VirtualMachineScaleSetUpdate: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetUpdate", +export const DiskUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetUpdate", + className: "DiskUpdate", modelProperties: { - ...UpdateResource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, sku: { serializedName: "sku", type: { name: "Composite", - className: "Sku" + className: "DiskSku" } }, - plan: { - serializedName: "plan", + osType: { + serializedName: "properties.osType", type: { - name: "Composite", - className: "Plan" + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - upgradePolicy: { - serializedName: "properties.upgradePolicy", + diskSizeGB: { + serializedName: "properties.diskSizeGB", type: { - name: "Composite", - className: "UpgradePolicy" + name: "Number" } }, - automaticRepairsPolicy: { - serializedName: "properties.automaticRepairsPolicy", + encryptionSettingsCollection: { + serializedName: "properties.encryptionSettingsCollection", type: { name: "Composite", - className: "AutomaticRepairsPolicy" + className: "EncryptionSettingsCollection" } }, - virtualMachineProfile: { - serializedName: "properties.virtualMachineProfile", + diskIopsReadWrite: { + serializedName: "properties.diskIOPSReadWrite", type: { - name: "Composite", - className: "VirtualMachineScaleSetUpdateVMProfile" + name: "Number" } }, - overprovision: { - serializedName: "properties.overprovision", + diskMBpsReadWrite: { + serializedName: "properties.diskMBpsReadWrite", type: { - name: "Boolean" + name: "Number" } }, - doNotRunExtensionsOnOverprovisionedVMs: { - serializedName: "properties.doNotRunExtensionsOnOverprovisionedVMs", + diskIopsReadOnly: { + serializedName: "properties.diskIOPSReadOnly", type: { - name: "Boolean" + name: "Number" } }, - singlePlacementGroup: { - serializedName: "properties.singlePlacementGroup", + diskMBpsReadOnly: { + serializedName: "properties.diskMBpsReadOnly", type: { - name: "Boolean" + name: "Number" } }, - additionalCapabilities: { - serializedName: "properties.additionalCapabilities", + maxShares: { + serializedName: "properties.maxShares", type: { - name: "Composite", - className: "AdditionalCapabilities" + name: "Number" } }, - scaleInPolicy: { - serializedName: "properties.scaleInPolicy", + encryption: { + serializedName: "properties.encryption", type: { name: "Composite", - className: "ScaleInPolicy" + className: "Encryption" } }, - proximityPlacementGroup: { - serializedName: "properties.proximityPlacementGroup", + networkAccessPolicy: { + serializedName: "properties.networkAccessPolicy", + type: { + name: "String" + } + }, + diskAccessId: { + serializedName: "properties.diskAccessId", + type: { + name: "String" + } + }, + tier: { + serializedName: "properties.tier", + type: { + name: "String" + } + }, + burstingEnabled: { + serializedName: "properties.burstingEnabled", + type: { + name: "Boolean" + } + }, + purchasePlan: { + serializedName: "properties.purchasePlan", type: { name: "Composite", - className: "SubResource" + className: "PurchasePlanAutoGenerated" } }, - identity: { - serializedName: "identity", + propertyUpdatesInProgress: { + serializedName: "properties.propertyUpdatesInProgress", type: { name: "Composite", - className: "VirtualMachineScaleSetIdentity" + className: "PropertyUpdatesInProgress" } - } - } - } -}; - -export const VirtualMachineScaleSetVMInstanceIDs: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMInstanceIDs", - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMInstanceIDs", - modelProperties: { - instanceIds: { - serializedName: "instanceIds", + }, + supportsHibernation: { + serializedName: "properties.supportsHibernation", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } } } } }; -export const VirtualMachineScaleSetVMInstanceRequiredIDs: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMInstanceRequiredIDs", +export const DiskList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMInstanceRequiredIDs", + className: "DiskList", modelProperties: { - instanceIds: { + value: { + serializedName: "value", required: true, - serializedName: "instanceIds", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Disk" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const VirtualMachineStatusCodeCount: msRest.CompositeMapper = { - serializedName: "VirtualMachineStatusCodeCount", +export const GrantAccessData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineStatusCodeCount", + className: "GrantAccessData", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + access: { + serializedName: "access", + required: true, type: { name: "String" } }, - count: { - readOnly: true, - serializedName: "count", + durationInSeconds: { + serializedName: "durationInSeconds", + required: true, type: { name: "Number" } @@ -7355,75 +7039,36 @@ export const VirtualMachineStatusCodeCount: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetInstanceViewStatusesSummary: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetInstanceViewStatusesSummary", - type: { - name: "Composite", - className: "VirtualMachineScaleSetInstanceViewStatusesSummary", - modelProperties: { - statusesSummary: { - readOnly: true, - serializedName: "statusesSummary", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineStatusCodeCount" - } - } - } - } - } - } -}; - -export const VirtualMachineScaleSetVMExtensionsSummary: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMExtensionsSummary", +export const AccessUri: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMExtensionsSummary", + className: "AccessUri", modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - statusesSummary: { + accessSAS: { + serializedName: "accessSAS", readOnly: true, - serializedName: "statusesSummary", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineStatusCodeCount" - } - } + name: "String" } } } } }; -export const OrchestrationServiceSummary: msRest.CompositeMapper = { - serializedName: "OrchestrationServiceSummary", +export const SnapshotSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OrchestrationServiceSummary", + className: "SnapshotSku", modelProperties: { - serviceName: { - readOnly: true, - serializedName: "serviceName", + name: { + serializedName: "name", type: { name: "String" } }, - serviceState: { + tier: { + serializedName: "tier", readOnly: true, - serializedName: "serviceState", type: { name: "String" } @@ -7432,318 +7077,337 @@ export const OrchestrationServiceSummary: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetInstanceView", +export const SnapshotUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetInstanceView", + className: "SnapshotUpdate", modelProperties: { - virtualMachine: { - readOnly: true, - serializedName: "virtualMachine", + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + sku: { + serializedName: "sku", type: { name: "Composite", - className: "VirtualMachineScaleSetInstanceViewStatusesSummary" + className: "SnapshotSku" } }, - extensions: { - readOnly: true, - serializedName: "extensions", + osType: { + serializedName: "properties.osType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetVMExtensionsSummary" - } - } + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - statuses: { - serializedName: "statuses", + diskSizeGB: { + serializedName: "properties.diskSizeGB", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceViewStatus" - } - } + name: "Number" } }, - orchestrationServices: { - readOnly: true, - serializedName: "orchestrationServices", + encryptionSettingsCollection: { + serializedName: "properties.encryptionSettingsCollection", + type: { + name: "Composite", + className: "EncryptionSettingsCollection" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "Encryption" + } + }, + networkAccessPolicy: { + serializedName: "properties.networkAccessPolicy", + type: { + name: "String" + } + }, + diskAccessId: { + serializedName: "properties.diskAccessId", + type: { + name: "String" + } + }, + supportsHibernation: { + serializedName: "properties.supportsHibernation", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SnapshotList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotList", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OrchestrationServiceSummary" + className: "Snapshot" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const VirtualMachineScaleSetSkuCapacity: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetSkuCapacity", +export const EncryptionSetIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetSkuCapacity", + className: "EncryptionSetIdentity", modelProperties: { - minimum: { - readOnly: true, - serializedName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - readOnly: true, - serializedName: "maximum", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" } }, - defaultCapacity: { + principalId: { + serializedName: "principalId", readOnly: true, - serializedName: "defaultCapacity", type: { - name: "Number" + name: "String" } }, - scaleType: { + tenantId: { + serializedName: "tenantId", readOnly: true, - serializedName: "scaleType", type: { - name: "Enum", - allowedValues: ["Automatic", "None"] + name: "String" } } } } }; -export const VirtualMachineScaleSetSku: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetSku", +export const KeyForDiskEncryptionSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetSku", + className: "KeyForDiskEncryptionSet", modelProperties: { - resourceType: { - readOnly: true, - serializedName: "resourceType", - type: { - name: "String" - } - }, - sku: { - readOnly: true, - serializedName: "sku", + sourceVault: { + serializedName: "sourceVault", type: { name: "Composite", - className: "Sku" + className: "SourceVault" } }, - capacity: { - readOnly: true, - serializedName: "capacity", + keyUrl: { + serializedName: "keyUrl", + required: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetSkuCapacity" + name: "String" } } } } }; -export const RollbackStatusInfo: msRest.CompositeMapper = { - serializedName: "RollbackStatusInfo", +export const DiskEncryptionSetUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RollbackStatusInfo", + className: "DiskEncryptionSetUpdate", modelProperties: { - successfullyRolledbackInstanceCount: { - readOnly: true, - serializedName: "successfullyRolledbackInstanceCount", + tags: { + serializedName: "tags", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "String" } } } }, - failedRolledbackInstanceCount: { - readOnly: true, - serializedName: "failedRolledbackInstanceCount", + identity: { + serializedName: "identity", type: { - name: "Number" + name: "Composite", + className: "EncryptionSetIdentity" } }, - rollbackError: { - readOnly: true, - serializedName: "rollbackError", + encryptionType: { + serializedName: "properties.encryptionType", + type: { + name: "String" + } + }, + activeKey: { + serializedName: "properties.activeKey", type: { name: "Composite", - className: "ApiError" + className: "KeyForDiskEncryptionSet" + } + }, + rotationToLatestKeyVersionEnabled: { + serializedName: "properties.rotationToLatestKeyVersionEnabled", + type: { + name: "Boolean" } } } } }; -export const UpgradeOperationHistoryStatus: msRest.CompositeMapper = { - serializedName: "UpgradeOperationHistoryStatus", +export const DiskEncryptionSetList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpgradeOperationHistoryStatus", + className: "DiskEncryptionSetList", modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "Enum", - allowedValues: ["RollingForward", "Cancelled", "Completed", "Faulted"] - } - }, - startTime: { - readOnly: true, - serializedName: "startTime", + value: { + serializedName: "value", + required: true, type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskEncryptionSet" + } + } } }, - endTime: { - readOnly: true, - serializedName: "endTime", + nextLink: { + serializedName: "nextLink", type: { - name: "DateTime" + name: "String" } } } } }; -export const RollingUpgradeProgressInfo: msRest.CompositeMapper = { - serializedName: "RollingUpgradeProgressInfo", +export const ResourceUriList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RollingUpgradeProgressInfo", + className: "ResourceUriList", modelProperties: { - successfulInstanceCount: { - readOnly: true, - serializedName: "successfulInstanceCount", - type: { - name: "Number" - } - }, - failedInstanceCount: { - readOnly: true, - serializedName: "failedInstanceCount", - type: { - name: "Number" - } - }, - inProgressInstanceCount: { - readOnly: true, - serializedName: "inProgressInstanceCount", + value: { + serializedName: "value", + required: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - pendingInstanceCount: { - readOnly: true, - serializedName: "pendingInstanceCount", + nextLink: { + serializedName: "nextLink", type: { - name: "Number" + name: "String" } } } } }; -export const UpgradeOperationHistoricalStatusInfoProperties: msRest.CompositeMapper = { - serializedName: "UpgradeOperationHistoricalStatusInfoProperties", +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpgradeOperationHistoricalStatusInfoProperties", + className: "PrivateEndpointConnection", modelProperties: { - runningStatus: { + id: { + serializedName: "id", readOnly: true, - serializedName: "runningStatus", type: { - name: "Composite", - className: "UpgradeOperationHistoryStatus" + name: "String" } }, - progress: { + name: { + serializedName: "name", readOnly: true, - serializedName: "progress", type: { - name: "Composite", - className: "RollingUpgradeProgressInfo" + name: "String" } }, - error: { + type: { + serializedName: "type", readOnly: true, - serializedName: "error", type: { - name: "Composite", - className: "ApiError" + name: "String" } }, - startedBy: { - readOnly: true, - serializedName: "startedBy", + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "Enum", - allowedValues: ["Unknown", "User", "Platform"] + name: "Composite", + className: "PrivateEndpoint" } }, - targetImageReference: { - readOnly: true, - serializedName: "targetImageReference", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "ImageReference" + className: "PrivateLinkServiceConnectionState" } }, - rollbackInfo: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "rollbackInfo", type: { - name: "Composite", - className: "RollbackStatusInfo" + name: "String" } } } } }; -export const UpgradeOperationHistoricalStatusInfo: msRest.CompositeMapper = { - serializedName: "UpgradeOperationHistoricalStatusInfo", +export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpgradeOperationHistoricalStatusInfo", + className: "PrivateEndpoint", modelProperties: { - properties: { + id: { + serializedName: "id", readOnly: true, - serializedName: "properties", type: { - name: "Composite", - className: "UpgradeOperationHistoricalStatusInfoProperties" + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + description: { + serializedName: "description", type: { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + actionsRequired: { + serializedName: "actionsRequired", type: { name: "String" } @@ -7752,104 +7416,224 @@ export const UpgradeOperationHistoricalStatusInfo: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetVMInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMInstanceView", +export const DiskAccessUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMInstanceView", + className: "DiskAccessUpdate", modelProperties: { - platformUpdateDomain: { - serializedName: "platformUpdateDomain", + tags: { + serializedName: "tags", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const DiskAccessList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskAccessList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskAccess" + } + } } }, - platformFaultDomain: { - serializedName: "platformFaultDomain", + nextLink: { + serializedName: "nextLink", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" } }, - rdpThumbPrint: { - serializedName: "rdpThumbPrint", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - vmAgent: { - serializedName: "vmAgent", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Composite", - className: "VirtualMachineAgentInstanceView" + name: "String" } }, - maintenanceRedeployStatus: { - serializedName: "maintenanceRedeployStatus", + groupId: { + serializedName: "properties.groupId", + readOnly: true, type: { - name: "Composite", - className: "MaintenanceRedeployStatus" + name: "String" } }, - disks: { - serializedName: "disks", + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DiskInstanceView" + name: "String" } } } }, - extensions: { - serializedName: "extensions", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineExtensionInstanceView" + className: "PrivateEndpointConnection" } } } }, - vmHealth: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyOnlyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyOnlyResource", + modelProperties: { + id: { + serializedName: "id", readOnly: true, - serializedName: "vmHealth", type: { - name: "Composite", - className: "VirtualMachineHealthStatus" + name: "String" } }, - bootDiagnostics: { - serializedName: "bootDiagnostics", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "BootDiagnosticsInstanceView" + name: "String" } }, - statuses: { - serializedName: "statuses", + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DiskRestorePointList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskRestorePointList", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "InstanceViewStatus" + className: "DiskRestorePoint" } } } }, - assignedHost: { - readOnly: true, - serializedName: "assignedHost", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - placementGroupId: { - serializedName: "placementGroupId", + } + } + } +}; + +export const GalleryIdentifier: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryIdentifier", + modelProperties: { + uniqueName: { + serializedName: "uniqueName", + readOnly: true, type: { name: "String" } @@ -7858,20 +7642,26 @@ export const VirtualMachineScaleSetVMInstanceView: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetVMNetworkProfileConfiguration: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMNetworkProfileConfiguration", +export const SharingProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMNetworkProfileConfiguration", + className: "SharingProfile", modelProperties: { - networkInterfaceConfigurations: { - serializedName: "networkInterfaceConfigurations", + permissions: { + serializedName: "permissions", + type: { + name: "String" + } + }, + groups: { + serializedName: "groups", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineScaleSetNetworkConfiguration" + className: "SharingProfileGroup" } } } @@ -7880,196 +7670,368 @@ export const VirtualMachineScaleSetVMNetworkProfileConfiguration: msRest.Composi } }; -export const VirtualMachineScaleSetVMProtectionPolicy: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMProtectionPolicy", +export const SharingProfileGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMProtectionPolicy", + className: "SharingProfileGroup", modelProperties: { - protectFromScaleIn: { - serializedName: "protectFromScaleIn", + type: { + serializedName: "type", type: { - name: "Boolean" + name: "String" } }, - protectFromScaleSetActions: { - serializedName: "protectFromScaleSetActions", + ids: { + serializedName: "ids", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const VirtualMachineScaleSetVM: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVM", +export const UpdateResourceDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVM", + className: "UpdateResourceDefinition", modelProperties: { - ...Resource.type.modelProperties, - instanceId: { + id: { + serializedName: "id", readOnly: true, - serializedName: "instanceId", type: { name: "String" } }, - sku: { + name: { + serializedName: "name", readOnly: true, - serializedName: "sku", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - latestModelApplied: { + type: { + serializedName: "type", readOnly: true, - serializedName: "properties.latestModelApplied", type: { - name: "Boolean" + name: "String" } }, - vmId: { - readOnly: true, - serializedName: "properties.vmId", + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const GalleryImageIdentifier: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageIdentifier", + modelProperties: { + publisher: { + serializedName: "publisher", + required: true, type: { name: "String" } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", + offer: { + serializedName: "offer", + required: true, type: { - name: "Composite", - className: "VirtualMachineScaleSetVMInstanceView" + name: "String" } }, - hardwareProfile: { - serializedName: "properties.hardwareProfile", + sku: { + serializedName: "sku", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RecommendedMachineConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecommendedMachineConfiguration", + modelProperties: { + vCPUs: { + serializedName: "vCPUs", type: { name: "Composite", - className: "HardwareProfile" + className: "ResourceRange" } }, - storageProfile: { - serializedName: "properties.storageProfile", + memory: { + serializedName: "memory", type: { name: "Composite", - className: "StorageProfile" + className: "ResourceRange" + } + } + } + } +}; + +export const ResourceRange: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceRange", + modelProperties: { + min: { + serializedName: "min", + type: { + name: "Number" } }, - additionalCapabilities: { - serializedName: "properties.additionalCapabilities", + max: { + serializedName: "max", type: { - name: "Composite", - className: "AdditionalCapabilities" + name: "Number" + } + } + } + } +}; + +export const Disallowed: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Disallowed", + modelProperties: { + diskTypes: { + serializedName: "diskTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ImagePurchasePlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImagePurchasePlan", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" } }, - osProfile: { - serializedName: "properties.osProfile", + publisher: { + serializedName: "publisher", type: { - name: "Composite", - className: "OSProfile" + name: "String" } }, - securityProfile: { - serializedName: "properties.securityProfile", + product: { + serializedName: "product", type: { - name: "Composite", - className: "SecurityProfile" + name: "String" + } + } + } + } +}; + +export const GalleryImageFeature: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageFeature", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" } }, - networkProfile: { - serializedName: "properties.networkProfile", + value: { + serializedName: "value", type: { - name: "Composite", - className: "NetworkProfile" + name: "String" + } + } + } + } +}; + +export const GalleryArtifactPublishingProfileBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryArtifactPublishingProfileBase", + modelProperties: { + targetRegions: { + serializedName: "targetRegions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TargetRegion" + } + } } }, - networkProfileConfiguration: { - serializedName: "properties.networkProfileConfiguration", + replicaCount: { + serializedName: "replicaCount", type: { - name: "Composite", - className: "VirtualMachineScaleSetVMNetworkProfileConfiguration" + name: "Number" } }, - diagnosticsProfile: { - serializedName: "properties.diagnosticsProfile", + excludeFromLatest: { + serializedName: "excludeFromLatest", type: { - name: "Composite", - className: "DiagnosticsProfile" + name: "Boolean" } }, - availabilitySet: { - serializedName: "properties.availabilitySet", + publishedDate: { + serializedName: "publishedDate", + readOnly: true, type: { - name: "Composite", - className: "SubResource" + name: "DateTime" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + endOfLifeDate: { + serializedName: "endOfLifeDate", type: { - name: "String" + name: "DateTime" } }, - licenseType: { - serializedName: "properties.licenseType", + storageAccountType: { + serializedName: "storageAccountType", type: { name: "String" } - }, - modelDefinitionApplied: { - readOnly: true, - serializedName: "properties.modelDefinitionApplied", + } + } + } +}; + +export const TargetRegion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TargetRegion", + modelProperties: { + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - protectionPolicy: { - serializedName: "properties.protectionPolicy", + regionalReplicaCount: { + serializedName: "regionalReplicaCount", type: { - name: "Composite", - className: "VirtualMachineScaleSetVMProtectionPolicy" + name: "Number" } }, - userData: { - serializedName: "properties.userData", + storageAccountType: { + serializedName: "storageAccountType", type: { name: "String" } }, - plan: { - serializedName: "plan", + encryption: { + serializedName: "encryption", type: { name: "Composite", - className: "Plan" + className: "EncryptionImages" + } + } + } + } +}; + +export const EncryptionImages: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionImages", + modelProperties: { + osDiskImage: { + serializedName: "osDiskImage", + type: { + name: "Composite", + className: "OSDiskImageEncryption" } }, - resources: { - readOnly: true, - serializedName: "resources", + dataDiskImages: { + serializedName: "dataDiskImages", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualMachineExtension" + className: "DataDiskImageEncryption" } } } + } + } + } +}; + +export const DiskImageEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskImageEncryption", + modelProperties: { + diskEncryptionSetId: { + serializedName: "diskEncryptionSetId", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryImageVersionStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryImageVersionStorageProfile", + modelProperties: { + source: { + serializedName: "source", + type: { + name: "Composite", + className: "GalleryArtifactVersionSource" + } }, - zones: { - readOnly: true, - serializedName: "zones", + osDiskImage: { + serializedName: "osDiskImage", + type: { + name: "Composite", + className: "GalleryOSDiskImage" + } + }, + dataDiskImages: { + serializedName: "dataDiskImages", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "GalleryDataDiskImage" } } } @@ -8078,105 +8040,115 @@ export const VirtualMachineScaleSetVM: msRest.CompositeMapper = { } }; -export const RollingUpgradeRunningStatus: msRest.CompositeMapper = { - serializedName: "RollingUpgradeRunningStatus", +export const GalleryArtifactVersionSource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RollingUpgradeRunningStatus", + className: "GalleryArtifactVersionSource", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + id: { + serializedName: "id", type: { - name: "Enum", - allowedValues: ["RollingForward", "Cancelled", "Completed", "Faulted"] + name: "String" } }, - startTime: { + uri: { + serializedName: "uri", + type: { + name: "String" + } + } + } + } +}; + +export const GalleryDiskImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryDiskImage", + modelProperties: { + sizeInGB: { + serializedName: "sizeInGB", readOnly: true, - serializedName: "startTime", type: { - name: "DateTime" + name: "Number" } }, - lastAction: { - readOnly: true, - serializedName: "lastAction", + hostCaching: { + serializedName: "hostCaching", type: { name: "Enum", - allowedValues: ["Start", "Cancel"] + allowedValues: ["None", "ReadOnly", "ReadWrite"] } }, - lastActionTime: { - readOnly: true, - serializedName: "lastActionTime", + source: { + serializedName: "source", type: { - name: "DateTime" + name: "Composite", + className: "GalleryArtifactVersionSource" } } } } }; -export const RollingUpgradeStatusInfo: msRest.CompositeMapper = { - serializedName: "RollingUpgradeStatusInfo", +export const ReplicationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RollingUpgradeStatusInfo", + className: "ReplicationStatus", modelProperties: { - ...Resource.type.modelProperties, - policy: { - readOnly: true, - serializedName: "properties.policy", - type: { - name: "Composite", - className: "RollingUpgradePolicy" - } - }, - runningStatus: { - readOnly: true, - serializedName: "properties.runningStatus", - type: { - name: "Composite", - className: "RollingUpgradeRunningStatus" - } - }, - progress: { + aggregatedState: { + serializedName: "aggregatedState", readOnly: true, - serializedName: "properties.progress", type: { - name: "Composite", - className: "RollingUpgradeProgressInfo" + name: "String" } }, - error: { + summary: { + serializedName: "summary", readOnly: true, - serializedName: "properties.error", type: { - name: "Composite", - className: "ApiError" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionalReplicationStatus" + } + } } } } } }; -export const RecoveryWalkResponse: msRest.CompositeMapper = { - serializedName: "RecoveryWalkResponse", +export const RegionalReplicationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecoveryWalkResponse", + className: "RegionalReplicationStatus", modelProperties: { - walkPerformed: { + region: { + serializedName: "region", readOnly: true, - serializedName: "walkPerformed", type: { - name: "Boolean" + name: "String" } }, - nextPlatformUpdateDomain: { + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "String" + } + }, + progress: { + serializedName: "progress", readOnly: true, - serializedName: "nextPlatformUpdateDomain", type: { name: "Number" } @@ -8185,106 +8157,161 @@ export const RecoveryWalkResponse: msRest.CompositeMapper = { } }; -export const LogAnalyticsInputBase: msRest.CompositeMapper = { - serializedName: "LogAnalyticsInputBase", +export const UserArtifactSource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsInputBase", + className: "UserArtifactSource", modelProperties: { - blobContainerSasUri: { + mediaLink: { + serializedName: "mediaLink", required: true, - serializedName: "blobContainerSasUri", type: { name: "String" } }, - fromTime: { - required: true, - serializedName: "fromTime", + defaultConfigurationLink: { + serializedName: "defaultConfigurationLink", type: { - name: "DateTime" + name: "String" } - }, - toTime: { + } + } + } +}; + +export const UserArtifactManage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserArtifactManage", + modelProperties: { + install: { + serializedName: "install", required: true, - serializedName: "toTime", - type: { - name: "DateTime" - } - }, - groupByThrottlePolicy: { - serializedName: "groupByThrottlePolicy", type: { - name: "Boolean" + name: "String" } }, - groupByOperationName: { - serializedName: "groupByOperationName", + remove: { + serializedName: "remove", + required: true, type: { - name: "Boolean" + name: "String" } }, - groupByResourceName: { - serializedName: "groupByResourceName", + update: { + serializedName: "update", type: { - name: "Boolean" + name: "String" } - }, - groupByClientApplicationId: { - serializedName: "groupByClientApplicationId", + } + } + } +}; + +export const GalleryList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryList", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Gallery" + } + } } }, - groupByUserAgent: { - serializedName: "groupByUserAgent", + nextLink: { + serializedName: "nextLink", type: { - name: "Boolean" + name: "String" } } } } }; -export const RequestRateByIntervalInput: msRest.CompositeMapper = { - serializedName: "RequestRateByIntervalInput", +export const GalleryImageList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RequestRateByIntervalInput", + className: "GalleryImageList", modelProperties: { - ...LogAnalyticsInputBase.type.modelProperties, - intervalLength: { + value: { + serializedName: "value", required: true, - serializedName: "intervalLength", type: { - name: "Enum", - allowedValues: ["ThreeMins", "FiveMins", "ThirtyMins", "SixtyMins"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryImage" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const ThrottledRequestsInput: msRest.CompositeMapper = { - serializedName: "ThrottledRequestsInput", +export const GalleryImageVersionList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ThrottledRequestsInput", + className: "GalleryImageVersionList", modelProperties: { - ...LogAnalyticsInputBase.type.modelProperties + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryImageVersion" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } } } }; -export const LogAnalyticsOutput: msRest.CompositeMapper = { - serializedName: "LogAnalyticsOutput", +export const GalleryApplicationList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsOutput", + className: "GalleryApplicationList", modelProperties: { - output: { - readOnly: true, - serializedName: "output", + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryApplication" + } + } + } + }, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -8293,56 +8320,82 @@ export const LogAnalyticsOutput: msRest.CompositeMapper = { } }; -export const LogAnalyticsOperationResult: msRest.CompositeMapper = { - serializedName: "LogAnalyticsOperationResult", +export const GalleryApplicationVersionList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsOperationResult", + className: "GalleryApplicationVersionList", modelProperties: { - properties: { - readOnly: true, - serializedName: "properties", + value: { + serializedName: "value", + required: true, type: { - name: "Composite", - className: "LogAnalyticsOutput" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GalleryApplicationVersion" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const VMScaleSetConvertToSinglePlacementGroupInput: msRest.CompositeMapper = { - serializedName: "VMScaleSetConvertToSinglePlacementGroupInput", +export const SharingUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VMScaleSetConvertToSinglePlacementGroupInput", + className: "SharingUpdate", modelProperties: { - activePlacementGroupId: { - serializedName: "activePlacementGroupId", + operationType: { + serializedName: "operationType", + required: true, type: { name: "String" } + }, + groups: { + serializedName: "groups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharingProfileGroup" + } + } + } } } } }; -export const OrchestrationServiceStateInput: msRest.CompositeMapper = { - serializedName: "OrchestrationServiceStateInput", +export const SharedGalleryList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OrchestrationServiceStateInput", + className: "SharedGalleryList", modelProperties: { - serviceName: { + value: { + serializedName: "value", required: true, - serializedName: "serviceName", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedGallery" + } + } } }, - action: { - required: true, - serializedName: "action", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -8351,22 +8404,21 @@ export const OrchestrationServiceStateInput: msRest.CompositeMapper = { } }; -export const RunCommandInputParameter: msRest.CompositeMapper = { - serializedName: "RunCommandInputParameter", +export const PirResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RunCommandInputParameter", + className: "PirResource", modelProperties: { name: { - required: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, - value: { - required: true, - serializedName: "value", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } @@ -8375,121 +8427,136 @@ export const RunCommandInputParameter: msRest.CompositeMapper = { } }; -export const RunCommandInput: msRest.CompositeMapper = { - serializedName: "RunCommandInput", +export const SharedGalleryImageList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RunCommandInput", + className: "SharedGalleryImageList", modelProperties: { - commandId: { + value: { + serializedName: "value", required: true, - serializedName: "commandId", - type: { - name: "String" - } - }, - script: { - serializedName: "script", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "SharedGalleryImage" } } } }, - parameters: { - serializedName: "parameters", + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SharedGalleryImageVersionList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SharedGalleryImageVersionList", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RunCommandInputParameter" + className: "SharedGalleryImageVersion" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const RunCommandParameterDefinition: msRest.CompositeMapper = { - serializedName: "RunCommandParameterDefinition", +export const RoleInstance: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RunCommandParameterDefinition", + className: "RoleInstance", modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, name: { - required: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - required: true, serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } }, - defaultValue: { - serializedName: "defaultValue", + tags: { + serializedName: "tags", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "InstanceSku" } }, - required: { - serializedName: "required", - defaultValue: false, + properties: { + serializedName: "properties", type: { - name: "Boolean" + name: "Composite", + className: "RoleInstanceProperties" } } } } }; -export const RunCommandDocumentBase: msRest.CompositeMapper = { - serializedName: "RunCommandDocumentBase", +export const InstanceSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RunCommandDocumentBase", + className: "InstanceSku", modelProperties: { - schema: { - required: true, - serializedName: "$schema", - type: { - name: "String" - } - }, - id: { - required: true, - serializedName: "id", - type: { - name: "String" - } - }, - osType: { - required: true, - serializedName: "osType", - type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] - } - }, - label: { - required: true, - serializedName: "label", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - description: { - required: true, - serializedName: "description", + tier: { + serializedName: "tier", + readOnly: true, type: { name: "String" } @@ -8498,55 +8565,43 @@ export const RunCommandDocumentBase: msRest.CompositeMapper = { } }; -export const RunCommandDocument: msRest.CompositeMapper = { - serializedName: "RunCommandDocument", +export const RoleInstanceProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RunCommandDocument", + className: "RoleInstanceProperties", modelProperties: { - ...RunCommandDocumentBase.type.modelProperties, - script: { - required: true, - serializedName: "script", + networkProfile: { + serializedName: "networkProfile", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "RoleInstanceNetworkProfile" } }, - parameters: { - serializedName: "parameters", + instanceView: { + serializedName: "instanceView", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RunCommandParameterDefinition" - } - } + name: "Composite", + className: "RoleInstanceView" } } } } }; -export const RunCommandResult: msRest.CompositeMapper = { - serializedName: "RunCommandResult", +export const RoleInstanceNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RunCommandResult", + className: "RoleInstanceNetworkProfile", modelProperties: { - value: { - serializedName: "value", + networkInterfaces: { + serializedName: "networkInterfaces", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "InstanceViewStatus" + className: "SubResource" } } } @@ -8555,62 +8610,41 @@ export const RunCommandResult: msRest.CompositeMapper = { } }; -export const VirtualMachineRunCommandInstanceView: msRest.CompositeMapper = { - serializedName: "VirtualMachineRunCommandInstanceView", +export const RoleInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineRunCommandInstanceView", + className: "RoleInstanceView", modelProperties: { - executionState: { - serializedName: "executionState", - type: { - name: "String" - } - }, - executionMessage: { - serializedName: "executionMessage", - type: { - name: "String" - } - }, - exitCode: { - serializedName: "exitCode", + platformUpdateDomain: { + serializedName: "platformUpdateDomain", + readOnly: true, type: { name: "Number" } }, - output: { - serializedName: "output", + platformFaultDomain: { + serializedName: "platformFaultDomain", + readOnly: true, type: { - name: "String" + name: "Number" } }, - error: { - serializedName: "error", + privateId: { + serializedName: "privateId", + readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime" - } - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime" - } - }, statuses: { serializedName: "statuses", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "InstanceViewStatus" + className: "ResourceInstanceViewStatus" } } } @@ -8619,308 +8653,330 @@ export const VirtualMachineRunCommandInstanceView: msRest.CompositeMapper = { } }; -export const VirtualMachineRunCommandScriptSource: msRest.CompositeMapper = { - serializedName: "VirtualMachineRunCommandScriptSource", +export const ResourceInstanceViewStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineRunCommandScriptSource", + className: "ResourceInstanceViewStatus", modelProperties: { - script: { - serializedName: "script", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - scriptUri: { - serializedName: "scriptUri", + displayStatus: { + serializedName: "displayStatus", + readOnly: true, type: { name: "String" } }, - commandId: { - serializedName: "commandId", + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } + }, + time: { + serializedName: "time", + readOnly: true, + type: { + name: "DateTime" + } + }, + level: { + serializedName: "level", + type: { + name: "Enum", + allowedValues: ["Info", "Warning", "Error"] + } } } } }; -export const VirtualMachineRunCommand: msRest.CompositeMapper = { - serializedName: "VirtualMachineRunCommand", +export const RoleInstanceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineRunCommand", + className: "RoleInstanceListResult", modelProperties: { - ...Resource.type.modelProperties, - source: { - serializedName: "properties.source", - type: { - name: "Composite", - className: "VirtualMachineRunCommandScriptSource" - } - }, - parameters: { - serializedName: "properties.parameters", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RunCommandInputParameter" + className: "RoleInstance" } } } }, - protectedParameters: { - serializedName: "properties.protectedParameters", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RunCommandInputParameter" - } - } + name: "String" } - }, - asyncExecution: { - serializedName: "properties.asyncExecution", - defaultValue: false, + } + } + } +}; + +export const CloudServiceRole: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudServiceRole", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - runAsUser: { - serializedName: "properties.runAsUser", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - runAsPassword: { - serializedName: "properties.runAsPassword", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - timeoutInSeconds: { - serializedName: "properties.timeoutInSeconds", + location: { + serializedName: "location", + readOnly: true, type: { - name: "Number" + name: "String" } }, - outputBlobUri: { - serializedName: "properties.outputBlobUri", + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "CloudServiceRoleSku" } }, - errorBlobUri: { - serializedName: "properties.errorBlobUri", + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CloudServiceRoleProperties" + } + } + } + } +}; + +export const CloudServiceRoleSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudServiceRoleSku", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + }, + tier: { + serializedName: "tier", type: { name: "String" } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", + capacity: { + serializedName: "capacity", type: { - name: "Composite", - className: "VirtualMachineRunCommandInstanceView" + name: "Number" } } } } }; -export const VirtualMachineRunCommandUpdate: msRest.CompositeMapper = { - serializedName: "VirtualMachineRunCommandUpdate", +export const CloudServiceRoleProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineRunCommandUpdate", + className: "CloudServiceRoleProperties", modelProperties: { - ...UpdateResource.type.modelProperties, - source: { - serializedName: "properties.source", - type: { - name: "Composite", - className: "VirtualMachineRunCommandScriptSource" - } - }, - parameters: { - serializedName: "properties.parameters", + uniqueId: { + serializedName: "uniqueId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RunCommandInputParameter" - } - } + name: "String" } - }, - protectedParameters: { - serializedName: "properties.protectedParameters", + } + } + } +}; + +export const CloudServiceRoleListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudServiceRoleListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RunCommandInputParameter" + className: "CloudServiceRole" } } } }, - asyncExecution: { - serializedName: "properties.asyncExecution", - defaultValue: false, - type: { - name: "Boolean" - } - }, - runAsUser: { - serializedName: "properties.runAsUser", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - runAsPassword: { - serializedName: "properties.runAsPassword", + } + } + } +}; + +export const CloudService: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudService", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - timeoutInSeconds: { - serializedName: "properties.timeoutInSeconds", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Number" + name: "String" } }, - outputBlobUri: { - serializedName: "properties.outputBlobUri", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - errorBlobUri: { - serializedName: "properties.errorBlobUri", + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - instanceView: { - readOnly: true, - serializedName: "properties.instanceView", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "VirtualMachineRunCommandInstanceView" + className: "CloudServiceProperties" } } } } }; -export const ResourceSkuCapacity: msRest.CompositeMapper = { - serializedName: "ResourceSkuCapacity", +export const CloudServiceProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceSkuCapacity", + className: "CloudServiceProperties", modelProperties: { - minimum: { - readOnly: true, - serializedName: "minimum", + packageUrl: { + serializedName: "packageUrl", type: { - name: "Number" + name: "String" } }, - maximum: { - readOnly: true, - serializedName: "maximum", + configuration: { + serializedName: "configuration", type: { - name: "Number" + name: "String" } }, - default: { - readOnly: true, - serializedName: "default", + configurationUrl: { + serializedName: "configurationUrl", type: { - name: "Number" + name: "String" } }, - scaleType: { - readOnly: true, - serializedName: "scaleType", + startCloudService: { + serializedName: "startCloudService", type: { - name: "Enum", - allowedValues: ["Automatic", "Manual", "None"] + name: "Boolean" } - } - } - } -}; - -export const ResourceSkuCosts: msRest.CompositeMapper = { - serializedName: "ResourceSkuCosts", - type: { - name: "Composite", - className: "ResourceSkuCosts", - modelProperties: { - meterID: { - readOnly: true, - serializedName: "meterID", + }, + allowModelOverride: { + serializedName: "allowModelOverride", + type: { + name: "Boolean" + } + }, + upgradeMode: { + serializedName: "upgradeMode", type: { name: "String" } }, - quantity: { - readOnly: true, - serializedName: "quantity", + roleProfile: { + serializedName: "roleProfile", type: { - name: "Number" + name: "Composite", + className: "CloudServiceRoleProfile" } }, - extendedUnit: { - readOnly: true, - serializedName: "extendedUnit", + osProfile: { + serializedName: "osProfile", type: { - name: "String" + name: "Composite", + className: "CloudServiceOsProfile" } - } - } - } -}; - -export const ResourceSkuCapabilities: msRest.CompositeMapper = { - serializedName: "ResourceSkuCapabilities", - type: { - name: "Composite", - className: "ResourceSkuCapabilities", - modelProperties: { - name: { + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "CloudServiceNetworkProfile" + } + }, + extensionProfile: { + serializedName: "extensionProfile", + type: { + name: "Composite", + className: "CloudServiceExtensionProfile" + } + }, + provisioningState: { + serializedName: "provisioningState", readOnly: true, - serializedName: "name", type: { name: "String" } }, - value: { + uniqueId: { + serializedName: "uniqueId", readOnly: true, - serializedName: "value", type: { name: "String" } @@ -8929,33 +8985,19 @@ export const ResourceSkuCapabilities: msRest.CompositeMapper = { } }; -export const ResourceSkuZoneDetails: msRest.CompositeMapper = { - serializedName: "ResourceSkuZoneDetails", +export const CloudServiceRoleProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceSkuZoneDetails", + className: "CloudServiceRoleProfile", modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - capabilities: { - readOnly: true, - serializedName: "capabilities", + roles: { + serializedName: "roles", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceSkuCapabilities" + className: "CloudServiceRoleProfileProperties" } } } @@ -8964,32 +9006,41 @@ export const ResourceSkuZoneDetails: msRest.CompositeMapper = { } }; -export const ResourceSkuRestrictionInfo: msRest.CompositeMapper = { - serializedName: "ResourceSkuRestrictionInfo", +export const CloudServiceRoleProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceSkuRestrictionInfo", + className: "CloudServiceRoleProfileProperties", modelProperties: { - locations: { - readOnly: true, - serializedName: "locations", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - zones: { - readOnly: true, - serializedName: "zones", + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "CloudServiceRoleSku" + } + } + } + } +}; + +export const CloudServiceOsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudServiceOsProfile", + modelProperties: { + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "CloudServiceVaultSecretGroup" } } } @@ -8998,253 +9049,172 @@ export const ResourceSkuRestrictionInfo: msRest.CompositeMapper = { } }; -export const ResourceSkuRestrictions: msRest.CompositeMapper = { - serializedName: "ResourceSkuRestrictions", +export const CloudServiceVaultSecretGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceSkuRestrictions", + className: "CloudServiceVaultSecretGroup", modelProperties: { - type: { - readOnly: true, - serializedName: "type", + sourceVault: { + serializedName: "sourceVault", type: { - name: "Enum", - allowedValues: ["Location", "Zone"] + name: "Composite", + className: "SubResource" } }, - values: { - readOnly: true, - serializedName: "values", + vaultCertificates: { + serializedName: "vaultCertificates", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "CloudServiceVaultCertificate" } } } - }, - restrictionInfo: { - readOnly: true, - serializedName: "restrictionInfo", - type: { - name: "Composite", - className: "ResourceSkuRestrictionInfo" - } - }, - reasonCode: { - readOnly: true, - serializedName: "reasonCode", - type: { - name: "Enum", - allowedValues: ["QuotaId", "NotAvailableForSubscription"] - } } } } }; -export const ResourceSkuLocationInfo: msRest.CompositeMapper = { - serializedName: "ResourceSkuLocationInfo", +export const CloudServiceVaultCertificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceSkuLocationInfo", + className: "CloudServiceVaultCertificate", modelProperties: { - location: { - readOnly: true, - serializedName: "location", + certificateUrl: { + serializedName: "certificateUrl", type: { name: "String" } - }, - zones: { - readOnly: true, - serializedName: "zones", + } + } + } +}; + +export const CloudServiceNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudServiceNetworkProfile", + modelProperties: { + loadBalancerConfigurations: { + serializedName: "loadBalancerConfigurations", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "LoadBalancerConfiguration" } } } }, - zoneDetails: { - readOnly: true, - serializedName: "zoneDetails", + swappableCloudService: { + serializedName: "swappableCloudService", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuZoneDetails" - } - } + name: "Composite", + className: "SubResource" } } } } }; -export const ResourceSku: msRest.CompositeMapper = { - serializedName: "ResourceSku", +export const LoadBalancerConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceSku", + className: "LoadBalancerConfiguration", modelProperties: { - resourceType: { - readOnly: true, - serializedName: "resourceType", + id: { + serializedName: "id", type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", + required: true, type: { name: "String" } }, - tier: { - readOnly: true, - serializedName: "tier", - type: { - name: "String" - } - }, - size: { - readOnly: true, - serializedName: "size", - type: { - name: "String" - } - }, - family: { - readOnly: true, - serializedName: "family", - type: { - name: "String" - } - }, - kind: { - readOnly: true, - serializedName: "kind", - type: { - name: "String" - } - }, - capacity: { - readOnly: true, - serializedName: "capacity", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "ResourceSkuCapacity" - } - }, - locations: { - readOnly: true, - serializedName: "locations", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - locationInfo: { - readOnly: true, - serializedName: "locationInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuLocationInfo" - } - } - } - }, - apiVersions: { - readOnly: true, - serializedName: "apiVersions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + className: "LoadBalancerConfigurationProperties" } - }, - costs: { - readOnly: true, - serializedName: "costs", + } + } + } +}; + +export const LoadBalancerConfigurationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancerConfigurationProperties", + modelProperties: { + frontendIPConfigurations: { + serializedName: "frontendIPConfigurations", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceSkuCosts" + className: "LoadBalancerFrontendIPConfiguration" } } } - }, - capabilities: { - readOnly: true, - serializedName: "capabilities", + } + } + } +}; + +export const LoadBalancerFrontendIPConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancerFrontendIPConfiguration", + modelProperties: { + name: { + serializedName: "name", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuCapabilities" - } - } + name: "String" } }, - restrictions: { - readOnly: true, - serializedName: "restrictions", + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuRestrictions" - } - } + name: "Composite", + className: "LoadBalancerFrontendIPConfigurationProperties" } } } } }; -export const ProxyOnlyResource: msRest.CompositeMapper = { - serializedName: "ProxyOnlyResource", +export const LoadBalancerFrontendIPConfigurationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyOnlyResource", + className: "LoadBalancerFrontendIPConfigurationProperties", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + publicIPAddress: { + serializedName: "publicIPAddress", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - name: { - readOnly: true, - serializedName: "name", + subnet: { + serializedName: "subnet", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - type: { - readOnly: true, - serializedName: "type", + privateIPAddress: { + serializedName: "privateIPAddress", type: { name: "String" } @@ -9253,11 +9223,31 @@ export const ProxyOnlyResource: msRest.CompositeMapper = { } }; -export const DiskSku: msRest.CompositeMapper = { - serializedName: "DiskSku", +export const CloudServiceExtensionProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudServiceExtensionProfile", + modelProperties: { + extensions: { + serializedName: "extensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Extension" + } + } + } + } + } + } +}; + +export const Extension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskSku", + className: "Extension", modelProperties: { name: { serializedName: "name", @@ -9265,140 +9255,106 @@ export const DiskSku: msRest.CompositeMapper = { name: "String" } }, - tier: { - readOnly: true, - serializedName: "tier", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "CloudServiceExtensionProperties" } } } } }; -export const ImageDiskReference: msRest.CompositeMapper = { - serializedName: "ImageDiskReference", +export const CloudServiceExtensionProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageDiskReference", + className: "CloudServiceExtensionProperties", modelProperties: { - id: { - required: true, - serializedName: "id", + publisher: { + serializedName: "publisher", type: { name: "String" } }, - lun: { - serializedName: "lun", - type: { - name: "Number" - } - } - } - } -}; - -export const CreationData: msRest.CompositeMapper = { - serializedName: "CreationData", - type: { - name: "Composite", - className: "CreationData", - modelProperties: { - createOption: { - required: true, - serializedName: "createOption", + type: { + serializedName: "type", type: { name: "String" } }, - storageAccountId: { - serializedName: "storageAccountId", + typeHandlerVersion: { + serializedName: "typeHandlerVersion", type: { name: "String" } }, - imageReference: { - serializedName: "imageReference", + autoUpgradeMinorVersion: { + serializedName: "autoUpgradeMinorVersion", type: { - name: "Composite", - className: "ImageDiskReference" + name: "Boolean" } }, - galleryImageReference: { - serializedName: "galleryImageReference", + settings: { + serializedName: "settings", type: { - name: "Composite", - className: "ImageDiskReference" + name: "String" } }, - sourceUri: { - serializedName: "sourceUri", + protectedSettings: { + serializedName: "protectedSettings", type: { name: "String" } }, - sourceResourceId: { - serializedName: "sourceResourceId", + protectedSettingsFromKeyVault: { + serializedName: "protectedSettingsFromKeyVault", type: { - name: "String" + name: "Composite", + className: "CloudServiceVaultAndSecretReference" } }, - sourceUniqueId: { - readOnly: true, - serializedName: "sourceUniqueId", + forceUpdateTag: { + serializedName: "forceUpdateTag", type: { name: "String" } }, - uploadSizeBytes: { - serializedName: "uploadSizeBytes", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { - name: "Number" + name: "String" } }, - logicalSectorSize: { - serializedName: "logicalSectorSize", - type: { - name: "Number" - } - } - } - } -}; - -export const SourceVault: msRest.CompositeMapper = { - serializedName: "SourceVault", - type: { - name: "Composite", - className: "SourceVault", - modelProperties: { - id: { - serializedName: "id", + rolesAppliedTo: { + serializedName: "rolesAppliedTo", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const KeyVaultAndSecretReference: msRest.CompositeMapper = { - serializedName: "KeyVaultAndSecretReference", +export const CloudServiceVaultAndSecretReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyVaultAndSecretReference", + className: "CloudServiceVaultAndSecretReference", modelProperties: { sourceVault: { - required: true, serializedName: "sourceVault", type: { name: "Composite", - className: "SourceVault" + className: "SubResource" } }, secretUrl: { - required: true, serializedName: "secretUrl", type: { name: "String" @@ -9408,121 +9364,135 @@ export const KeyVaultAndSecretReference: msRest.CompositeMapper = { } }; -export const KeyVaultAndKeyReference: msRest.CompositeMapper = { - serializedName: "KeyVaultAndKeyReference", +export const CloudServiceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyVaultAndKeyReference", + className: "CloudServiceUpdate", modelProperties: { - sourceVault: { - required: true, - serializedName: "sourceVault", - type: { - name: "Composite", - className: "SourceVault" - } - }, - keyUrl: { - required: true, - serializedName: "keyUrl", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const EncryptionSettingsElement: msRest.CompositeMapper = { - serializedName: "EncryptionSettingsElement", +export const CloudServiceInstanceView: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EncryptionSettingsElement", + className: "CloudServiceInstanceView", modelProperties: { - diskEncryptionKey: { - serializedName: "diskEncryptionKey", + roleInstance: { + serializedName: "roleInstance", type: { name: "Composite", - className: "KeyVaultAndSecretReference" + className: "InstanceViewStatusesSummary" } }, - keyEncryptionKey: { - serializedName: "keyEncryptionKey", + sdkVersion: { + serializedName: "sdkVersion", + readOnly: true, type: { - name: "Composite", - className: "KeyVaultAndKeyReference" + name: "String" + } + }, + privateIds: { + serializedName: "privateIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + statuses: { + serializedName: "statuses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceInstanceViewStatus" + } + } } } } } }; -export const EncryptionSettingsCollection: msRest.CompositeMapper = { - serializedName: "EncryptionSettingsCollection", +export const InstanceViewStatusesSummary: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EncryptionSettingsCollection", + className: "InstanceViewStatusesSummary", modelProperties: { - enabled: { - required: true, - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - encryptionSettings: { - serializedName: "encryptionSettings", + statusesSummary: { + serializedName: "statusesSummary", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "EncryptionSettingsElement" + className: "StatusCodeCount" } } } - }, - encryptionSettingsVersion: { - serializedName: "encryptionSettingsVersion", - type: { - name: "String" - } } } } }; -export const Encryption: msRest.CompositeMapper = { - serializedName: "Encryption", +export const StatusCodeCount: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Encryption", + className: "StatusCodeCount", modelProperties: { - diskEncryptionSetId: { - serializedName: "diskEncryptionSetId", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + count: { + serializedName: "count", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const ShareInfoElement: msRest.CompositeMapper = { - serializedName: "ShareInfoElement", +export const CloudServiceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ShareInfoElement", + className: "CloudServiceListResult", modelProperties: { - vmUri: { - readOnly: true, - serializedName: "vmUri", + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CloudService" + } + } + } + }, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -9531,30 +9501,42 @@ export const ShareInfoElement: msRest.CompositeMapper = { } }; -export const PropertyUpdatesInProgress: msRest.CompositeMapper = { - serializedName: "PropertyUpdatesInProgress", +export const RoleInstances: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PropertyUpdatesInProgress", + className: "RoleInstances", modelProperties: { - targetTier: { - serializedName: "targetTier", + roleInstances: { + serializedName: "roleInstances", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const DiskSecurityProfile: msRest.CompositeMapper = { - serializedName: "DiskSecurityProfile", +export const UpdateDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskSecurityProfile", + className: "UpdateDomain", modelProperties: { - securityType: { - serializedName: "securityType", + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } @@ -9563,441 +9545,605 @@ export const DiskSecurityProfile: msRest.CompositeMapper = { } }; -export const Disk: msRest.CompositeMapper = { - serializedName: "Disk", +export const UpdateDomainListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Disk", + className: "UpdateDomainListResult", modelProperties: { - ...Resource.type.modelProperties, - managedBy: { - readOnly: true, - serializedName: "managedBy", - type: { - name: "String" - } - }, - managedByExtended: { - readOnly: true, - serializedName: "managedByExtended", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "UpdateDomain" } } } }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "DiskSku" - } - }, - zones: { - serializedName: "zones", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - }, - extendedLocation: { - serializedName: "extendedLocation", + } + } + } +}; + +export const OSVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSVersion", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } }, - timeCreated: { + name: { + serializedName: "name", readOnly: true, - serializedName: "properties.timeCreated", type: { - name: "DateTime" + name: "String" } }, - osType: { - serializedName: "properties.osType", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "String" } }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } }, - purchasePlan: { - serializedName: "properties.purchasePlan", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "PurchasePlan" + className: "OSVersionProperties" } - }, - creationData: { - required: true, - serializedName: "properties.creationData", + } + } + } +}; + +export const OSVersionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSVersionProperties", + modelProperties: { + family: { + serializedName: "family", + readOnly: true, type: { - name: "Composite", - className: "CreationData" + name: "String" } }, - diskSizeGB: { - serializedName: "properties.diskSizeGB", + familyLabel: { + serializedName: "familyLabel", + readOnly: true, type: { - name: "Number" + name: "String" } }, - diskSizeBytes: { + version: { + serializedName: "version", readOnly: true, - serializedName: "properties.diskSizeBytes", type: { - name: "Number" + name: "String" } }, - uniqueId: { + label: { + serializedName: "label", readOnly: true, - serializedName: "properties.uniqueId", type: { name: "String" } }, - encryptionSettingsCollection: { - serializedName: "properties.encryptionSettingsCollection", + isDefault: { + serializedName: "isDefault", + readOnly: true, type: { - name: "Composite", - className: "EncryptionSettingsCollection" + name: "Boolean" } }, - provisioningState: { + isActive: { + serializedName: "isActive", readOnly: true, - serializedName: "properties.provisioningState", type: { - name: "String" + name: "Boolean" } - }, - diskIOPSReadWrite: { - serializedName: "properties.diskIOPSReadWrite", + } + } + } +}; + +export const OSVersionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSVersionListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OSVersion" + } + } } }, - diskMBpsReadWrite: { - serializedName: "properties.diskMBpsReadWrite", + nextLink: { + serializedName: "nextLink", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const OSFamily: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSFamily", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" } }, - diskIOPSReadOnly: { - serializedName: "properties.diskIOPSReadOnly", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Number" + name: "String" } }, - diskMBpsReadOnly: { - serializedName: "properties.diskMBpsReadOnly", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Number" + name: "String" } }, - diskState: { - serializedName: "properties.diskState", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } }, - encryption: { - serializedName: "properties.encryption", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "Encryption" + className: "OSFamilyProperties" + } + } + } + } +}; + +export const OSFamilyProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSFamilyProperties", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" } }, - maxShares: { - serializedName: "properties.maxShares", + label: { + serializedName: "label", + readOnly: true, type: { - name: "Number" + name: "String" } }, - shareInfo: { + versions: { + serializedName: "versions", readOnly: true, - serializedName: "properties.shareInfo", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ShareInfoElement" + className: "OSVersionPropertiesBase" } } } - }, - networkAccessPolicy: { - serializedName: "properties.networkAccessPolicy", - type: { - name: "String" - } - }, - diskAccessId: { - serializedName: "properties.diskAccessId", - type: { - name: "String" - } - }, - tier: { - serializedName: "properties.tier", - type: { - name: "String" - } - }, - burstingEnabled: { - serializedName: "properties.burstingEnabled", + } + } + } +}; + +export const OSVersionPropertiesBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSVersionPropertiesBase", + modelProperties: { + version: { + serializedName: "version", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - propertyUpdatesInProgress: { + label: { + serializedName: "label", readOnly: true, - serializedName: "properties.propertyUpdatesInProgress", type: { - name: "Composite", - className: "PropertyUpdatesInProgress" + name: "String" } }, - supportsHibernation: { - serializedName: "properties.supportsHibernation", + isDefault: { + serializedName: "isDefault", + readOnly: true, type: { name: "Boolean" } }, - securityProfile: { - serializedName: "properties.securityProfile", + isActive: { + serializedName: "isActive", + readOnly: true, type: { - name: "Composite", - className: "DiskSecurityProfile" + name: "Boolean" } } } } }; -export const DiskUpdate: msRest.CompositeMapper = { - serializedName: "DiskUpdate", +export const OSFamilyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskUpdate", + className: "OSFamilyListResult", modelProperties: { - osType: { - serializedName: "properties.osType", + value: { + serializedName: "value", + required: true, type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OSFamily" + } + } } }, - diskSizeGB: { - serializedName: "properties.diskSizeGB", + nextLink: { + serializedName: "nextLink", type: { - name: "Number" + name: "String" } - }, - encryptionSettingsCollection: { - serializedName: "properties.encryptionSettingsCollection", + } + } + } +}; + +export const GalleryArtifactSource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GalleryArtifactSource", + modelProperties: { + managedImage: { + serializedName: "managedImage", type: { name: "Composite", - className: "EncryptionSettingsCollection" + className: "ManagedArtifact" } - }, - diskIOPSReadWrite: { - serializedName: "properties.diskIOPSReadWrite", + } + } + } +}; + +export const ManagedArtifact: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedArtifact", + modelProperties: { + id: { + serializedName: "id", + required: true, type: { - name: "Number" + name: "String" } - }, - diskMBpsReadWrite: { - serializedName: "properties.diskMBpsReadWrite", + } + } + } +}; + +export const AvailabilitySet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailabilitySet", + modelProperties: { + ...Resource.type.modelProperties, + sku: { + serializedName: "sku", type: { - name: "Number" + name: "Composite", + className: "Sku" } }, - diskIOPSReadOnly: { - serializedName: "properties.diskIOPSReadOnly", + platformUpdateDomainCount: { + serializedName: "properties.platformUpdateDomainCount", type: { name: "Number" } }, - diskMBpsReadOnly: { - serializedName: "properties.diskMBpsReadOnly", + platformFaultDomainCount: { + serializedName: "properties.platformFaultDomainCount", type: { name: "Number" } }, - maxShares: { - serializedName: "properties.maxShares", + virtualMachines: { + serializedName: "properties.virtualMachines", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } } }, - encryption: { - serializedName: "properties.encryption", + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", type: { name: "Composite", - className: "Encryption" - } - }, - networkAccessPolicy: { - serializedName: "properties.networkAccessPolicy", - type: { - name: "String" + className: "SubResource" } }, - diskAccessId: { - serializedName: "properties.diskAccessId", + statuses: { + serializedName: "properties.statuses", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceViewStatus" + } + } } - }, - tier: { - serializedName: "properties.tier", + } + } + } +}; + +export const ProximityPlacementGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProximityPlacementGroup", + modelProperties: { + ...Resource.type.modelProperties, + proximityPlacementGroupType: { + serializedName: "properties.proximityPlacementGroupType", type: { name: "String" } }, - burstingEnabled: { - serializedName: "properties.burstingEnabled", - type: { - name: "Boolean" - } - }, - purchasePlan: { - serializedName: "properties.purchasePlan", - type: { - name: "Composite", - className: "PurchasePlan" - } - }, - propertyUpdatesInProgress: { + virtualMachines: { + serializedName: "properties.virtualMachines", readOnly: true, - serializedName: "properties.propertyUpdatesInProgress", type: { - name: "Composite", - className: "PropertyUpdatesInProgress" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResourceWithColocationStatus" + } + } } }, - supportsHibernation: { - serializedName: "properties.supportsHibernation", + virtualMachineScaleSets: { + serializedName: "properties.virtualMachineScaleSets", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResourceWithColocationStatus" + } + } } }, - tags: { - serializedName: "tags", + availabilitySets: { + serializedName: "properties.availabilitySets", + readOnly: true, type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "SubResourceWithColocationStatus" } } } }, - sku: { - serializedName: "sku", + colocationStatus: { + serializedName: "properties.colocationStatus", type: { name: "Composite", - className: "DiskSku" + className: "InstanceViewStatus" } } } } }; -export const SnapshotSku: msRest.CompositeMapper = { - serializedName: "SnapshotSku", +export const DedicatedHostGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotSku", + className: "DedicatedHostGroup", modelProperties: { - name: { - serializedName: "name", + ...Resource.type.modelProperties, + zones: { + serializedName: "zones", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + platformFaultDomainCount: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "properties.platformFaultDomainCount", + type: { + name: "Number" + } + }, + hosts: { + serializedName: "properties.hosts", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResourceReadOnly" + } + } + } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "DedicatedHostGroupInstanceView" } }, - tier: { - readOnly: true, - serializedName: "tier", + supportAutomaticPlacement: { + serializedName: "properties.supportAutomaticPlacement", type: { - name: "String" + name: "Boolean" } } } } }; -export const KeyForDiskEncryptionSet: msRest.CompositeMapper = { - serializedName: "KeyForDiskEncryptionSet", +export const DedicatedHost: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyForDiskEncryptionSet", + className: "DedicatedHost", modelProperties: { - sourceVault: { - serializedName: "sourceVault", + ...Resource.type.modelProperties, + sku: { + serializedName: "sku", type: { name: "Composite", - className: "SourceVault" + className: "Sku" } }, - keyUrl: { - required: true, - serializedName: "keyUrl", + platformFaultDomain: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.platformFaultDomain", + type: { + name: "Number" + } + }, + autoReplaceOnFailure: { + serializedName: "properties.autoReplaceOnFailure", + type: { + name: "Boolean" + } + }, + hostId: { + serializedName: "properties.hostId", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const GrantAccessData: msRest.CompositeMapper = { - serializedName: "GrantAccessData", - type: { - name: "Composite", - className: "GrantAccessData", - modelProperties: { - access: { - required: true, - serializedName: "access", + }, + virtualMachines: { + serializedName: "properties.virtualMachines", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResourceReadOnly" + } + } + } + }, + licenseType: { + serializedName: "properties.licenseType", + type: { + name: "Enum", + allowedValues: [ + "None", + "Windows_Server_Hybrid", + "Windows_Server_Perpetual" + ] + } + }, + provisioningTime: { + serializedName: "properties.provisioningTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - durationInSeconds: { - required: true, - serializedName: "durationInSeconds", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "Number" + name: "Composite", + className: "DedicatedHostInstanceView" } } } } }; -export const AccessUri: msRest.CompositeMapper = { - serializedName: "AccessUri", +export const SshPublicKeyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AccessUri", + className: "SshPublicKeyResource", modelProperties: { - accessSAS: { - readOnly: true, - serializedName: "accessSAS", + ...Resource.type.modelProperties, + publicKey: { + serializedName: "properties.publicKey", type: { name: "String" } @@ -10006,367 +10152,322 @@ export const AccessUri: msRest.CompositeMapper = { } }; -export const Snapshot: msRest.CompositeMapper = { - serializedName: "Snapshot", +export const VirtualMachineExtensionImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Snapshot", + className: "VirtualMachineExtensionImage", modelProperties: { ...Resource.type.modelProperties, - managedBy: { - readOnly: true, - serializedName: "managedBy", + operatingSystem: { + serializedName: "properties.operatingSystem", type: { name: "String" } }, - sku: { - serializedName: "sku", + computeRole: { + serializedName: "properties.computeRole", type: { - name: "Composite", - className: "SnapshotSku" + name: "String" } }, - extendedLocation: { - serializedName: "extendedLocation", + handlerSchema: { + serializedName: "properties.handlerSchema", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } }, - timeCreated: { - readOnly: true, - serializedName: "properties.timeCreated", + vmScaleSetEnabled: { + serializedName: "properties.vmScaleSetEnabled", type: { - name: "DateTime" + name: "Boolean" } }, - osType: { - serializedName: "properties.osType", + supportsMultipleExtensions: { + serializedName: "properties.supportsMultipleExtensions", type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "Boolean" } - }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + } + } + } +}; + +export const VirtualMachineExtension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineExtension", + modelProperties: { + ...Resource.type.modelProperties, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } }, - purchasePlan: { - serializedName: "properties.purchasePlan", + publisher: { + serializedName: "properties.publisher", type: { - name: "Composite", - className: "PurchasePlan" + name: "String" } }, - creationData: { - required: true, - serializedName: "properties.creationData", + typePropertiesType: { + serializedName: "properties.type", type: { - name: "Composite", - className: "CreationData" + name: "String" } }, - diskSizeGB: { - serializedName: "properties.diskSizeGB", + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", type: { - name: "Number" + name: "String" } }, - diskSizeBytes: { - readOnly: true, - serializedName: "properties.diskSizeBytes", + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "Number" + name: "Boolean" } }, - diskState: { - serializedName: "properties.diskState", + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", type: { - name: "String" + name: "Boolean" } }, - uniqueId: { - readOnly: true, - serializedName: "properties.uniqueId", + settings: { + serializedName: "properties.settings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, - encryptionSettingsCollection: { - serializedName: "properties.encryptionSettingsCollection", + protectedSettings: { + serializedName: "properties.protectedSettings", type: { - name: "Composite", - className: "EncryptionSettingsCollection" + name: "Dictionary", + value: { type: { name: "any" } } } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - incremental: { - serializedName: "properties.incremental", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "Boolean" + name: "Composite", + className: "VirtualMachineExtensionInstanceView" } - }, - encryption: { - serializedName: "properties.encryption", + } + } + } +}; + +export const VirtualMachine: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachine", + modelProperties: { + ...Resource.type.modelProperties, + plan: { + serializedName: "plan", type: { name: "Composite", - className: "Encryption" + className: "Plan" } }, - networkAccessPolicy: { - serializedName: "properties.networkAccessPolicy", + resources: { + serializedName: "resources", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineExtension" + } + } } }, - diskAccessId: { - serializedName: "properties.diskAccessId", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "VirtualMachineIdentity" } }, - supportsHibernation: { - serializedName: "properties.supportsHibernation", - type: { - name: "Boolean" - } - } - } - } -}; - -export const SnapshotUpdate: msRest.CompositeMapper = { - serializedName: "SnapshotUpdate", - type: { - name: "Composite", - className: "SnapshotUpdate", - modelProperties: { - osType: { - serializedName: "properties.osType", + zones: { + serializedName: "zones", type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - diskSizeGB: { - serializedName: "properties.diskSizeGB", + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "Number" + name: "Composite", + className: "ExtendedLocation" } }, - encryptionSettingsCollection: { - serializedName: "properties.encryptionSettingsCollection", + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { name: "Composite", - className: "EncryptionSettingsCollection" + className: "HardwareProfile" } }, - encryption: { - serializedName: "properties.encryption", + storageProfile: { + serializedName: "properties.storageProfile", type: { name: "Composite", - className: "Encryption" + className: "StorageProfile" } }, - networkAccessPolicy: { - serializedName: "properties.networkAccessPolicy", + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", type: { - name: "String" + name: "Composite", + className: "AdditionalCapabilities" } }, - diskAccessId: { - serializedName: "properties.diskAccessId", + osProfile: { + serializedName: "properties.osProfile", type: { - name: "String" + name: "Composite", + className: "OSProfile" } }, - supportsHibernation: { - serializedName: "properties.supportsHibernation", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "Boolean" + name: "Composite", + className: "NetworkProfile" } }, - tags: { - serializedName: "tags", + securityProfile: { + serializedName: "properties.securityProfile", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "SecurityProfile" } }, - sku: { - serializedName: "sku", + diagnosticsProfile: { + serializedName: "properties.diagnosticsProfile", type: { name: "Composite", - className: "SnapshotSku" + className: "DiagnosticsProfile" } - } - } - } -}; - -export const EncryptionSetIdentity: msRest.CompositeMapper = { - serializedName: "EncryptionSetIdentity", - type: { - name: "Composite", - className: "EncryptionSetIdentity", - modelProperties: { - type: { - serializedName: "type", + }, + availabilitySet: { + serializedName: "properties.availabilitySet", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - principalId: { - readOnly: true, - serializedName: "principalId", + virtualMachineScaleSet: { + serializedName: "properties.virtualMachineScaleSet", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - tenantId: { - readOnly: true, - serializedName: "tenantId", + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", type: { - name: "String" + name: "Composite", + className: "SubResource" } - } - } - } -}; - -export const DiskEncryptionSet: msRest.CompositeMapper = { - serializedName: "DiskEncryptionSet", - type: { - name: "Composite", - className: "DiskEncryptionSet", - modelProperties: { - ...Resource.type.modelProperties, - identity: { - serializedName: "identity", + }, + priority: { + serializedName: "properties.priority", type: { - name: "Composite", - className: "EncryptionSetIdentity" + name: "String" } }, - encryptionType: { - serializedName: "properties.encryptionType", + evictionPolicy: { + serializedName: "properties.evictionPolicy", type: { name: "String" } }, - activeKey: { - serializedName: "properties.activeKey", + billingProfile: { + serializedName: "properties.billingProfile", type: { name: "Composite", - className: "KeyForDiskEncryptionSet" + className: "BillingProfile" } }, - previousKeys: { - readOnly: true, - serializedName: "properties.previousKeys", + host: { + serializedName: "properties.host", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyForDiskEncryptionSet" - } - } + name: "Composite", + className: "SubResource" + } + }, + hostGroup: { + serializedName: "properties.hostGroup", + type: { + name: "Composite", + className: "SubResource" } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - rotationToLatestKeyVersionEnabled: { - serializedName: "properties.rotationToLatestKeyVersionEnabled", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "Boolean" + name: "Composite", + className: "VirtualMachineInstanceView" } }, - lastKeyRotationTimestamp: { - readOnly: true, - serializedName: "properties.lastKeyRotationTimestamp", - type: { - name: "DateTime" - } - } - } - } -}; - -export const DiskEncryptionSetUpdate: msRest.CompositeMapper = { - serializedName: "DiskEncryptionSetUpdate", - type: { - name: "Composite", - className: "DiskEncryptionSetUpdate", - modelProperties: { - encryptionType: { - serializedName: "properties.encryptionType", + licenseType: { + serializedName: "properties.licenseType", type: { name: "String" } }, - activeKey: { - serializedName: "properties.activeKey", + vmId: { + serializedName: "properties.vmId", + readOnly: true, type: { - name: "Composite", - className: "KeyForDiskEncryptionSet" + name: "String" } }, - rotationToLatestKeyVersionEnabled: { - serializedName: "properties.rotationToLatestKeyVersionEnabled", + extensionsTimeBudget: { + serializedName: "properties.extensionsTimeBudget", type: { - name: "Boolean" + name: "String" } }, - tags: { - serializedName: "tags", + platformFaultDomain: { + serializedName: "properties.platformFaultDomain", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Number" } }, - identity: { - serializedName: "identity", + scheduledEventsProfile: { + serializedName: "properties.scheduledEventsProfile", type: { name: "Composite", - className: "EncryptionSetIdentity" + className: "ScheduledEventsProfile" } - } - } - } -}; - -export const PrivateEndpoint: msRest.CompositeMapper = { - serializedName: "PrivateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", + }, + userData: { + serializedName: "properties.userData", type: { name: "String" } @@ -10375,199 +10476,146 @@ export const PrivateEndpoint: msRest.CompositeMapper = { } }; -export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { - serializedName: "PrivateLinkServiceConnectionState", +export const VirtualMachineScaleSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkServiceConnectionState", + className: "VirtualMachineScaleSet", modelProperties: { - status: { - serializedName: "status", + ...Resource.type.modelProperties, + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } }, - description: { - serializedName: "description", + plan: { + serializedName: "plan", type: { - name: "String" + name: "Composite", + className: "Plan" } }, - actionsRequired: { - serializedName: "actionsRequired", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetIdentity" + } + }, + zones: { + serializedName: "zones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const PrivateEndpointConnection: msRest.CompositeMapper = { - serializedName: "PrivateEndpointConnection", - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - privateEndpoint: { - readOnly: true, - serializedName: "properties.privateEndpoint", + }, + extendedLocation: { + serializedName: "extendedLocation", type: { name: "Composite", - className: "PrivateEndpoint" + className: "ExtendedLocation" } }, - privateLinkServiceConnectionState: { - required: true, - serializedName: "properties.privateLinkServiceConnectionState", + upgradePolicy: { + serializedName: "properties.upgradePolicy", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" + className: "UpgradePolicy" } }, - provisioningState: { - serializedName: "properties.provisioningState", + automaticRepairsPolicy: { + serializedName: "properties.automaticRepairsPolicy", type: { - name: "String" + name: "Composite", + className: "AutomaticRepairsPolicy" } }, - id: { - readOnly: true, - serializedName: "id", + virtualMachineProfile: { + serializedName: "properties.virtualMachineProfile", type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetVMProfile" } }, - name: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "name", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + overprovision: { + serializedName: "properties.overprovision", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const DiskAccess: msRest.CompositeMapper = { - serializedName: "DiskAccess", - type: { - name: "Composite", - className: "DiskAccess", - modelProperties: { - ...Resource.type.modelProperties, - privateEndpointConnections: { - readOnly: true, - serializedName: "properties.privateEndpointConnections", + }, + doNotRunExtensionsOnOverprovisionedVMs: { + serializedName: "properties.doNotRunExtensionsOnOverprovisionedVMs", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "Boolean" } }, - provisioningState: { + uniqueId: { + serializedName: "properties.uniqueId", readOnly: true, - serializedName: "properties.provisioningState", type: { name: "String" } }, - timeCreated: { - readOnly: true, - serializedName: "properties.timeCreated", + singlePlacementGroup: { + serializedName: "properties.singlePlacementGroup", type: { - name: "DateTime" + name: "Boolean" } - } - } - } -}; - -export const DiskAccessUpdate: msRest.CompositeMapper = { - serializedName: "DiskAccessUpdate", - type: { - name: "Composite", - className: "DiskAccessUpdate", - modelProperties: { - tags: { - serializedName: "tags", + }, + zoneBalance: { + serializedName: "properties.zoneBalance", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Boolean" } - } - } - } -}; - -export const PrivateLinkResource: msRest.CompositeMapper = { - serializedName: "PrivateLinkResource", - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - groupId: { - readOnly: true, - serializedName: "properties.groupId", + }, + platformFaultDomainCount: { + serializedName: "properties.platformFaultDomainCount", type: { - name: "String" + name: "Number" } }, - requiredMembers: { - readOnly: true, - serializedName: "properties.requiredMembers", + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "SubResource" } }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", + hostGroup: { + serializedName: "properties.hostGroup", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "SubResource" } }, - id: { - readOnly: true, - serializedName: "id", + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", type: { - name: "String" + name: "Composite", + className: "AdditionalCapabilities" } }, - name: { - readOnly: true, - serializedName: "name", + scaleInPolicy: { + serializedName: "properties.scaleInPolicy", type: { - name: "String" + name: "Composite", + className: "ScaleInPolicy" } }, - type: { - readOnly: true, - serializedName: "type", + orchestrationMode: { + serializedName: "properties.orchestrationMode", type: { name: "String" } @@ -10576,33 +10624,38 @@ export const PrivateLinkResource: msRest.CompositeMapper = { } }; -export const DiskRestorePoint: msRest.CompositeMapper = { - serializedName: "DiskRestorePoint", +export const Image: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskRestorePoint", + className: "Image", modelProperties: { - ...ProxyOnlyResource.type.modelProperties, - timeCreated: { - readOnly: true, - serializedName: "properties.timeCreated", + ...Resource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "DateTime" + name: "Composite", + className: "ExtendedLocation" } }, - sourceResourceId: { - readOnly: true, - serializedName: "properties.sourceResourceId", + sourceVirtualMachine: { + serializedName: "properties.sourceVirtualMachine", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - osType: { + storageProfile: { + serializedName: "properties.storageProfile", + type: { + name: "Composite", + className: "ImageStorageProfile" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "properties.osType", type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "String" } }, hyperVGeneration: { @@ -10610,60 +10663,47 @@ export const DiskRestorePoint: msRest.CompositeMapper = { type: { name: "String" } - }, - purchasePlan: { - serializedName: "properties.purchasePlan", + } + } + } +}; + +export const RestorePointCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorePointCollection", + modelProperties: { + ...Resource.type.modelProperties, + source: { + serializedName: "properties.source", type: { name: "Composite", - className: "PurchasePlan" + className: "RestorePointCollectionSourceProperties" } }, - familyId: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "properties.familyId", type: { name: "String" } }, - sourceUniqueId: { + restorePointCollectionId: { + serializedName: "properties.restorePointCollectionId", readOnly: true, - serializedName: "properties.sourceUniqueId", type: { name: "String" } }, - encryption: { + restorePoints: { + serializedName: "properties.restorePoints", readOnly: true, - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "Encryption" - } - }, - supportsHibernation: { - serializedName: "properties.supportsHibernation", - type: { - name: "Boolean" - } - } - } - } -}; - -export const PrivateLinkResourceListResult: msRest.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "RestorePoint" } } } @@ -10672,835 +10712,811 @@ export const PrivateLinkResourceListResult: msRest.CompositeMapper = { } }; -export const GalleryIdentifier: msRest.CompositeMapper = { - serializedName: "GalleryIdentifier", +export const RollingUpgradeStatusInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryIdentifier", + className: "RollingUpgradeStatusInfo", modelProperties: { - uniqueName: { - readOnly: true, - serializedName: "uniqueName", + ...Resource.type.modelProperties, + policy: { + serializedName: "properties.policy", type: { - name: "String" + name: "Composite", + className: "RollingUpgradePolicy" + } + }, + runningStatus: { + serializedName: "properties.runningStatus", + type: { + name: "Composite", + className: "RollingUpgradeRunningStatus" + } + }, + progress: { + serializedName: "properties.progress", + type: { + name: "Composite", + className: "RollingUpgradeProgressInfo" + } + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "ApiError" } } } } }; -export const SharingProfileGroup: msRest.CompositeMapper = { - serializedName: "SharingProfileGroup", +export const VirtualMachineScaleSetVM: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharingProfileGroup", + className: "VirtualMachineScaleSetVM", modelProperties: { - type: { - serializedName: "type", + ...Resource.type.modelProperties, + instanceId: { + serializedName: "instanceId", + readOnly: true, type: { name: "String" } }, - ids: { - serializedName: "ids", + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + plan: { + serializedName: "plan", + type: { + name: "Composite", + className: "Plan" + } + }, + resources: { + serializedName: "resources", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VirtualMachineExtension" } } } - } - } - } -}; - -export const SharingProfile: msRest.CompositeMapper = { - serializedName: "SharingProfile", - type: { - name: "Composite", - className: "SharingProfile", - modelProperties: { - permissions: { - serializedName: "permissions", - type: { - name: "String" - } }, - groups: { + zones: { + serializedName: "zones", readOnly: true, - serializedName: "groups", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SharingProfileGroup" + name: "String" } } } - } - } - } -}; - -export const Gallery: msRest.CompositeMapper = { - serializedName: "Gallery", - type: { - name: "Composite", - className: "Gallery", - modelProperties: { - ...Resource.type.modelProperties, - description: { - serializedName: "properties.description", + }, + latestModelApplied: { + serializedName: "properties.latestModelApplied", + readOnly: true, + type: { + name: "Boolean" + } + }, + vmId: { + serializedName: "properties.vmId", + readOnly: true, type: { name: "String" } }, - identifier: { - serializedName: "properties.identifier", + instanceView: { + serializedName: "properties.instanceView", type: { name: "Composite", - className: "GalleryIdentifier" + className: "VirtualMachineScaleSetVMInstanceView" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { - name: "String" + name: "Composite", + className: "HardwareProfile" } }, - sharingProfile: { - serializedName: "properties.sharingProfile", + storageProfile: { + serializedName: "properties.storageProfile", type: { name: "Composite", - className: "SharingProfile" + className: "StorageProfile" } - } - } - } -}; - -export const UpdateResourceDefinition: msRest.CompositeMapper = { - serializedName: "UpdateResourceDefinition", - type: { - name: "Composite", - className: "UpdateResourceDefinition", - modelProperties: { - id: { + }, + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", + type: { + name: "Composite", + className: "AdditionalCapabilities" + } + }, + osProfile: { + serializedName: "properties.osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + }, + securityProfile: { + serializedName: "properties.securityProfile", + type: { + name: "Composite", + className: "SecurityProfile" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + }, + networkProfileConfiguration: { + serializedName: "properties.networkProfileConfiguration", + type: { + name: "Composite", + className: "VirtualMachineScaleSetVMNetworkProfileConfiguration" + } + }, + diagnosticsProfile: { + serializedName: "properties.diagnosticsProfile", + type: { + name: "Composite", + className: "DiagnosticsProfile" + } + }, + availabilitySet: { + serializedName: "properties.availabilitySet", + type: { + name: "Composite", + className: "SubResource" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "id", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + licenseType: { + serializedName: "properties.licenseType", type: { name: "String" } }, - type: { + modelDefinitionApplied: { + serializedName: "properties.modelDefinitionApplied", readOnly: true, - serializedName: "type", type: { name: "String" } }, - tags: { - serializedName: "tags", + protectionPolicy: { + serializedName: "properties.protectionPolicy", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "VirtualMachineScaleSetVMProtectionPolicy" + } + }, + userData: { + serializedName: "properties.userData", + type: { + name: "String" } } } } }; -export const GalleryUpdate: msRest.CompositeMapper = { - serializedName: "GalleryUpdate", +export const VirtualMachineRunCommand: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryUpdate", + className: "VirtualMachineRunCommand", modelProperties: { - ...UpdateResourceDefinition.type.modelProperties, - description: { - serializedName: "properties.description", + ...Resource.type.modelProperties, + source: { + serializedName: "properties.source", type: { - name: "String" + name: "Composite", + className: "VirtualMachineRunCommandScriptSource" } }, - identifier: { - serializedName: "properties.identifier", + parameters: { + serializedName: "properties.parameters", type: { - name: "Composite", - className: "GalleryIdentifier" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + protectedParameters: { + serializedName: "properties.protectedParameters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } + } + }, + asyncExecution: { + serializedName: "properties.asyncExecution", + type: { + name: "Boolean" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + runAsUser: { + serializedName: "properties.runAsUser", type: { name: "String" } }, - sharingProfile: { - serializedName: "properties.sharingProfile", - type: { - name: "Composite", - className: "SharingProfile" - } - } - } - } -}; - -export const GalleryApplication: msRest.CompositeMapper = { - serializedName: "GalleryApplication", - type: { - name: "Composite", - className: "GalleryApplication", - modelProperties: { - ...Resource.type.modelProperties, - description: { - serializedName: "properties.description", + runAsPassword: { + serializedName: "properties.runAsPassword", type: { name: "String" } }, - eula: { - serializedName: "properties.eula", + timeoutInSeconds: { + serializedName: "properties.timeoutInSeconds", type: { - name: "String" + name: "Number" } }, - privacyStatementUri: { - serializedName: "properties.privacyStatementUri", + outputBlobUri: { + serializedName: "properties.outputBlobUri", type: { name: "String" } }, - releaseNoteUri: { - serializedName: "properties.releaseNoteUri", + errorBlobUri: { + serializedName: "properties.errorBlobUri", type: { name: "String" } }, - endOfLifeDate: { - serializedName: "properties.endOfLifeDate", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "DateTime" + name: "String" } }, - supportedOSType: { - required: true, - serializedName: "properties.supportedOSType", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "Composite", + className: "VirtualMachineRunCommandInstanceView" } } } } }; -export const GalleryApplicationUpdate: msRest.CompositeMapper = { - serializedName: "GalleryApplicationUpdate", +export const Disk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryApplicationUpdate", + className: "Disk", modelProperties: { - ...UpdateResourceDefinition.type.modelProperties, - description: { - serializedName: "properties.description", + ...Resource.type.modelProperties, + managedBy: { + serializedName: "managedBy", + readOnly: true, type: { name: "String" } }, - eula: { - serializedName: "properties.eula", + managedByExtended: { + serializedName: "managedByExtended", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - privacyStatementUri: { - serializedName: "properties.privacyStatementUri", + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "DiskSku" } }, - releaseNoteUri: { - serializedName: "properties.releaseNoteUri", + zones: { + serializedName: "zones", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - endOfLifeDate: { - serializedName: "properties.endOfLifeDate", + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + timeCreated: { + serializedName: "properties.timeCreated", + readOnly: true, type: { name: "DateTime" } }, - supportedOSType: { - required: true, - serializedName: "properties.supportedOSType", + osType: { + serializedName: "properties.osType", type: { name: "Enum", allowedValues: ["Windows", "Linux"] } - } - } - } -}; - -export const UserArtifactSource: msRest.CompositeMapper = { - serializedName: "UserArtifactSource", - type: { - name: "Composite", - className: "UserArtifactSource", - modelProperties: { - mediaLink: { - required: true, - serializedName: "mediaLink", - type: { - name: "String" - } }, - defaultConfigurationLink: { - serializedName: "defaultConfigurationLink", - type: { - name: "String" - } - } - } - } -}; - -export const UserArtifactManage: msRest.CompositeMapper = { - serializedName: "UserArtifactManage", - type: { - name: "Composite", - className: "UserArtifactManage", - modelProperties: { - install: { - required: true, - serializedName: "install", + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", type: { name: "String" } }, - remove: { - required: true, - serializedName: "remove", + purchasePlan: { + serializedName: "properties.purchasePlan", type: { - name: "String" + name: "Composite", + className: "PurchasePlanAutoGenerated" } }, - update: { - serializedName: "update", - type: { - name: "String" - } - } - } - } -}; - -export const GalleryArtifactPublishingProfileBase: msRest.CompositeMapper = { - serializedName: "GalleryArtifactPublishingProfileBase", - type: { - name: "Composite", - className: "GalleryArtifactPublishingProfileBase", - modelProperties: { - targetRegions: { - serializedName: "targetRegions", + creationData: { + serializedName: "properties.creationData", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TargetRegion" - } - } + name: "Composite", + className: "CreationData" } }, - replicaCount: { - serializedName: "replicaCount", + diskSizeGB: { + serializedName: "properties.diskSizeGB", type: { name: "Number" } }, - excludeFromLatest: { - serializedName: "excludeFromLatest", + diskSizeBytes: { + serializedName: "properties.diskSizeBytes", + readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - publishedDate: { + uniqueId: { + serializedName: "properties.uniqueId", readOnly: true, - serializedName: "publishedDate", type: { - name: "DateTime" + name: "String" } }, - endOfLifeDate: { - serializedName: "endOfLifeDate", + encryptionSettingsCollection: { + serializedName: "properties.encryptionSettingsCollection", type: { - name: "DateTime" + name: "Composite", + className: "EncryptionSettingsCollection" } }, - storageAccountType: { - serializedName: "storageAccountType", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const GalleryApplicationVersionPublishingProfile: msRest.CompositeMapper = { - serializedName: "GalleryApplicationVersionPublishingProfile", - type: { - name: "Composite", - className: "GalleryApplicationVersionPublishingProfile", - modelProperties: { - ...GalleryArtifactPublishingProfileBase.type.modelProperties, - source: { - required: true, - serializedName: "source", + }, + diskIopsReadWrite: { + serializedName: "properties.diskIOPSReadWrite", type: { - name: "Composite", - className: "UserArtifactSource" + name: "Number" } }, - manageActions: { - serializedName: "manageActions", + diskMBpsReadWrite: { + serializedName: "properties.diskMBpsReadWrite", type: { - name: "Composite", - className: "UserArtifactManage" + name: "Number" } }, - enableHealthCheck: { - serializedName: "enableHealthCheck", + diskIopsReadOnly: { + serializedName: "properties.diskIOPSReadOnly", type: { - name: "Boolean" + name: "Number" } - } - } - } -}; - -export const RegionalReplicationStatus: msRest.CompositeMapper = { - serializedName: "RegionalReplicationStatus", - type: { - name: "Composite", - className: "RegionalReplicationStatus", - modelProperties: { - region: { - readOnly: true, - serializedName: "region", + }, + diskMBpsReadOnly: { + serializedName: "properties.diskMBpsReadOnly", type: { - name: "String" + name: "Number" } }, - state: { + diskState: { + serializedName: "properties.diskState", readOnly: true, - serializedName: "state", type: { name: "String" } }, - details: { - readOnly: true, - serializedName: "details", + encryption: { + serializedName: "properties.encryption", type: { - name: "String" + name: "Composite", + className: "Encryption" } }, - progress: { - readOnly: true, - serializedName: "progress", + maxShares: { + serializedName: "properties.maxShares", type: { name: "Number" } - } - } - } -}; - -export const ReplicationStatus: msRest.CompositeMapper = { - serializedName: "ReplicationStatus", - type: { - name: "Composite", - className: "ReplicationStatus", - modelProperties: { - aggregatedState: { - readOnly: true, - serializedName: "aggregatedState", - type: { - name: "String" - } }, - summary: { + shareInfo: { + serializedName: "properties.shareInfo", readOnly: true, - serializedName: "summary", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RegionalReplicationStatus" + className: "ShareInfoElement" } } } - } - } - } -}; - -export const GalleryApplicationVersion: msRest.CompositeMapper = { - serializedName: "GalleryApplicationVersion", - type: { - name: "Composite", - className: "GalleryApplicationVersion", - modelProperties: { - ...Resource.type.modelProperties, - publishingProfile: { - required: true, - serializedName: "properties.publishingProfile", + }, + networkAccessPolicy: { + serializedName: "properties.networkAccessPolicy", type: { - name: "Composite", - className: "GalleryApplicationVersionPublishingProfile" + name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + diskAccessId: { + serializedName: "properties.diskAccessId", type: { name: "String" } }, - replicationStatus: { - readOnly: true, - serializedName: "properties.replicationStatus", + tier: { + serializedName: "properties.tier", type: { - name: "Composite", - className: "ReplicationStatus" + name: "String" } - } - } - } -}; - -export const GalleryApplicationVersionUpdate: msRest.CompositeMapper = { - serializedName: "GalleryApplicationVersionUpdate", - type: { - name: "Composite", - className: "GalleryApplicationVersionUpdate", - modelProperties: { - ...UpdateResourceDefinition.type.modelProperties, - publishingProfile: { - required: true, - serializedName: "properties.publishingProfile", + }, + burstingEnabled: { + serializedName: "properties.burstingEnabled", + type: { + name: "Boolean" + } + }, + propertyUpdatesInProgress: { + serializedName: "properties.propertyUpdatesInProgress", type: { name: "Composite", - className: "GalleryApplicationVersionPublishingProfile" + className: "PropertyUpdatesInProgress" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + supportsHibernation: { + serializedName: "properties.supportsHibernation", type: { - name: "String" + name: "Boolean" } }, - replicationStatus: { - readOnly: true, - serializedName: "properties.replicationStatus", + securityProfile: { + serializedName: "properties.securityProfile", type: { name: "Composite", - className: "ReplicationStatus" + className: "DiskSecurityProfile" } } } } }; -export const GalleryImageIdentifier: msRest.CompositeMapper = { - serializedName: "GalleryImageIdentifier", +export const Snapshot: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImageIdentifier", + className: "Snapshot", modelProperties: { - publisher: { - required: true, - serializedName: "publisher", + ...Resource.type.modelProperties, + managedBy: { + serializedName: "managedBy", + readOnly: true, type: { name: "String" } }, - offer: { - required: true, - serializedName: "offer", + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "SnapshotSku" } }, - sku: { - required: true, - serializedName: "sku", + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + timeCreated: { + serializedName: "properties.timeCreated", + readOnly: true, + type: { + name: "DateTime" + } + }, + osType: { + serializedName: "properties.osType", + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", type: { name: "String" } - } - } - } -}; - -export const ResourceRange: msRest.CompositeMapper = { - serializedName: "ResourceRange", - type: { - name: "Composite", - className: "ResourceRange", - modelProperties: { - min: { - serializedName: "min", + }, + purchasePlan: { + serializedName: "properties.purchasePlan", + type: { + name: "Composite", + className: "PurchasePlanAutoGenerated" + } + }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData" + } + }, + diskSizeGB: { + serializedName: "properties.diskSizeGB", type: { name: "Number" } }, - max: { - serializedName: "max", + diskSizeBytes: { + serializedName: "properties.diskSizeBytes", + readOnly: true, type: { name: "Number" } - } - } - } -}; - -export const RecommendedMachineConfiguration: msRest.CompositeMapper = { - serializedName: "RecommendedMachineConfiguration", - type: { - name: "Composite", - className: "RecommendedMachineConfiguration", - modelProperties: { - vCPUs: { - serializedName: "vCPUs", + }, + diskState: { + serializedName: "properties.diskState", + readOnly: true, type: { - name: "Composite", - className: "ResourceRange" + name: "String" } }, - memory: { - serializedName: "memory", + uniqueId: { + serializedName: "properties.uniqueId", + readOnly: true, type: { - name: "Composite", - className: "ResourceRange" + name: "String" } - } - } - } -}; - -export const Disallowed: msRest.CompositeMapper = { - serializedName: "Disallowed", - type: { - name: "Composite", - className: "Disallowed", - modelProperties: { - diskTypes: { - serializedName: "diskTypes", + }, + encryptionSettingsCollection: { + serializedName: "properties.encryptionSettingsCollection", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "EncryptionSettingsCollection" } - } - } - } -}; - -export const ImagePurchasePlan: msRest.CompositeMapper = { - serializedName: "ImagePurchasePlan", - type: { - name: "Composite", - className: "ImagePurchasePlan", - modelProperties: { - name: { - serializedName: "name", + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - publisher: { - serializedName: "publisher", + incremental: { + serializedName: "properties.incremental", + type: { + name: "Boolean" + } + }, + encryption: { + serializedName: "properties.encryption", type: { - name: "String" + name: "Composite", + className: "Encryption" } }, - product: { - serializedName: "product", + networkAccessPolicy: { + serializedName: "properties.networkAccessPolicy", type: { name: "String" } - } - } - } -}; - -export const GalleryImageFeature: msRest.CompositeMapper = { - serializedName: "GalleryImageFeature", - type: { - name: "Composite", - className: "GalleryImageFeature", - modelProperties: { - name: { - serializedName: "name", + }, + diskAccessId: { + serializedName: "properties.diskAccessId", type: { name: "String" } }, - value: { - serializedName: "value", + supportsHibernation: { + serializedName: "properties.supportsHibernation", type: { - name: "String" + name: "Boolean" } } } } }; -export const GalleryImage: msRest.CompositeMapper = { - serializedName: "GalleryImage", +export const DiskEncryptionSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImage", + className: "DiskEncryptionSet", modelProperties: { ...Resource.type.modelProperties, - description: { - serializedName: "properties.description", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "EncryptionSetIdentity" } }, - eula: { - serializedName: "properties.eula", + encryptionType: { + serializedName: "properties.encryptionType", type: { name: "String" } }, - privacyStatementUri: { - serializedName: "properties.privacyStatementUri", + activeKey: { + serializedName: "properties.activeKey", type: { - name: "String" + name: "Composite", + className: "KeyForDiskEncryptionSet" } }, - releaseNoteUri: { - serializedName: "properties.releaseNoteUri", + previousKeys: { + serializedName: "properties.previousKeys", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KeyForDiskEncryptionSet" + } + } } }, - osType: { - required: true, - serializedName: "properties.osType", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] + name: "String" } }, - osState: { - required: true, - serializedName: "properties.osState", + rotationToLatestKeyVersionEnabled: { + serializedName: "properties.rotationToLatestKeyVersionEnabled", type: { - name: "Enum", - allowedValues: ["Generalized", "Specialized"] + name: "Boolean" } }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + lastKeyRotationTimestamp: { + serializedName: "properties.lastKeyRotationTimestamp", + readOnly: true, type: { - name: "String" + name: "DateTime" } - }, - endOfLifeDate: { - serializedName: "properties.endOfLifeDate", + } + } + } +}; + +export const DiskAccess: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskAccess", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } }, - identifier: { - required: true, - serializedName: "properties.identifier", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: "GalleryImageIdentifier" + name: "String" } }, - recommended: { - serializedName: "properties.recommended", + timeCreated: { + serializedName: "properties.timeCreated", + readOnly: true, type: { - name: "Composite", - className: "RecommendedMachineConfiguration" + name: "DateTime" } - }, - disallowed: { - serializedName: "properties.disallowed", + } + } + } +}; + +export const Gallery: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Gallery", + modelProperties: { + ...Resource.type.modelProperties, + description: { + serializedName: "properties.description", type: { - name: "Composite", - className: "Disallowed" + name: "String" } }, - purchasePlan: { - serializedName: "properties.purchasePlan", + identifier: { + serializedName: "properties.identifier", type: { name: "Composite", - className: "ImagePurchasePlan" + className: "GalleryIdentifier" } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - features: { - serializedName: "properties.features", + sharingProfile: { + serializedName: "properties.sharingProfile", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GalleryImageFeature" - } - } + name: "Composite", + className: "SharingProfile" } } } } }; -export const GalleryImageUpdate: msRest.CompositeMapper = { - serializedName: "GalleryImageUpdate", +export const GalleryImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImageUpdate", + className: "GalleryImage", modelProperties: { - ...UpdateResourceDefinition.type.modelProperties, + ...Resource.type.modelProperties, description: { serializedName: "properties.description", type: { @@ -11526,7 +11542,6 @@ export const GalleryImageUpdate: msRest.CompositeMapper = { } }, osType: { - required: true, serializedName: "properties.osType", type: { name: "Enum", @@ -11534,7 +11549,6 @@ export const GalleryImageUpdate: msRest.CompositeMapper = { } }, osState: { - required: true, serializedName: "properties.osState", type: { name: "Enum", @@ -11554,7 +11568,6 @@ export const GalleryImageUpdate: msRest.CompositeMapper = { } }, identifier: { - required: true, serializedName: "properties.identifier", type: { name: "Composite", @@ -11583,8 +11596,8 @@ export const GalleryImageUpdate: msRest.CompositeMapper = { } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -11605,166 +11618,112 @@ export const GalleryImageUpdate: msRest.CompositeMapper = { } }; -export const GalleryImageVersionPublishingProfile: msRest.CompositeMapper = { - serializedName: "GalleryImageVersionPublishingProfile", - type: { - name: "Composite", - className: "GalleryImageVersionPublishingProfile", - modelProperties: { - ...GalleryArtifactPublishingProfileBase.type.modelProperties - } - } -}; - -export const GalleryArtifactVersionSource: msRest.CompositeMapper = { - serializedName: "GalleryArtifactVersionSource", +export const GalleryImageVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryArtifactVersionSource", + className: "GalleryImageVersion", modelProperties: { - id: { - serializedName: "id", + ...Resource.type.modelProperties, + publishingProfile: { + serializedName: "properties.publishingProfile", type: { - name: "String" + name: "Composite", + className: "GalleryImageVersionPublishingProfile" } }, - uri: { - serializedName: "uri", - type: { - name: "String" - } - } - } - } -}; - -export const GalleryDiskImage: msRest.CompositeMapper = { - serializedName: "GalleryDiskImage", - type: { - name: "Composite", - className: "GalleryDiskImage", - modelProperties: { - sizeInGB: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "sizeInGB", type: { - name: "Number" + name: "String" } }, - hostCaching: { - serializedName: "hostCaching", + storageProfile: { + serializedName: "properties.storageProfile", type: { - name: "Enum", - allowedValues: ["None", "ReadOnly", "ReadWrite"] + name: "Composite", + className: "GalleryImageVersionStorageProfile" } }, - source: { - serializedName: "source", + replicationStatus: { + serializedName: "properties.replicationStatus", type: { name: "Composite", - className: "GalleryArtifactVersionSource" + className: "ReplicationStatus" } } } } }; -export const GalleryOSDiskImage: msRest.CompositeMapper = { - serializedName: "GalleryOSDiskImage", - type: { - name: "Composite", - className: "GalleryOSDiskImage", - modelProperties: { - ...GalleryDiskImage.type.modelProperties - } - } -}; - -export const GalleryDataDiskImage: msRest.CompositeMapper = { - serializedName: "GalleryDataDiskImage", +export const GalleryApplication: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryDataDiskImage", + className: "GalleryApplication", modelProperties: { - ...GalleryDiskImage.type.modelProperties, - lun: { - required: true, - serializedName: "lun", + ...Resource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + eula: { + serializedName: "properties.eula", + type: { + name: "String" + } + }, + privacyStatementUri: { + serializedName: "properties.privacyStatementUri", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const GalleryImageVersionStorageProfile: msRest.CompositeMapper = { - serializedName: "GalleryImageVersionStorageProfile", - type: { - name: "Composite", - className: "GalleryImageVersionStorageProfile", - modelProperties: { - source: { - serializedName: "source", + }, + releaseNoteUri: { + serializedName: "properties.releaseNoteUri", type: { - name: "Composite", - className: "GalleryArtifactVersionSource" + name: "String" } }, - osDiskImage: { - serializedName: "osDiskImage", + endOfLifeDate: { + serializedName: "properties.endOfLifeDate", type: { - name: "Composite", - className: "GalleryOSDiskImage" + name: "DateTime" } }, - dataDiskImages: { - serializedName: "dataDiskImages", + supportedOSType: { + serializedName: "properties.supportedOSType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GalleryDataDiskImage" - } - } + name: "Enum", + allowedValues: ["Windows", "Linux"] } } } } }; -export const GalleryImageVersion: msRest.CompositeMapper = { - serializedName: "GalleryImageVersion", +export const GalleryApplicationVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImageVersion", + className: "GalleryApplicationVersion", modelProperties: { ...Resource.type.modelProperties, publishingProfile: { serializedName: "properties.publishingProfile", type: { name: "Composite", - className: "GalleryImageVersionPublishingProfile" + className: "GalleryApplicationVersionPublishingProfile" } }, provisioningState: { - readOnly: true, serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - storageProfile: { - required: true, - serializedName: "properties.storageProfile", - type: { - name: "Composite", - className: "GalleryImageVersionStorageProfile" - } - }, replicationStatus: { - readOnly: true, serializedName: "properties.replicationStatus", type: { name: "Composite", @@ -11775,55 +11734,94 @@ export const GalleryImageVersion: msRest.CompositeMapper = { } }; -export const GalleryImageVersionUpdate: msRest.CompositeMapper = { - serializedName: "GalleryImageVersionUpdate", +export const SubResourceWithColocationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImageVersionUpdate", + className: "SubResourceWithColocationStatus", modelProperties: { - ...UpdateResourceDefinition.type.modelProperties, - publishingProfile: { - serializedName: "properties.publishingProfile", + ...SubResource.type.modelProperties, + colocationStatus: { + serializedName: "colocationStatus", type: { name: "Composite", - className: "GalleryImageVersionPublishingProfile" + className: "InstanceViewStatus" } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + } + } + } +}; + +export const VirtualMachineImageResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineImageResource", + modelProperties: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - storageProfile: { + location: { + serializedName: "location", required: true, - serializedName: "properties.storageProfile", type: { - name: "Composite", - className: "GalleryImageVersionStorageProfile" + name: "String" } }, - replicationStatus: { - readOnly: true, - serializedName: "properties.replicationStatus", + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + extendedLocation: { + serializedName: "extendedLocation", type: { name: "Composite", - className: "ReplicationStatus" + className: "ExtendedLocation" } } } } }; -export const DiskImageEncryption: msRest.CompositeMapper = { - serializedName: "DiskImageEncryption", +export const ImageReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskImageEncryption", + className: "ImageReference", modelProperties: { - diskEncryptionSetId: { - serializedName: "diskEncryptionSetId", + ...SubResource.type.modelProperties, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + }, + offer: { + serializedName: "offer", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + exactVersion: { + serializedName: "exactVersion", + readOnly: true, type: { name: "String" } @@ -11832,352 +11830,346 @@ export const DiskImageEncryption: msRest.CompositeMapper = { } }; -export const OSDiskImageEncryption: msRest.CompositeMapper = { - serializedName: "OSDiskImageEncryption", +export const DiskEncryptionSetParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSDiskImageEncryption", + className: "DiskEncryptionSetParameters", modelProperties: { - ...DiskImageEncryption.type.modelProperties + ...SubResource.type.modelProperties } } }; -export const DataDiskImageEncryption: msRest.CompositeMapper = { - serializedName: "DataDiskImageEncryption", +export const ManagedDiskParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataDiskImageEncryption", + className: "ManagedDiskParameters", modelProperties: { - ...DiskImageEncryption.type.modelProperties, - lun: { - required: true, - serializedName: "lun", + ...SubResource.type.modelProperties, + storageAccountType: { + serializedName: "storageAccountType", type: { - name: "Number" + name: "String" + } + }, + diskEncryptionSet: { + serializedName: "diskEncryptionSet", + type: { + name: "Composite", + className: "DiskEncryptionSetParameters" } } } } }; -export const EncryptionImages: msRest.CompositeMapper = { - serializedName: "EncryptionImages", +export const NetworkInterfaceReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EncryptionImages", + className: "NetworkInterfaceReference", modelProperties: { - osDiskImage: { - serializedName: "osDiskImage", + ...SubResource.type.modelProperties, + primary: { + serializedName: "properties.primary", type: { - name: "Composite", - className: "OSDiskImageEncryption" + name: "Boolean" } }, - dataDiskImages: { - serializedName: "dataDiskImages", + deleteOption: { + serializedName: "properties.deleteOption", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataDiskImageEncryption" - } - } + name: "String" } } } } }; -export const TargetRegion: msRest.CompositeMapper = { - serializedName: "TargetRegion", +export const VirtualMachineScaleSetIPConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TargetRegion", + className: "VirtualMachineScaleSetIPConfiguration", modelProperties: { + ...SubResource.type.modelProperties, name: { - required: true, serializedName: "name", + required: true, type: { name: "String" } }, - regionalReplicaCount: { - serializedName: "regionalReplicaCount", + subnet: { + serializedName: "properties.subnet", type: { - name: "Number" + name: "Composite", + className: "ApiEntityReference" } }, - storageAccountType: { - serializedName: "storageAccountType", + primary: { + serializedName: "properties.primary", type: { - name: "String" + name: "Boolean" } }, - encryption: { - serializedName: "encryption", + publicIPAddressConfiguration: { + serializedName: "properties.publicIPAddressConfiguration", type: { name: "Composite", - className: "EncryptionImages" + className: "VirtualMachineScaleSetPublicIPAddressConfiguration" + } + }, + privateIPAddressVersion: { + serializedName: "properties.privateIPAddressVersion", + type: { + name: "String" + } + }, + applicationGatewayBackendAddressPools: { + serializedName: "properties.applicationGatewayBackendAddressPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + applicationSecurityGroups: { + serializedName: "properties.applicationSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + loadBalancerBackendAddressPools: { + serializedName: "properties.loadBalancerBackendAddressPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + loadBalancerInboundNatPools: { + serializedName: "properties.loadBalancerInboundNatPools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } } } } } }; -export const ManagedArtifact: msRest.CompositeMapper = { - serializedName: "ManagedArtifact", +export const VirtualMachineScaleSetNetworkConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedArtifact", + className: "VirtualMachineScaleSetNetworkConfiguration", modelProperties: { - id: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", required: true, - serializedName: "id", type: { name: "String" } - } - } - } -}; - -export const GalleryArtifactSource: msRest.CompositeMapper = { - serializedName: "GalleryArtifactSource", - type: { - name: "Composite", - className: "GalleryArtifactSource", - modelProperties: { - managedImage: { - required: true, - serializedName: "managedImage", + }, + primary: { + serializedName: "properties.primary", + type: { + name: "Boolean" + } + }, + enableAcceleratedNetworking: { + serializedName: "properties.enableAcceleratedNetworking", + type: { + name: "Boolean" + } + }, + enableFpga: { + serializedName: "properties.enableFpga", + type: { + name: "Boolean" + } + }, + networkSecurityGroup: { + serializedName: "properties.networkSecurityGroup", type: { name: "Composite", - className: "ManagedArtifact" + className: "SubResource" } - } - } - } -}; - -export const SharingUpdate: msRest.CompositeMapper = { - serializedName: "SharingUpdate", - type: { - name: "Composite", - className: "SharingUpdate", - modelProperties: { - operationType: { - required: true, - serializedName: "operationType", + }, + dnsSettings: { + serializedName: "properties.dnsSettings", type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" } }, - groups: { - serializedName: "groups", + ipConfigurations: { + serializedName: "properties.ipConfigurations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SharingProfileGroup" + className: "VirtualMachineScaleSetIPConfiguration" } } } + }, + enableIPForwarding: { + serializedName: "properties.enableIPForwarding", + type: { + name: "Boolean" + } + }, + deleteOption: { + serializedName: "properties.deleteOption", + type: { + name: "String" + } } } } }; -export const PirResource: msRest.CompositeMapper = { - serializedName: "PirResource", +export const VirtualMachineCaptureResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PirResource", + className: "VirtualMachineCaptureResult", modelProperties: { - name: { + ...SubResource.type.modelProperties, + schema: { + serializedName: "$schema", readOnly: true, - serializedName: "name", type: { name: "String" } }, - location: { + contentVersion: { + serializedName: "contentVersion", readOnly: true, - serializedName: "location", type: { name: "String" } - } - } - } -}; - -export const PirSharedGalleryResource: msRest.CompositeMapper = { - serializedName: "PirSharedGalleryResource", - type: { - name: "Composite", - className: "PirSharedGalleryResource", - modelProperties: { - ...PirResource.type.modelProperties, - uniqueId: { - serializedName: "identifier.uniqueId", + }, + parameters: { + serializedName: "parameters", + readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + resources: { + serializedName: "resources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } } } } } }; -export const SharedGallery: msRest.CompositeMapper = { - serializedName: "SharedGallery", - type: { - name: "Composite", - className: "SharedGallery", - modelProperties: { - ...PirSharedGalleryResource.type.modelProperties - } - } -}; - -export const SharedGalleryImage: msRest.CompositeMapper = { - serializedName: "SharedGalleryImage", +export const VirtualMachineScaleSetUpdateIPConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharedGalleryImage", + className: "VirtualMachineScaleSetUpdateIPConfiguration", modelProperties: { - ...PirSharedGalleryResource.type.modelProperties, - osType: { - required: true, - serializedName: "properties.osType", - type: { - name: "Enum", - allowedValues: ["Windows", "Linux"] - } - }, - osState: { - required: true, - serializedName: "properties.osState", - type: { - name: "Enum", - allowedValues: ["Generalized", "Specialized"] - } - }, - endOfLifeDate: { - serializedName: "properties.endOfLifeDate", + ...SubResource.type.modelProperties, + name: { + serializedName: "name", type: { - name: "DateTime" + name: "String" } }, - identifier: { - required: true, - serializedName: "properties.identifier", + subnet: { + serializedName: "properties.subnet", type: { name: "Composite", - className: "GalleryImageIdentifier" + className: "ApiEntityReference" } }, - recommended: { - serializedName: "properties.recommended", + primary: { + serializedName: "properties.primary", type: { - name: "Composite", - className: "RecommendedMachineConfiguration" + name: "Boolean" } }, - disallowed: { - serializedName: "properties.disallowed", + publicIPAddressConfiguration: { + serializedName: "properties.publicIPAddressConfiguration", type: { name: "Composite", - className: "Disallowed" + className: "VirtualMachineScaleSetUpdatePublicIPAddressConfiguration" } }, - hyperVGeneration: { - serializedName: "properties.hyperVGeneration", + privateIPAddressVersion: { + serializedName: "properties.privateIPAddressVersion", type: { name: "String" } }, - features: { - serializedName: "properties.features", + applicationGatewayBackendAddressPools: { + serializedName: "properties.applicationGatewayBackendAddressPools", type: { name: "Sequence", element: { type: { name: "Composite", - className: "GalleryImageFeature" + className: "SubResource" } } } }, - purchasePlan: { - serializedName: "properties.purchasePlan", - type: { - name: "Composite", - className: "ImagePurchasePlan" - } - } - } - } -}; - -export const SharedGalleryImageVersion: msRest.CompositeMapper = { - serializedName: "SharedGalleryImageVersion", - type: { - name: "Composite", - className: "SharedGalleryImageVersion", - modelProperties: { - ...PirSharedGalleryResource.type.modelProperties, - publishedDate: { - serializedName: "properties.publishedDate", + applicationSecurityGroups: { + serializedName: "properties.applicationSecurityGroups", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } } }, - endOfLifeDate: { - serializedName: "properties.endOfLifeDate", - type: { - name: "DateTime" - } - } - } - } -}; - -export const InstanceSku: msRest.CompositeMapper = { - serializedName: "InstanceSku", - type: { - name: "Composite", - className: "InstanceSku", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", + loadBalancerBackendAddressPools: { + serializedName: "properties.loadBalancerBackendAddressPools", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } } }, - tier: { - readOnly: true, - serializedName: "tier", - type: { - name: "String" - } - } - } - } -}; - -export const RoleInstanceNetworkProfile: msRest.CompositeMapper = { - serializedName: "RoleInstanceNetworkProfile", - type: { - name: "Composite", - className: "RoleInstanceNetworkProfile", - modelProperties: { - networkInterfaces: { - readOnly: true, - serializedName: "networkInterfaces", + loadBalancerInboundNatPools: { + serializedName: "properties.loadBalancerInboundNatPools", type: { name: "Sequence", element: { @@ -12192,87 +12184,131 @@ export const RoleInstanceNetworkProfile: msRest.CompositeMapper = { } }; -export const ResourceInstanceViewStatus: msRest.CompositeMapper = { - serializedName: "ResourceInstanceViewStatus", +export const VirtualMachineScaleSetUpdateNetworkConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceInstanceViewStatus", + className: "VirtualMachineScaleSetUpdateNetworkConfiguration", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + ...SubResource.type.modelProperties, + name: { + serializedName: "name", type: { name: "String" } }, - displayStatus: { - readOnly: true, - serializedName: "displayStatus", + primary: { + serializedName: "properties.primary", type: { - name: "String" + name: "Boolean" } }, - message: { - readOnly: true, - serializedName: "message", + enableAcceleratedNetworking: { + serializedName: "properties.enableAcceleratedNetworking", type: { - name: "String" + name: "Boolean" } }, - time: { - readOnly: true, - serializedName: "time", + enableFpga: { + serializedName: "properties.enableFpga", type: { - name: "DateTime" + name: "Boolean" } }, - level: { - serializedName: "level", + networkSecurityGroup: { + serializedName: "properties.networkSecurityGroup", type: { - name: "Enum", - allowedValues: ["Info", "Warning", "Error"] + name: "Composite", + className: "SubResource" + } + }, + dnsSettings: { + serializedName: "properties.dnsSettings", + type: { + name: "Composite", + className: "VirtualMachineScaleSetNetworkConfigurationDnsSettings" + } + }, + ipConfigurations: { + serializedName: "properties.ipConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineScaleSetUpdateIPConfiguration" + } + } + } + }, + enableIPForwarding: { + serializedName: "properties.enableIPForwarding", + type: { + name: "Boolean" + } + }, + deleteOption: { + serializedName: "properties.deleteOption", + type: { + name: "String" } } } } }; -export const RoleInstanceInstanceView: msRest.CompositeMapper = { - serializedName: "RoleInstanceInstanceView", +export const AvailabilitySetUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoleInstanceInstanceView", + className: "AvailabilitySetUpdate", modelProperties: { - platformUpdateDomain: { - readOnly: true, - serializedName: "platformUpdateDomain", + ...UpdateResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + platformUpdateDomainCount: { + serializedName: "properties.platformUpdateDomainCount", type: { name: "Number" } }, - platformFaultDomain: { - readOnly: true, - serializedName: "platformFaultDomain", + platformFaultDomainCount: { + serializedName: "properties.platformFaultDomainCount", type: { name: "Number" } }, - privateId: { - readOnly: true, - serializedName: "privateId", + virtualMachines: { + serializedName: "properties.virtualMachines", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResource" + } + } + } + }, + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", + type: { + name: "Composite", + className: "SubResource" } }, statuses: { + serializedName: "properties.statuses", readOnly: true, - serializedName: "statuses", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceInstanceViewStatus" + className: "InstanceViewStatus" } } } @@ -12281,131 +12317,157 @@ export const RoleInstanceInstanceView: msRest.CompositeMapper = { } }; -export const RoleInstanceProperties: msRest.CompositeMapper = { - serializedName: "RoleInstanceProperties", +export const ProximityPlacementGroupUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoleInstanceProperties", + className: "ProximityPlacementGroupUpdate", modelProperties: { - networkProfile: { - serializedName: "networkProfile", + ...UpdateResource.type.modelProperties + } + } +}; + +export const DedicatedHostGroupUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DedicatedHostGroupUpdate", + modelProperties: { + ...UpdateResource.type.modelProperties, + zones: { + serializedName: "zones", type: { - name: "Composite", - className: "RoleInstanceNetworkProfile" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + platformFaultDomainCount: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "properties.platformFaultDomainCount", + type: { + name: "Number" + } + }, + hosts: { + serializedName: "properties.hosts", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubResourceReadOnly" + } + } } }, instanceView: { - serializedName: "instanceView", + serializedName: "properties.instanceView", type: { name: "Composite", - className: "RoleInstanceInstanceView" + className: "DedicatedHostGroupInstanceView" + } + }, + supportAutomaticPlacement: { + serializedName: "properties.supportAutomaticPlacement", + type: { + name: "Boolean" } } } } }; -export const RoleInstance: msRest.CompositeMapper = { - serializedName: "RoleInstance", +export const DedicatedHostUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoleInstance", + className: "DedicatedHostUpdate", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + ...UpdateResource.type.modelProperties, + platformFaultDomain: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.platformFaultDomain", type: { - name: "String" + name: "Number" } }, - type: { - readOnly: true, - serializedName: "type", + autoReplaceOnFailure: { + serializedName: "properties.autoReplaceOnFailure", type: { - name: "String" + name: "Boolean" } }, - location: { + hostId: { + serializedName: "properties.hostId", readOnly: true, - serializedName: "location", type: { name: "String" } }, - tags: { + virtualMachines: { + serializedName: "properties.virtualMachines", readOnly: true, - serializedName: "tags", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "SubResourceReadOnly" } } } }, - sku: { - serializedName: "sku", + licenseType: { + serializedName: "properties.licenseType", type: { - name: "Composite", - className: "InstanceSku" + name: "Enum", + allowedValues: [ + "None", + "Windows_Server_Hybrid", + "Windows_Server_Perpetual" + ] } }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "RoleInstanceProperties" - } - } - } - } -}; - -export const CloudServiceRoleSku: msRest.CompositeMapper = { - serializedName: "CloudServiceRoleSku", - type: { - name: "Composite", - className: "CloudServiceRoleSku", - modelProperties: { - name: { - serializedName: "name", + provisioningTime: { + serializedName: "properties.provisioningTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - tier: { - serializedName: "tier", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - capacity: { - serializedName: "capacity", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "Number" + name: "Composite", + className: "DedicatedHostInstanceView" } } } } }; -export const CloudServiceRoleProperties: msRest.CompositeMapper = { - serializedName: "CloudServiceRoleProperties", +export const SshPublicKeyUpdateResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceRoleProperties", - modelProperties: { - uniqueId: { - readOnly: true, - serializedName: "uniqueId", + className: "SshPublicKeyUpdateResource", + modelProperties: { + ...UpdateResource.type.modelProperties, + publicKey: { + serializedName: "properties.publicKey", type: { name: "String" } @@ -12414,111 +12476,95 @@ export const CloudServiceRoleProperties: msRest.CompositeMapper = { } }; -export const CloudServiceRole: msRest.CompositeMapper = { - serializedName: "CloudServiceRole", +export const VirtualMachineExtensionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceRole", + className: "VirtualMachineExtensionUpdate", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + ...UpdateResource.type.modelProperties, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + publisher: { + serializedName: "properties.publisher", type: { name: "String" } }, type: { - readOnly: true, - serializedName: "type", + serializedName: "properties.type", type: { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", type: { name: "String" } }, - sku: { - serializedName: "sku", + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "Composite", - className: "CloudServiceRoleSku" + name: "Boolean" } }, - properties: { - serializedName: "properties", + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", type: { - name: "Composite", - className: "CloudServiceRoleProperties" + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const CloudServiceRoleProfileProperties: msRest.CompositeMapper = { - serializedName: "CloudServiceRoleProfileProperties", +export const ImageUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceRoleProfileProperties", + className: "ImageUpdate", modelProperties: { - name: { - serializedName: "name", + ...UpdateResource.type.modelProperties, + sourceVirtualMachine: { + serializedName: "properties.sourceVirtualMachine", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - sku: { - serializedName: "sku", + storageProfile: { + serializedName: "properties.storageProfile", type: { name: "Composite", - className: "CloudServiceRoleSku" + className: "ImageStorageProfile" } - } - } - } -}; - -export const CloudServiceRoleProfile: msRest.CompositeMapper = { - serializedName: "CloudServiceRoleProfile", - type: { - name: "Composite", - className: "CloudServiceRoleProfile", - modelProperties: { - roles: { - serializedName: "roles", + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CloudServiceRoleProfileProperties" - } - } + name: "String" } - } - } - } -}; - -export const CloudServiceVaultCertificate: msRest.CompositeMapper = { - serializedName: "CloudServiceVaultCertificate", - type: { - name: "Composite", - className: "CloudServiceVaultCertificate", - modelProperties: { - certificateUrl: { - serializedName: "certificateUrl", + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", type: { name: "String" } @@ -12527,332 +12573,232 @@ export const CloudServiceVaultCertificate: msRest.CompositeMapper = { } }; -export const CloudServiceVaultSecretGroup: msRest.CompositeMapper = { - serializedName: "CloudServiceVaultSecretGroup", +export const VirtualMachineUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceVaultSecretGroup", + className: "VirtualMachineUpdate", modelProperties: { - sourceVault: { - serializedName: "sourceVault", + ...UpdateResource.type.modelProperties, + plan: { + serializedName: "plan", type: { name: "Composite", - className: "SubResource" + className: "Plan" } }, - vaultCertificates: { - serializedName: "vaultCertificates", + identity: { + serializedName: "identity", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CloudServiceVaultCertificate" - } - } + name: "Composite", + className: "VirtualMachineIdentity" } - } - } - } -}; - -export const CloudServiceOsProfile: msRest.CompositeMapper = { - serializedName: "CloudServiceOsProfile", - type: { - name: "Composite", - className: "CloudServiceOsProfile", - modelProperties: { - secrets: { - serializedName: "secrets", + }, + zones: { + serializedName: "zones", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "CloudServiceVaultSecretGroup" + name: "String" } } } - } - } - } -}; - -export const LoadBalancerFrontendIPConfigurationProperties: msRest.CompositeMapper = { - serializedName: "LoadBalancerFrontendIPConfigurationProperties", - type: { - name: "Composite", - className: "LoadBalancerFrontendIPConfigurationProperties", - modelProperties: { - publicIPAddress: { - serializedName: "publicIPAddress", + }, + hardwareProfile: { + serializedName: "properties.hardwareProfile", type: { name: "Composite", - className: "SubResource" + className: "HardwareProfile" } }, - subnet: { - serializedName: "subnet", + storageProfile: { + serializedName: "properties.storageProfile", type: { name: "Composite", - className: "SubResource" + className: "StorageProfile" } }, - privateIPAddress: { - serializedName: "privateIPAddress", - type: { - name: "String" - } - } - } - } -}; - -export const LoadBalancerFrontendIPConfiguration: msRest.CompositeMapper = { - serializedName: "LoadBalancerFrontendIPConfiguration", - type: { - name: "Composite", - className: "LoadBalancerFrontendIPConfiguration", - modelProperties: { - name: { - required: true, - serializedName: "name", + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", type: { - name: "String" + name: "Composite", + className: "AdditionalCapabilities" } }, - properties: { - required: true, - serializedName: "properties", + osProfile: { + serializedName: "properties.osProfile", type: { name: "Composite", - className: "LoadBalancerFrontendIPConfigurationProperties" - } - } - } - } -}; - -export const LoadBalancerConfigurationProperties: msRest.CompositeMapper = { - serializedName: "LoadBalancerConfigurationProperties", - type: { - name: "Composite", - className: "LoadBalancerConfigurationProperties", - modelProperties: { - frontendIPConfigurations: { - required: true, - serializedName: "frontendIPConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancerFrontendIPConfiguration" - } - } - } - } - } - } -}; - -export const LoadBalancerConfiguration: msRest.CompositeMapper = { - serializedName: "LoadBalancerConfiguration", - type: { - name: "Composite", - className: "LoadBalancerConfiguration", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" + className: "OSProfile" } }, - name: { - required: true, - serializedName: "name", + networkProfile: { + serializedName: "properties.networkProfile", type: { - name: "String" + name: "Composite", + className: "NetworkProfile" } }, - properties: { - required: true, - serializedName: "properties", + securityProfile: { + serializedName: "properties.securityProfile", type: { name: "Composite", - className: "LoadBalancerConfigurationProperties" + className: "SecurityProfile" } - } - } - } -}; - -export const CloudServiceNetworkProfile: msRest.CompositeMapper = { - serializedName: "CloudServiceNetworkProfile", - type: { - name: "Composite", - className: "CloudServiceNetworkProfile", - modelProperties: { - loadBalancerConfigurations: { - serializedName: "loadBalancerConfigurations", + }, + diagnosticsProfile: { + serializedName: "properties.diagnosticsProfile", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancerConfiguration" - } - } + name: "Composite", + className: "DiagnosticsProfile" } }, - swappableCloudService: { - serializedName: "swappableCloudService", + availabilitySet: { + serializedName: "properties.availabilitySet", type: { name: "Composite", className: "SubResource" } - } - } - } -}; - -export const CloudServiceVaultAndSecretReference: msRest.CompositeMapper = { - serializedName: "CloudServiceVaultAndSecretReference", - type: { - name: "Composite", - className: "CloudServiceVaultAndSecretReference", - modelProperties: { - sourceVault: { - serializedName: "sourceVault", + }, + virtualMachineScaleSet: { + serializedName: "properties.virtualMachineScaleSet", type: { name: "Composite", className: "SubResource" } }, - secretUrl: { - serializedName: "secretUrl", + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", type: { - name: "String" + name: "Composite", + className: "SubResource" } - } - } - } -}; - -export const CloudServiceExtensionProperties: msRest.CompositeMapper = { - serializedName: "CloudServiceExtensionProperties", - type: { - name: "Composite", - className: "CloudServiceExtensionProperties", - modelProperties: { - publisher: { - serializedName: "publisher", + }, + priority: { + serializedName: "properties.priority", type: { name: "String" } }, - type: { - serializedName: "type", + evictionPolicy: { + serializedName: "properties.evictionPolicy", type: { name: "String" } }, - typeHandlerVersion: { - serializedName: "typeHandlerVersion", + billingProfile: { + serializedName: "properties.billingProfile", type: { - name: "String" + name: "Composite", + className: "BillingProfile" } }, - autoUpgradeMinorVersion: { - serializedName: "autoUpgradeMinorVersion", + host: { + serializedName: "properties.host", type: { - name: "Boolean" + name: "Composite", + className: "SubResource" } }, - settings: { - serializedName: "settings", + hostGroup: { + serializedName: "properties.hostGroup", type: { - name: "String" + name: "Composite", + className: "SubResource" } }, - protectedSettings: { - serializedName: "protectedSettings", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - protectedSettingsFromKeyVault: { - serializedName: "protectedSettingsFromKeyVault", + instanceView: { + serializedName: "properties.instanceView", type: { name: "Composite", - className: "CloudServiceVaultAndSecretReference" + className: "VirtualMachineInstanceView" } }, - forceUpdateTag: { - serializedName: "forceUpdateTag", + licenseType: { + serializedName: "properties.licenseType", type: { name: "String" } }, - provisioningState: { + vmId: { + serializedName: "properties.vmId", readOnly: true, - serializedName: "provisioningState", type: { name: "String" } }, - rolesAppliedTo: { - serializedName: "rolesAppliedTo", + extensionsTimeBudget: { + serializedName: "properties.extensionsTimeBudget", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - } - } - } -}; - -export const Extension: msRest.CompositeMapper = { - serializedName: "Extension", - type: { - name: "Composite", - className: "Extension", - modelProperties: { - name: { - serializedName: "name", + }, + platformFaultDomain: { + serializedName: "properties.platformFaultDomain", type: { - name: "String" + name: "Number" } }, - properties: { - serializedName: "properties", + scheduledEventsProfile: { + serializedName: "properties.scheduledEventsProfile", type: { name: "Composite", - className: "CloudServiceExtensionProperties" + className: "ScheduledEventsProfile" + } + }, + userData: { + serializedName: "properties.userData", + type: { + name: "String" } } } } }; -export const CloudServiceExtensionProfile: msRest.CompositeMapper = { - serializedName: "CloudServiceExtensionProfile", +export const RestorePointCollectionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceExtensionProfile", + className: "RestorePointCollectionUpdate", modelProperties: { - extensions: { - serializedName: "extensions", + ...UpdateResource.type.modelProperties, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "RestorePointCollectionSourceProperties" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + restorePointCollectionId: { + serializedName: "properties.restorePointCollectionId", + readOnly: true, + type: { + name: "String" + } + }, + restorePoints: { + serializedName: "properties.restorePoints", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Extension" + className: "RestorePoint" } } } @@ -12861,477 +12807,363 @@ export const CloudServiceExtensionProfile: msRest.CompositeMapper = { } }; -export const CloudServiceProperties: msRest.CompositeMapper = { - serializedName: "CloudServiceProperties", +export const VirtualMachineScaleSetUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceProperties", + className: "VirtualMachineScaleSetUpdate", modelProperties: { - packageUrl: { - serializedName: "packageUrl", - type: { - name: "String" - } - }, - configuration: { - serializedName: "configuration", - type: { - name: "String" - } - }, - configurationUrl: { - serializedName: "configurationUrl", - type: { - name: "String" - } - }, - startCloudService: { - serializedName: "startCloudService", - type: { - name: "Boolean" - } - }, - allowModelOverride: { - serializedName: "allowModelOverride", - type: { - name: "Boolean" - } - }, - upgradeMode: { - serializedName: "upgradeMode", - type: { - name: "String" - } - }, - roleProfile: { - serializedName: "roleProfile", + ...UpdateResource.type.modelProperties, + sku: { + serializedName: "sku", type: { name: "Composite", - className: "CloudServiceRoleProfile" + className: "Sku" } }, - osProfile: { - serializedName: "osProfile", + plan: { + serializedName: "plan", type: { name: "Composite", - className: "CloudServiceOsProfile" + className: "Plan" } }, - networkProfile: { - serializedName: "networkProfile", + identity: { + serializedName: "identity", type: { name: "Composite", - className: "CloudServiceNetworkProfile" + className: "VirtualMachineScaleSetIdentity" } }, - extensionProfile: { - serializedName: "extensionProfile", + upgradePolicy: { + serializedName: "properties.upgradePolicy", type: { name: "Composite", - className: "CloudServiceExtensionProfile" + className: "UpgradePolicy" } }, - provisioningState: { - readOnly: true, - serializedName: "provisioningState", + automaticRepairsPolicy: { + serializedName: "properties.automaticRepairsPolicy", type: { - name: "String" + name: "Composite", + className: "AutomaticRepairsPolicy" } }, - uniqueId: { - readOnly: true, - serializedName: "uniqueId", - type: { - name: "String" - } - } - } - } -}; - -export const CloudService: msRest.CompositeMapper = { - serializedName: "CloudService", - type: { - name: "Composite", - className: "CloudService", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", + virtualMachineProfile: { + serializedName: "properties.virtualMachineProfile", type: { - name: "String" + name: "Composite", + className: "VirtualMachineScaleSetUpdateVMProfile" } }, - name: { - readOnly: true, - serializedName: "name", + overprovision: { + serializedName: "properties.overprovision", type: { - name: "String" + name: "Boolean" } }, - type: { - readOnly: true, - serializedName: "type", + doNotRunExtensionsOnOverprovisionedVMs: { + serializedName: "properties.doNotRunExtensionsOnOverprovisionedVMs", type: { - name: "String" + name: "Boolean" } }, - location: { - required: true, - serializedName: "location", + singlePlacementGroup: { + serializedName: "properties.singlePlacementGroup", type: { - name: "String" + name: "Boolean" } }, - tags: { - serializedName: "tags", + additionalCapabilities: { + serializedName: "properties.additionalCapabilities", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "AdditionalCapabilities" } }, - properties: { - serializedName: "properties", + scaleInPolicy: { + serializedName: "properties.scaleInPolicy", type: { name: "Composite", - className: "CloudServiceProperties" + className: "ScaleInPolicy" } - } - } - } -}; - -export const CloudServiceUpdate: msRest.CompositeMapper = { - serializedName: "CloudServiceUpdate", - type: { - name: "Composite", - className: "CloudServiceUpdate", - modelProperties: { - tags: { - serializedName: "tags", + }, + proximityPlacementGroup: { + serializedName: "properties.proximityPlacementGroup", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Composite", + className: "SubResource" } } } } }; -export const StatusCodeCount: msRest.CompositeMapper = { - serializedName: "StatusCodeCount", +export const VirtualMachineRunCommandUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StatusCodeCount", + className: "VirtualMachineRunCommandUpdate", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + ...UpdateResource.type.modelProperties, + source: { + serializedName: "properties.source", type: { - name: "String" + name: "Composite", + className: "VirtualMachineRunCommandScriptSource" } }, - count: { - readOnly: true, - serializedName: "count", + parameters: { + serializedName: "properties.parameters", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RunCommandInputParameter" + } + } } - } - } - } -}; - -export const InstanceViewStatusesSummary: msRest.CompositeMapper = { - serializedName: "InstanceViewStatusesSummary", - type: { - name: "Composite", - className: "InstanceViewStatusesSummary", - modelProperties: { - statusesSummary: { - readOnly: true, - serializedName: "statusesSummary", + }, + protectedParameters: { + serializedName: "properties.protectedParameters", type: { name: "Sequence", element: { type: { name: "Composite", - className: "StatusCodeCount" + className: "RunCommandInputParameter" } } } - } - } - } -}; - -export const CloudServiceInstanceView: msRest.CompositeMapper = { - serializedName: "CloudServiceInstanceView", - type: { - name: "Composite", - className: "CloudServiceInstanceView", - modelProperties: { - roleInstance: { - serializedName: "roleInstance", + }, + asyncExecution: { + serializedName: "properties.asyncExecution", type: { - name: "Composite", - className: "InstanceViewStatusesSummary" + name: "Boolean" } }, - sdkVersion: { - readOnly: true, - serializedName: "sdkVersion", + runAsUser: { + serializedName: "properties.runAsUser", type: { name: "String" } }, - privateIds: { - readOnly: true, - serializedName: "privateIds", + runAsPassword: { + serializedName: "properties.runAsPassword", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - statuses: { - readOnly: true, - serializedName: "statuses", + timeoutInSeconds: { + serializedName: "properties.timeoutInSeconds", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceInstanceViewStatus" - } - } + name: "Number" } - } - } - } -}; - -export const RoleInstances: msRest.CompositeMapper = { - serializedName: "RoleInstances", - type: { - name: "Composite", - className: "RoleInstances", - modelProperties: { - roleInstances: { - required: true, - serializedName: "roleInstances", + }, + outputBlobUri: { + serializedName: "properties.outputBlobUri", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - } - } - } -}; - -export const UpdateDomain: msRest.CompositeMapper = { - serializedName: "UpdateDomain", - type: { - name: "Composite", - className: "UpdateDomain", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", + }, + errorBlobUri: { + serializedName: "properties.errorBlobUri", type: { name: "String" } }, - name: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "name", type: { name: "String" } + }, + instanceView: { + serializedName: "properties.instanceView", + type: { + name: "Composite", + className: "VirtualMachineRunCommandInstanceView" + } } } } }; -export const OSVersionProperties: msRest.CompositeMapper = { - serializedName: "OSVersionProperties", +export const VirtualMachineScaleSetExtension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSVersionProperties", + className: "VirtualMachineScaleSetExtension", modelProperties: { - family: { - readOnly: true, - serializedName: "family", + ...SubResourceReadOnly.type.modelProperties, + name: { + serializedName: "name", type: { name: "String" } }, - familyLabel: { + type: { + serializedName: "type", readOnly: true, - serializedName: "familyLabel", type: { name: "String" } }, - version: { - readOnly: true, - serializedName: "version", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } }, - label: { - readOnly: true, - serializedName: "label", + publisher: { + serializedName: "properties.publisher", + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", + type: { + name: "String" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", + type: { + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, - isDefault: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "isDefault", type: { - name: "Boolean" + name: "String" } }, - isActive: { - readOnly: true, - serializedName: "isActive", + provisionAfterExtensions: { + serializedName: "properties.provisionAfterExtensions", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const OSVersion: msRest.CompositeMapper = { - serializedName: "OSVersion", +export const VirtualMachineScaleSetExtensionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSVersion", + className: "VirtualMachineScaleSetExtensionUpdate", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, + ...SubResourceReadOnly.type.modelProperties, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } }, - properties: { - serializedName: "properties", + publisher: { + serializedName: "properties.publisher", type: { - name: "Composite", - className: "OSVersionProperties" + name: "String" } - } - } - } -}; - -export const OSVersionPropertiesBase: msRest.CompositeMapper = { - serializedName: "OSVersionPropertiesBase", - type: { - name: "Composite", - className: "OSVersionPropertiesBase", - modelProperties: { - version: { - readOnly: true, - serializedName: "version", + }, + typePropertiesType: { + serializedName: "properties.type", type: { name: "String" } }, - label: { - readOnly: true, - serializedName: "label", + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", type: { name: "String" } }, - isDefault: { - readOnly: true, - serializedName: "isDefault", + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", type: { name: "Boolean" } }, - isActive: { - readOnly: true, - serializedName: "isActive", + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", type: { name: "Boolean" } - } - } - } -}; - -export const OSFamilyProperties: msRest.CompositeMapper = { - serializedName: "OSFamilyProperties", - type: { - name: "Composite", - className: "OSFamilyProperties", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", + }, + settings: { + serializedName: "properties.settings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } }, - label: { + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "label", type: { name: "String" } }, - versions: { - readOnly: true, - serializedName: "versions", + provisionAfterExtensions: { + serializedName: "properties.provisionAfterExtensions", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "OSVersionPropertiesBase" + name: "String" } } } @@ -13340,320 +13172,177 @@ export const OSFamilyProperties: msRest.CompositeMapper = { } }; -export const OSFamily: msRest.CompositeMapper = { - serializedName: "OSFamily", +export const VirtualMachineScaleSetVMExtension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSFamily", + className: "VirtualMachineScaleSetVMExtension", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, + ...SubResourceReadOnly.type.modelProperties, name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } }, type: { - readOnly: true, serializedName: "type", + readOnly: true, type: { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "OSFamilyProperties" - } - } - } - } -}; - -export const ComputeOperationListResult: msRest.CompositeMapper = { - serializedName: "ComputeOperationListResult", - type: { - name: "Composite", - className: "ComputeOperationListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + publisher: { + serializedName: "properties.publisher", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ComputeOperationValue" - } - } + name: "String" } - } - } - } -}; - -export const AvailabilitySetListResult: msRest.CompositeMapper = { - serializedName: "AvailabilitySetListResult", - type: { - name: "Composite", - className: "AvailabilitySetListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + typePropertiesType: { + serializedName: "properties.type", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailabilitySet" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineSizeListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineSizeListResult", - type: { - name: "Composite", - className: "VirtualMachineSizeListResult", - modelProperties: { - value: { - serializedName: "", + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineSize" - } - } + name: "Boolean" } - } - } - } -}; - -export const ProximityPlacementGroupListResult: msRest.CompositeMapper = { - serializedName: "ProximityPlacementGroupListResult", - type: { - name: "Composite", - className: "ProximityPlacementGroupListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProximityPlacementGroup" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", + settings: { + serializedName: "properties.settings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } - } - } - } -}; - -export const DedicatedHostGroupListResult: msRest.CompositeMapper = { - serializedName: "DedicatedHostGroupListResult", - type: { - name: "Composite", - className: "DedicatedHostGroupListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + protectedSettings: { + serializedName: "properties.protectedSettings", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DedicatedHostGroup" - } - } + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" } }, - nextLink: { - serializedName: "nextLink", + instanceView: { + serializedName: "properties.instanceView", type: { - name: "String" + name: "Composite", + className: "VirtualMachineExtensionInstanceView" } } } } }; -export const DedicatedHostListResult: msRest.CompositeMapper = { - serializedName: "DedicatedHostListResult", +export const VirtualMachineScaleSetVMExtensionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DedicatedHostListResult", + className: "VirtualMachineScaleSetVMExtensionUpdate", modelProperties: { - value: { - required: true, - serializedName: "", + ...SubResourceReadOnly.type.modelProperties, + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DedicatedHost" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const SshPublicKeysGroupListResult: msRest.CompositeMapper = { - serializedName: "SshPublicKeysGroupListResult", - type: { - name: "Composite", - className: "SshPublicKeysGroupListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SshPublicKeyResource" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + publisher: { + serializedName: "properties.publisher", type: { name: "String" } - } - } - } -}; - -export const ListUsagesResult: msRest.CompositeMapper = { - serializedName: "ListUsagesResult", - type: { - name: "Composite", - className: "ListUsagesResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + typePropertiesType: { + serializedName: "properties.type", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Usage" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + typeHandlerVersion: { + serializedName: "properties.typeHandlerVersion", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineListResult", - type: { - name: "Composite", - className: "VirtualMachineListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachine" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", + enableAutomaticUpgrade: { + serializedName: "properties.enableAutomaticUpgrade", type: { - name: "String" + name: "Boolean" + } + }, + settings: { + serializedName: "properties.settings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + protectedSettings: { + serializedName: "properties.protectedSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const VirtualMachineScaleSetListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetListResult", +export const DedicatedHostInstanceViewWithName: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetListResult", + className: "DedicatedHostInstanceViewWithName", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSet" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + ...DedicatedHostInstanceView.type.modelProperties, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } @@ -13662,749 +13351,605 @@ export const VirtualMachineScaleSetListResult: msRest.CompositeMapper = { } }; -export const VirtualMachineScaleSetListWithLinkResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetListWithLinkResult", +export const ImageOSDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetListWithLinkResult", + className: "ImageOSDisk", modelProperties: { - value: { + ...ImageDisk.type.modelProperties, + osType: { + serializedName: "osType", required: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSet" - } - } + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - nextLink: { - serializedName: "nextLink", + osState: { + serializedName: "osState", + required: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Generalized", "Specialized"] } } } } }; -export const VirtualMachineScaleSetListSkusResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetListSkusResult", +export const ImageDataDisk: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetListSkusResult", + className: "ImageDataDisk", modelProperties: { - value: { + ...ImageDisk.type.modelProperties, + lun: { + serializedName: "lun", required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetSku" - } - } - } - }, - nextLink: { - serializedName: "nextLink", type: { - name: "String" + name: "Number" } } } } }; -export const VirtualMachineScaleSetListOSUpgradeHistory: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetListOSUpgradeHistory", +export const RestorePoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetListOSUpgradeHistory", + className: "RestorePoint", modelProperties: { - value: { - required: true, - serializedName: "", + ...ProxyResource.type.modelProperties, + excludeDisks: { + serializedName: "properties.excludeDisks", type: { name: "Sequence", element: { type: { name: "Composite", - className: "UpgradeOperationHistoricalStatusInfo" + className: "ApiEntityReference" } } } }, - nextLink: { - serializedName: "nextLink", + sourceMetadata: { + serializedName: "properties.sourceMetadata", + type: { + name: "Composite", + className: "RestorePointSourceMetadata" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + consistencyMode: { + serializedName: "properties.consistencyMode", + readOnly: true, type: { name: "String" } + }, + provisioningDetails: { + serializedName: "properties.provisioningDetails", + type: { + name: "Composite", + className: "RestorePointProvisioningDetails" + } } } } }; -export const ImageListResult: msRest.CompositeMapper = { - serializedName: "ImageListResult", +export const VirtualMachineScaleSetVMReimageParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImageListResult", + className: "VirtualMachineScaleSetVMReimageParameters", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Image" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } + ...VirtualMachineReimageParameters.type.modelProperties } } }; -export const RestorePointCollectionListResult: msRest.CompositeMapper = { - serializedName: "RestorePointCollectionListResult", +export const RequestRateByIntervalInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePointCollectionListResult", + className: "RequestRateByIntervalInput", modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorePointCollection" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + ...LogAnalyticsInputBase.type.modelProperties, + intervalLength: { + serializedName: "intervalLength", + required: true, type: { - name: "String" + name: "Enum", + allowedValues: ["ThreeMins", "FiveMins", "ThirtyMins", "SixtyMins"] } } } } }; -export const VirtualMachineScaleSetExtensionListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetExtensionListResult", +export const ThrottledRequestsInput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetExtensionListResult", + className: "ThrottledRequestsInput", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineScaleSetExtension" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } + ...LogAnalyticsInputBase.type.modelProperties } } }; -export const VirtualMachineScaleSetVMListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineScaleSetVMListResult", +export const RunCommandDocument: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineScaleSetVMListResult", + className: "RunCommandDocument", modelProperties: { - value: { + ...RunCommandDocumentBase.type.modelProperties, + script: { + serializedName: "script", required: true, - serializedName: "", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "VirtualMachineScaleSetVM" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const RunCommandListResult: msRest.CompositeMapper = { - serializedName: "RunCommandListResult", - type: { - name: "Composite", - className: "RunCommandListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + parameters: { + serializedName: "parameters", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RunCommandDocumentBase" + className: "RunCommandParameterDefinition" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const VirtualMachineRunCommandsListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineRunCommandsListResult", +export const DiskRestorePoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualMachineRunCommandsListResult", + className: "DiskRestorePoint", modelProperties: { - value: { - required: true, - serializedName: "", + ...ProxyOnlyResource.type.modelProperties, + timeCreated: { + serializedName: "properties.timeCreated", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineRunCommand" - } - } + name: "DateTime" } }, - nextLink: { - serializedName: "nextLink", + sourceResourceId: { + serializedName: "properties.sourceResourceId", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ResourceSkusResult: msRest.CompositeMapper = { - serializedName: "ResourceSkusResult", - type: { - name: "Composite", - className: "ResourceSkusResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + osType: { + serializedName: "properties.osType", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSku" - } - } + name: "Enum", + allowedValues: ["Windows", "Linux"] } }, - nextLink: { - serializedName: "nextLink", + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", + type: { + name: "String" + } + }, + purchasePlan: { + serializedName: "properties.purchasePlan", + type: { + name: "Composite", + className: "PurchasePlanAutoGenerated" + } + }, + familyId: { + serializedName: "properties.familyId", + readOnly: true, + type: { + name: "String" + } + }, + sourceUniqueId: { + serializedName: "properties.sourceUniqueId", + readOnly: true, type: { name: "String" } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "Encryption" + } + }, + supportsHibernation: { + serializedName: "properties.supportsHibernation", + type: { + name: "Boolean" + } } } } }; -export const DiskList: msRest.CompositeMapper = { - serializedName: "DiskList", +export const GalleryUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskList", + className: "GalleryUpdate", modelProperties: { - value: { - required: true, - serializedName: "", + ...UpdateResourceDefinition.type.modelProperties, + description: { + serializedName: "properties.description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Disk" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + identifier: { + serializedName: "properties.identifier", + type: { + name: "Composite", + className: "GalleryIdentifier" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } + }, + sharingProfile: { + serializedName: "properties.sharingProfile", + type: { + name: "Composite", + className: "SharingProfile" + } } } } }; -export const SnapshotList: msRest.CompositeMapper = { - serializedName: "SnapshotList", +export const GalleryImageUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SnapshotList", + className: "GalleryImageUpdate", modelProperties: { - value: { - required: true, - serializedName: "", + ...UpdateResourceDefinition.type.modelProperties, + description: { + serializedName: "properties.description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Snapshot" - } - } + name: "String" + } + }, + eula: { + serializedName: "properties.eula", + type: { + name: "String" + } + }, + privacyStatementUri: { + serializedName: "properties.privacyStatementUri", + type: { + name: "String" + } + }, + releaseNoteUri: { + serializedName: "properties.releaseNoteUri", + type: { + name: "String" + } + }, + osType: { + serializedName: "properties.osType", + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + }, + osState: { + serializedName: "properties.osState", + type: { + name: "Enum", + allowedValues: ["Generalized", "Specialized"] + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", + type: { + name: "String" + } + }, + endOfLifeDate: { + serializedName: "properties.endOfLifeDate", + type: { + name: "DateTime" + } + }, + identifier: { + serializedName: "properties.identifier", + type: { + name: "Composite", + className: "GalleryImageIdentifier" + } + }, + recommended: { + serializedName: "properties.recommended", + type: { + name: "Composite", + className: "RecommendedMachineConfiguration" + } + }, + disallowed: { + serializedName: "properties.disallowed", + type: { + name: "Composite", + className: "Disallowed" } }, - nextLink: { - serializedName: "nextLink", + purchasePlan: { + serializedName: "properties.purchasePlan", + type: { + name: "Composite", + className: "ImagePurchasePlan" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const DiskEncryptionSetList: msRest.CompositeMapper = { - serializedName: "DiskEncryptionSetList", - type: { - name: "Composite", - className: "DiskEncryptionSetList", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + features: { + serializedName: "properties.features", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiskEncryptionSet" + className: "GalleryImageFeature" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const ResourceUriList: msRest.CompositeMapper = { - serializedName: "ResourceUriList", +export const GalleryImageVersionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceUriList", + className: "GalleryImageVersionUpdate", modelProperties: { - value: { - required: true, - serializedName: "", + ...UpdateResourceDefinition.type.modelProperties, + publishingProfile: { + serializedName: "properties.publishingProfile", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "GalleryImageVersionPublishingProfile" } }, - nextLink: { - serializedName: "nextLink", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const DiskAccessList: msRest.CompositeMapper = { - serializedName: "DiskAccessList", - type: { - name: "Composite", - className: "DiskAccessList", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + storageProfile: { + serializedName: "properties.storageProfile", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiskAccess" - } - } + name: "Composite", + className: "GalleryImageVersionStorageProfile" } }, - nextLink: { - serializedName: "nextLink", + replicationStatus: { + serializedName: "properties.replicationStatus", type: { - name: "String" + name: "Composite", + className: "ReplicationStatus" } } } } }; -export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { - serializedName: "PrivateEndpointConnectionListResult", +export const GalleryApplicationUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "GalleryApplicationUpdate", modelProperties: { - value: { - serializedName: "", + ...UpdateResourceDefinition.type.modelProperties, + description: { + serializedName: "properties.description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + eula: { + serializedName: "properties.eula", type: { name: "String" } - } - } - } -}; - -export const DiskRestorePointList: msRest.CompositeMapper = { - serializedName: "DiskRestorePointList", - type: { - name: "Composite", - className: "DiskRestorePointList", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + privacyStatementUri: { + serializedName: "properties.privacyStatementUri", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiskRestorePoint" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + releaseNoteUri: { + serializedName: "properties.releaseNoteUri", type: { name: "String" } - } - } - } -}; - -export const GalleryList: msRest.CompositeMapper = { - serializedName: "GalleryList", - type: { - name: "Composite", - className: "GalleryList", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + endOfLifeDate: { + serializedName: "properties.endOfLifeDate", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Gallery" - } - } + name: "DateTime" } }, - nextLink: { - serializedName: "nextLink", + supportedOSType: { + serializedName: "properties.supportedOSType", type: { - name: "String" + name: "Enum", + allowedValues: ["Windows", "Linux"] } } } } }; -export const GalleryImageList: msRest.CompositeMapper = { - serializedName: "GalleryImageList", +export const GalleryApplicationVersionUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImageList", + className: "GalleryApplicationVersionUpdate", modelProperties: { - value: { - required: true, - serializedName: "", + ...UpdateResourceDefinition.type.modelProperties, + publishingProfile: { + serializedName: "properties.publishingProfile", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GalleryImage" - } - } + name: "Composite", + className: "GalleryApplicationVersionPublishingProfile" } }, - nextLink: { - serializedName: "nextLink", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } + }, + replicationStatus: { + serializedName: "properties.replicationStatus", + type: { + name: "Composite", + className: "ReplicationStatus" + } } } } }; -export const GalleryImageVersionList: msRest.CompositeMapper = { - serializedName: "GalleryImageVersionList", +export const GalleryImageVersionPublishingProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryImageVersionList", + className: "GalleryImageVersionPublishingProfile", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GalleryImageVersion" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } + ...GalleryArtifactPublishingProfileBase.type.modelProperties } } }; -export const GalleryApplicationList: msRest.CompositeMapper = { - serializedName: "GalleryApplicationList", +export const GalleryApplicationVersionPublishingProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GalleryApplicationList", + className: "GalleryApplicationVersionPublishingProfile", modelProperties: { - value: { - required: true, - serializedName: "", + ...GalleryArtifactPublishingProfileBase.type.modelProperties, + source: { + serializedName: "source", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GalleryApplication" - } - } + name: "Composite", + className: "UserArtifactSource" } }, - nextLink: { - serializedName: "nextLink", + manageActions: { + serializedName: "manageActions", type: { - name: "String" + name: "Composite", + className: "UserArtifactManage" + } + }, + enableHealthCheck: { + serializedName: "enableHealthCheck", + type: { + name: "Boolean" } } } } }; -export const GalleryApplicationVersionList: msRest.CompositeMapper = { - serializedName: "GalleryApplicationVersionList", +export const OSDiskImageEncryption: coreClient.CompositeMapper = { type: { - name: "Composite", - className: "GalleryApplicationVersionList", - modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GalleryApplicationVersion" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } + name: "Composite", + className: "OSDiskImageEncryption", + modelProperties: { + ...DiskImageEncryption.type.modelProperties } } }; -export const SharedGalleryList: msRest.CompositeMapper = { - serializedName: "SharedGalleryList", +export const DataDiskImageEncryption: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharedGalleryList", + className: "DataDiskImageEncryption", modelProperties: { - value: { + ...DiskImageEncryption.type.modelProperties, + lun: { + serializedName: "lun", required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SharedGallery" - } - } - } - }, - nextLink: { - serializedName: "nextLink", type: { - name: "String" + name: "Number" } } } } }; -export const SharedGalleryImageList: msRest.CompositeMapper = { - serializedName: "SharedGalleryImageList", +export const GalleryOSDiskImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharedGalleryImageList", + className: "GalleryOSDiskImage", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SharedGalleryImage" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } + ...GalleryDiskImage.type.modelProperties } } }; -export const SharedGalleryImageVersionList: msRest.CompositeMapper = { - serializedName: "SharedGalleryImageVersionList", +export const GalleryDataDiskImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharedGalleryImageVersionList", + className: "GalleryDataDiskImage", modelProperties: { - value: { + ...GalleryDiskImage.type.modelProperties, + lun: { + serializedName: "lun", required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SharedGalleryImageVersion" - } - } - } - }, - nextLink: { - serializedName: "nextLink", type: { - name: "String" + name: "Number" } } } } }; -export const RoleInstanceListResult: msRest.CompositeMapper = { - serializedName: "RoleInstanceListResult", +export const PirSharedGalleryResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoleInstanceListResult", + className: "PirSharedGalleryResource", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RoleInstance" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + ...PirResource.type.modelProperties, + uniqueId: { + serializedName: "identifier.uniqueId", type: { name: "String" } @@ -14413,145 +13958,197 @@ export const RoleInstanceListResult: msRest.CompositeMapper = { } }; -export const CloudServiceRoleListResult: msRest.CompositeMapper = { - serializedName: "CloudServiceRoleListResult", +export const VirtualMachineImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudServiceRoleListResult", + className: "VirtualMachineImage", modelProperties: { - value: { - required: true, - serializedName: "", + ...VirtualMachineImageResource.type.modelProperties, + plan: { + serializedName: "properties.plan", + type: { + name: "Composite", + className: "PurchasePlan" + } + }, + osDiskImage: { + serializedName: "properties.osDiskImage", + type: { + name: "Composite", + className: "OSDiskImage" + } + }, + dataDiskImages: { + serializedName: "properties.dataDiskImages", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CloudServiceRole" + className: "DataDiskImage" } } } }, - nextLink: { - serializedName: "nextLink", + automaticOSUpgradeProperties: { + serializedName: "properties.automaticOSUpgradeProperties", + type: { + name: "Composite", + className: "AutomaticOSUpgradeProperties" + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", type: { name: "String" } - } - } - } -}; - -export const CloudServiceListResult: msRest.CompositeMapper = { - serializedName: "CloudServiceListResult", - type: { - name: "Composite", - className: "CloudServiceListResult", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + disallowed: { + serializedName: "properties.disallowed", + type: { + name: "Composite", + className: "DisallowedConfiguration" + } + }, + features: { + serializedName: "properties.features", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CloudService" + className: "VirtualMachineImageFeature" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const UpdateDomainListResult: msRest.CompositeMapper = { - serializedName: "UpdateDomainListResult", +export const VirtualMachineScaleSetReimageParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpdateDomainListResult", + className: "VirtualMachineScaleSetReimageParameters", modelProperties: { - value: { - required: true, - serializedName: "", + ...VirtualMachineScaleSetVMReimageParameters.type.modelProperties, + instanceIds: { + serializedName: "instanceIds", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "UpdateDomain" + name: "String" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const OSVersionListResult: msRest.CompositeMapper = { - serializedName: "OSVersionListResult", +export const SharedGallery: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSVersionListResult", + className: "SharedGallery", modelProperties: { - value: { - required: true, - serializedName: "", + ...PirSharedGalleryResource.type.modelProperties + } + } +}; + +export const SharedGalleryImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SharedGalleryImage", + modelProperties: { + ...PirSharedGalleryResource.type.modelProperties, + osType: { + serializedName: "properties.osType", + type: { + name: "Enum", + allowedValues: ["Windows", "Linux"] + } + }, + osState: { + serializedName: "properties.osState", + type: { + name: "Enum", + allowedValues: ["Generalized", "Specialized"] + } + }, + endOfLifeDate: { + serializedName: "properties.endOfLifeDate", + type: { + name: "DateTime" + } + }, + identifier: { + serializedName: "properties.identifier", + type: { + name: "Composite", + className: "GalleryImageIdentifier" + } + }, + recommended: { + serializedName: "properties.recommended", + type: { + name: "Composite", + className: "RecommendedMachineConfiguration" + } + }, + disallowed: { + serializedName: "properties.disallowed", + type: { + name: "Composite", + className: "Disallowed" + } + }, + hyperVGeneration: { + serializedName: "properties.hyperVGeneration", + type: { + name: "String" + } + }, + features: { + serializedName: "properties.features", type: { name: "Sequence", element: { type: { name: "Composite", - className: "OSVersion" + className: "GalleryImageFeature" } } } }, - nextLink: { - serializedName: "nextLink", + purchasePlan: { + serializedName: "properties.purchasePlan", type: { - name: "String" + name: "Composite", + className: "ImagePurchasePlan" } } } } }; -export const OSFamilyListResult: msRest.CompositeMapper = { - serializedName: "OSFamilyListResult", +export const SharedGalleryImageVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OSFamilyListResult", + className: "SharedGalleryImageVersion", modelProperties: { - value: { - required: true, - serializedName: "", + ...PirSharedGalleryResource.type.modelProperties, + publishedDate: { + serializedName: "properties.publishedDate", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OSFamily" - } - } + name: "DateTime" } }, - nextLink: { - serializedName: "nextLink", + endOfLifeDate: { + serializedName: "properties.endOfLifeDate", type: { - name: "String" + name: "DateTime" } } } diff --git a/sdk/compute/arm-compute/src/models/operationsMappers.ts b/sdk/compute/arm-compute/src/models/operationsMappers.ts deleted file mode 100644 index 6b80c42b2d21..000000000000 --- a/sdk/compute/arm-compute/src/models/operationsMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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 { - CloudError, - ComputeOperationListResult, - ComputeOperationValue -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/parameters.ts b/sdk/compute/arm-compute/src/models/parameters.ts index 9b94392a8c18..3be86582054f 100644 --- a/sdk/compute/arm-compute/src/models/parameters.ts +++ b/sdk/compute/arm-compute/src/models/parameters.ts @@ -3,160 +3,248 @@ * 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 { + AvailabilitySet as AvailabilitySetMapper, + AvailabilitySetUpdate as AvailabilitySetUpdateMapper, + ProximityPlacementGroup as ProximityPlacementGroupMapper, + ProximityPlacementGroupUpdate as ProximityPlacementGroupUpdateMapper, + DedicatedHostGroup as DedicatedHostGroupMapper, + DedicatedHostGroupUpdate as DedicatedHostGroupUpdateMapper, + DedicatedHost as DedicatedHostMapper, + DedicatedHostUpdate as DedicatedHostUpdateMapper, + SshPublicKeyResource as SshPublicKeyResourceMapper, + SshPublicKeyUpdateResource as SshPublicKeyUpdateResourceMapper, + VirtualMachineExtension as VirtualMachineExtensionMapper, + VirtualMachineExtensionUpdate as VirtualMachineExtensionUpdateMapper, + VirtualMachineCaptureParameters as VirtualMachineCaptureParametersMapper, + VirtualMachine as VirtualMachineMapper, + VirtualMachineUpdate as VirtualMachineUpdateMapper, + VirtualMachineReimageParameters as VirtualMachineReimageParametersMapper, + VirtualMachineInstallPatchesParameters as VirtualMachineInstallPatchesParametersMapper, + RunCommandInput as RunCommandInputMapper, + VirtualMachineScaleSet as VirtualMachineScaleSetMapper, + VirtualMachineScaleSetUpdate as VirtualMachineScaleSetUpdateMapper, + VirtualMachineScaleSetVMInstanceIDs as VirtualMachineScaleSetVMInstanceIDsMapper, + VirtualMachineScaleSetVMInstanceRequiredIDs as VirtualMachineScaleSetVMInstanceRequiredIDsMapper, + VirtualMachineScaleSetReimageParameters as VirtualMachineScaleSetReimageParametersMapper, + VMScaleSetConvertToSinglePlacementGroupInput as VMScaleSetConvertToSinglePlacementGroupInputMapper, + OrchestrationServiceStateInput as OrchestrationServiceStateInputMapper, + Image as ImageMapper, + ImageUpdate as ImageUpdateMapper, + RestorePointCollection as RestorePointCollectionMapper, + RestorePointCollectionUpdate as RestorePointCollectionUpdateMapper, + RestorePoint as RestorePointMapper, + VirtualMachineScaleSetExtension as VirtualMachineScaleSetExtensionMapper, + VirtualMachineScaleSetExtensionUpdate as VirtualMachineScaleSetExtensionUpdateMapper, + VirtualMachineScaleSetVMExtension as VirtualMachineScaleSetVMExtensionMapper, + VirtualMachineScaleSetVMExtensionUpdate as VirtualMachineScaleSetVMExtensionUpdateMapper, + VirtualMachineScaleSetVMReimageParameters as VirtualMachineScaleSetVMReimageParametersMapper, + VirtualMachineScaleSetVM as VirtualMachineScaleSetVMMapper, + RequestRateByIntervalInput as RequestRateByIntervalInputMapper, + ThrottledRequestsInput as ThrottledRequestsInputMapper, + VirtualMachineRunCommand as VirtualMachineRunCommandMapper, + VirtualMachineRunCommandUpdate as VirtualMachineRunCommandUpdateMapper, + Disk as DiskMapper, + DiskUpdate as DiskUpdateMapper, + GrantAccessData as GrantAccessDataMapper, + Snapshot as SnapshotMapper, + SnapshotUpdate as SnapshotUpdateMapper, + DiskEncryptionSet as DiskEncryptionSetMapper, + DiskEncryptionSetUpdate as DiskEncryptionSetUpdateMapper, + DiskAccess as DiskAccessMapper, + DiskAccessUpdate as DiskAccessUpdateMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper, + Gallery as GalleryMapper, + GalleryUpdate as GalleryUpdateMapper, + GalleryImage as GalleryImageMapper, + GalleryImageUpdate as GalleryImageUpdateMapper, + GalleryImageVersion as GalleryImageVersionMapper, + GalleryImageVersionUpdate as GalleryImageVersionUpdateMapper, + GalleryApplication as GalleryApplicationMapper, + GalleryApplicationUpdate as GalleryApplicationUpdateMapper, + GalleryApplicationVersion as GalleryApplicationVersionMapper, + GalleryApplicationVersionUpdate as GalleryApplicationVersionUpdateMapper, + SharingUpdate as SharingUpdateMapper, + CloudService as CloudServiceMapper, + CloudServiceUpdate as CloudServiceUpdateMapper, + RoleInstances as RoleInstancesMapper, + UpdateDomain as UpdateDomainMapper +} 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 apiVersion0: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const $host: OperationURLParameter = { + parameterPath: "$host", mapper: { + serializedName: "$host", required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: "2021-03-01", type: { name: "String" } - } + }, + skipEncoding: true }; -export const apiVersion1: msRest.OperationQueryParameter = { + +export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - required: true, + defaultValue: "2021-03-01", isConstant: true, serializedName: "api-version", - defaultValue: "2019-04-01", type: { name: "String" } } }; -export const apiVersion2: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - required: true, + defaultValue: "application/json", isConstant: true, - serializedName: "api-version", - defaultValue: "2020-12-01", + serializedName: "Content-Type", type: { name: "String" } } }; -export const apiVersion3: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: AvailabilitySetMapper +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { + serializedName: "resourceGroupName", required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: "2020-09-30", type: { name: "String" } } }; -export const availabilitySetName: msRest.OperationURLParameter = { + +export const availabilitySetName: OperationURLParameter = { parameterPath: "availabilitySetName", mapper: { - required: true, serializedName: "availabilitySetName", - type: { - name: "String" - } - } -}; -export const cloudServiceName: msRest.OperationURLParameter = { - parameterPath: "cloudServiceName", - mapper: { required: true, - serializedName: "cloudServiceName", type: { name: "String" } } }; -export const commandId: msRest.OperationURLParameter = { - parameterPath: "commandId", + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { + serializedName: "subscriptionId", required: true, - serializedName: "commandId", type: { name: "String" } } }; -export const diskAccessName: msRest.OperationURLParameter = { - parameterPath: "diskAccessName", + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: AvailabilitySetUpdateMapper +}; + +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { - required: true, - serializedName: "diskAccessName", + serializedName: "$expand", type: { name: "String" } } }; -export const diskEncryptionSetName: msRest.OperationURLParameter = { - parameterPath: "diskEncryptionSetName", + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { + serializedName: "nextLink", required: true, - serializedName: "diskEncryptionSetName", type: { name: "String" } - } + }, + skipEncoding: true }; -export const diskName: msRest.OperationURLParameter = { - parameterPath: "diskName", + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: ProximityPlacementGroupMapper +}; + +export const proximityPlacementGroupName: OperationURLParameter = { + parameterPath: "proximityPlacementGroupName", mapper: { + serializedName: "proximityPlacementGroupName", required: true, - serializedName: "diskName", type: { name: "String" } } }; -export const diskRestorePointName: msRest.OperationURLParameter = { - parameterPath: "diskRestorePointName", + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: ProximityPlacementGroupUpdateMapper +}; + +export const includeColocationStatus: OperationQueryParameter = { + parameterPath: ["options", "includeColocationStatus"], mapper: { - required: true, - serializedName: "diskRestorePointName", + serializedName: "includeColocationStatus", type: { name: "String" } } }; -export const edgeZone: msRest.OperationURLParameter = { - parameterPath: "edgeZone", + +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: DedicatedHostGroupMapper +}; + +export const hostGroupName: OperationURLParameter = { + parameterPath: "hostGroupName", mapper: { + serializedName: "hostGroupName", required: true, - serializedName: "edgeZone", type: { name: "String" } } }; -export const expand0: msRest.OperationQueryParameter = { - parameterPath: ["options", "expand"], - mapper: { - serializedName: "$expand", - type: { - name: "String" - } - } + +export const parameters5: OperationParameter = { + parameterPath: "parameters", + mapper: DedicatedHostGroupUpdateMapper }; -export const expand1: msRest.OperationQueryParameter = { + +export const expand1: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", @@ -166,316 +254,483 @@ export const expand1: msRest.OperationQueryParameter = { } } }; -export const filter: msRest.OperationQueryParameter = { - parameterPath: ["options", "filter"], + +export const parameters6: OperationParameter = { + parameterPath: "parameters", + mapper: DedicatedHostMapper +}; + +export const hostName: OperationURLParameter = { + parameterPath: "hostName", mapper: { - serializedName: "$filter", + serializedName: "hostName", + required: true, type: { name: "String" } } }; -export const forceDeletion: msRest.OperationQueryParameter = { - parameterPath: ["options", "forceDeletion"], + +export const parameters7: OperationParameter = { + parameterPath: "parameters", + mapper: DedicatedHostUpdateMapper +}; + +export const parameters8: OperationParameter = { + parameterPath: "parameters", + mapper: SshPublicKeyResourceMapper +}; + +export const sshPublicKeyName: OperationURLParameter = { + parameterPath: "sshPublicKeyName", mapper: { - serializedName: "forceDeletion", + serializedName: "sshPublicKeyName", + required: true, type: { - name: "Boolean" + name: "String" } } }; -export const galleryApplicationName: msRest.OperationURLParameter = { - parameterPath: "galleryApplicationName", + +export const parameters9: OperationParameter = { + parameterPath: "parameters", + mapper: SshPublicKeyUpdateResourceMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", mapper: { + serializedName: "location", required: true, - serializedName: "galleryApplicationName", type: { name: "String" } } }; -export const galleryApplicationVersionName: msRest.OperationURLParameter = { - parameterPath: "galleryApplicationVersionName", + +export const publisherName: OperationURLParameter = { + parameterPath: "publisherName", mapper: { + serializedName: "publisherName", required: true, - serializedName: "galleryApplicationVersionName", type: { name: "String" } } }; -export const galleryImageName: msRest.OperationURLParameter = { - parameterPath: "galleryImageName", + +export const typeParam: OperationURLParameter = { + parameterPath: "typeParam", mapper: { + serializedName: "type", required: true, - serializedName: "galleryImageName", type: { name: "String" } } }; -export const galleryImageVersionName: msRest.OperationURLParameter = { - parameterPath: "galleryImageVersionName", + +export const version: OperationURLParameter = { + parameterPath: "version", mapper: { + serializedName: "version", required: true, - serializedName: "galleryImageVersionName", type: { name: "String" } } }; -export const galleryName: msRest.OperationURLParameter = { - parameterPath: "galleryName", + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], mapper: { - required: true, - serializedName: "galleryName", + serializedName: "$filter", type: { name: "String" } } }; -export const galleryUniqueName: msRest.OperationURLParameter = { - parameterPath: "galleryUniqueName", + +export const top: OperationQueryParameter = { + parameterPath: ["options", "top"], mapper: { - required: true, - serializedName: "galleryUniqueName", + serializedName: "$top", type: { - name: "String" + name: "Number" } } }; -export const hostGroupName: msRest.OperationURLParameter = { - parameterPath: "hostGroupName", + +export const orderby: OperationQueryParameter = { + parameterPath: ["options", "orderby"], mapper: { - required: true, - serializedName: "hostGroupName", + serializedName: "$orderby", type: { name: "String" } } }; -export const hostName: msRest.OperationURLParameter = { - parameterPath: "hostName", + +export const extensionParameters: OperationParameter = { + parameterPath: "extensionParameters", + mapper: VirtualMachineExtensionMapper +}; + +export const vmName: OperationURLParameter = { + parameterPath: "vmName", mapper: { + serializedName: "vmName", required: true, - serializedName: "hostName", type: { name: "String" } } }; -export const imageName: msRest.OperationURLParameter = { - parameterPath: "imageName", + +export const vmExtensionName: OperationURLParameter = { + parameterPath: "vmExtensionName", mapper: { + serializedName: "vmExtensionName", required: true, - serializedName: "imageName", type: { name: "String" } } }; -export const includeColocationStatus: msRest.OperationQueryParameter = { - parameterPath: ["options", "includeColocationStatus"], + +export const extensionParameters1: OperationParameter = { + parameterPath: "extensionParameters", + mapper: VirtualMachineExtensionUpdateMapper +}; + +export const offer: OperationURLParameter = { + parameterPath: "offer", mapper: { - serializedName: "includeColocationStatus", + serializedName: "offer", + required: true, type: { name: "String" } } }; -export const instanceId: msRest.OperationURLParameter = { - parameterPath: "instanceId", + +export const skus: OperationURLParameter = { + parameterPath: "skus", mapper: { + serializedName: "skus", required: true, - serializedName: "instanceId", type: { name: "String" } } }; -export const location0: msRest.OperationURLParameter = { - parameterPath: "location", + +export const edgeZone: OperationURLParameter = { + parameterPath: "edgeZone", mapper: { + serializedName: "edgeZone", required: true, - serializedName: "location", type: { name: "String" } } }; -export const location1: msRest.OperationURLParameter = { + +export const location1: OperationURLParameter = { parameterPath: "location", mapper: { - required: true, - serializedName: "location", constraints: { - Pattern: /^[-\w\._]+$/ + Pattern: new RegExp("^[-\\w\\._]+$") }, + serializedName: "location", + required: true, type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", - mapper: { - required: true, - serializedName: "nextLink", - type: { - name: "String" - } - }, - skipEncoding: true + +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualMachineCaptureParametersMapper }; -export const offer: msRest.OperationURLParameter = { - parameterPath: "offer", + +export const parameters11: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualMachineMapper +}; + +export const parameters12: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualMachineUpdateMapper +}; + +export const forceDeletion: OperationQueryParameter = { + parameterPath: ["options", "forceDeletion"], mapper: { - required: true, - serializedName: "offer", + serializedName: "forceDeletion", type: { - name: "String" + name: "Boolean" } } }; -export const orderby: msRest.OperationQueryParameter = { - parameterPath: ["options", "orderby"], + +export const statusOnly: OperationQueryParameter = { + parameterPath: ["options", "statusOnly"], mapper: { - serializedName: "$orderby", + serializedName: "statusOnly", type: { name: "String" } } }; -export const osFamilyName: msRest.OperationURLParameter = { - parameterPath: "osFamilyName", + +export const skipShutdown: OperationQueryParameter = { + parameterPath: ["options", "skipShutdown"], mapper: { - required: true, - serializedName: "osFamilyName", + serializedName: "skipShutdown", type: { - name: "String" + name: "Boolean" } } }; -export const osVersionName: msRest.OperationURLParameter = { - parameterPath: "osVersionName", + +export const parameters13: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: VirtualMachineReimageParametersMapper +}; + +export const sasUriExpirationTimeInMinutes: OperationQueryParameter = { + parameterPath: ["options", "sasUriExpirationTimeInMinutes"], mapper: { - required: true, - serializedName: "osVersionName", + serializedName: "sasUriExpirationTimeInMinutes", type: { - name: "String" + name: "Number" } } }; -export const platformUpdateDomain: msRest.OperationQueryParameter = { - parameterPath: "platformUpdateDomain", + +export const installPatchesInput: OperationParameter = { + parameterPath: "installPatchesInput", + mapper: VirtualMachineInstallPatchesParametersMapper +}; + +export const parameters14: OperationParameter = { + parameterPath: "parameters", + mapper: RunCommandInputMapper +}; + +export const accept1: OperationParameter = { + parameterPath: "accept", mapper: { - required: true, - serializedName: "platformUpdateDomain", + defaultValue: "application/json, text/json", + isConstant: true, + serializedName: "Accept", type: { - name: "Number" + name: "String" } } }; -export const privateEndpointConnectionName: msRest.OperationURLParameter = { - parameterPath: "privateEndpointConnectionName", + +export const parameters15: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualMachineScaleSetMapper +}; + +export const vmScaleSetName: OperationURLParameter = { + parameterPath: "vmScaleSetName", mapper: { + serializedName: "vmScaleSetName", required: true, - serializedName: "privateEndpointConnectionName", type: { name: "String" } } }; -export const proximityPlacementGroupName: msRest.OperationURLParameter = { - parameterPath: "proximityPlacementGroupName", + +export const parameters16: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualMachineScaleSetUpdateMapper +}; + +export const expand2: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { - required: true, - serializedName: "proximityPlacementGroupName", + serializedName: "$expand", type: { name: "String" } } }; -export const publisherName: msRest.OperationURLParameter = { - parameterPath: "publisherName", - mapper: { + +export const vmInstanceIDs: OperationParameter = { + parameterPath: ["options", "vmInstanceIDs"], + mapper: VirtualMachineScaleSetVMInstanceIDsMapper +}; + +export const vmInstanceIDs1: OperationParameter = { + parameterPath: "vmInstanceIDs", + mapper: VirtualMachineScaleSetVMInstanceRequiredIDsMapper +}; + +export const vmScaleSetReimageInput: OperationParameter = { + parameterPath: ["options", "vmScaleSetReimageInput"], + mapper: VirtualMachineScaleSetReimageParametersMapper +}; + +export const platformUpdateDomain: OperationQueryParameter = { + parameterPath: "platformUpdateDomain", + mapper: { + serializedName: "platformUpdateDomain", required: true, - serializedName: "publisherName", type: { - name: "String" + name: "Number" } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", + +export const parameters17: OperationParameter = { + parameterPath: "parameters", + mapper: VMScaleSetConvertToSinglePlacementGroupInputMapper +}; + +export const parameters18: OperationParameter = { + parameterPath: "parameters", + mapper: OrchestrationServiceStateInputMapper +}; + +export const parameters19: OperationParameter = { + parameterPath: "parameters", + mapper: ImageMapper +}; + +export const imageName: OperationURLParameter = { + parameterPath: "imageName", mapper: { + serializedName: "imageName", required: true, - serializedName: "resourceGroupName", type: { name: "String" } } }; -export const restorePointCollectionName: msRest.OperationURLParameter = { + +export const parameters20: OperationParameter = { + parameterPath: "parameters", + mapper: ImageUpdateMapper +}; + +export const parameters21: OperationParameter = { + parameterPath: "parameters", + mapper: RestorePointCollectionMapper +}; + +export const restorePointCollectionName: OperationURLParameter = { parameterPath: "restorePointCollectionName", mapper: { - required: true, serializedName: "restorePointCollectionName", + required: true, type: { name: "String" } } }; -export const restorePointName: msRest.OperationURLParameter = { - parameterPath: "restorePointName", + +export const parameters22: OperationParameter = { + parameterPath: "parameters", + mapper: RestorePointCollectionUpdateMapper +}; + +export const expand3: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { - required: true, - serializedName: "restorePointName", + serializedName: "$expand", type: { name: "String" } } }; -export const roleInstanceName: msRest.OperationURLParameter = { - parameterPath: "roleInstanceName", + +export const parameters23: OperationParameter = { + parameterPath: "parameters", + mapper: RestorePointMapper +}; + +export const restorePointName: OperationURLParameter = { + parameterPath: "restorePointName", mapper: { + serializedName: "restorePointName", required: true, - serializedName: "roleInstanceName", type: { name: "String" } } }; -export const roleName: msRest.OperationURLParameter = { - parameterPath: "roleName", + +export const extensionParameters2: OperationParameter = { + parameterPath: "extensionParameters", + mapper: VirtualMachineScaleSetExtensionMapper +}; + +export const vmssExtensionName: OperationURLParameter = { + parameterPath: "vmssExtensionName", mapper: { + serializedName: "vmssExtensionName", required: true, - serializedName: "roleName", type: { name: "String" } } }; -export const runCommandName: msRest.OperationURLParameter = { - parameterPath: "runCommandName", + +export const extensionParameters3: OperationParameter = { + parameterPath: "extensionParameters", + mapper: VirtualMachineScaleSetExtensionUpdateMapper +}; + +export const extensionParameters4: OperationParameter = { + parameterPath: "extensionParameters", + mapper: VirtualMachineScaleSetVMExtensionMapper +}; + +export const instanceId: OperationURLParameter = { + parameterPath: "instanceId", mapper: { + serializedName: "instanceId", required: true, - serializedName: "runCommandName", type: { name: "String" } } }; -export const sasUriExpirationTimeInMinutes: msRest.OperationQueryParameter = { - parameterPath: ["options", "sasUriExpirationTimeInMinutes"], + +export const extensionParameters5: OperationParameter = { + parameterPath: "extensionParameters", + mapper: VirtualMachineScaleSetVMExtensionUpdateMapper +}; + +export const vmScaleSetVMReimageInput: OperationParameter = { + parameterPath: ["options", "vmScaleSetVMReimageInput"], + mapper: VirtualMachineScaleSetVMReimageParametersMapper +}; + +export const parameters24: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualMachineScaleSetVMMapper +}; + +export const virtualMachineScaleSetName: OperationURLParameter = { + parameterPath: "virtualMachineScaleSetName", mapper: { - serializedName: "sasUriExpirationTimeInMinutes", + serializedName: "virtualMachineScaleSetName", + required: true, type: { - name: "Number" + name: "String" } } }; -export const select: msRest.OperationQueryParameter = { + +export const select: OperationQueryParameter = { parameterPath: ["options", "select"], mapper: { serializedName: "$select", @@ -484,168 +739,455 @@ export const select: msRest.OperationQueryParameter = { } } }; -export const sharedTo: msRest.OperationQueryParameter = { - parameterPath: ["options", "sharedTo"], + +export const parameters25: OperationParameter = { + parameterPath: "parameters", + mapper: RequestRateByIntervalInputMapper +}; + +export const parameters26: OperationParameter = { + parameterPath: "parameters", + mapper: ThrottledRequestsInputMapper +}; + +export const commandId: OperationURLParameter = { + parameterPath: "commandId", mapper: { - serializedName: "sharedTo", + serializedName: "commandId", + required: true, type: { name: "String" } } }; -export const skipShutdown: msRest.OperationQueryParameter = { - parameterPath: ["options", "skipShutdown"], + +export const runCommand: OperationParameter = { + parameterPath: "runCommand", + mapper: VirtualMachineRunCommandMapper +}; + +export const runCommandName: OperationURLParameter = { + parameterPath: "runCommandName", mapper: { - serializedName: "skipShutdown", - defaultValue: false, + serializedName: "runCommandName", + required: true, type: { - name: "Boolean" + name: "String" } } }; -export const skus: msRest.OperationURLParameter = { - parameterPath: "skus", + +export const runCommand1: OperationParameter = { + parameterPath: "runCommand", + mapper: VirtualMachineRunCommandUpdateMapper +}; + +export const apiVersion1: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2019-04-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const disk: OperationParameter = { + parameterPath: "disk", + mapper: DiskMapper +}; + +export const diskName: OperationURLParameter = { + parameterPath: "diskName", mapper: { + serializedName: "diskName", required: true, - serializedName: "skus", type: { name: "String" } } }; -export const snapshotName: msRest.OperationURLParameter = { + +export const apiVersion2: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-12-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const disk1: OperationParameter = { + parameterPath: "disk", + mapper: DiskUpdateMapper +}; + +export const grantAccessData: OperationParameter = { + parameterPath: "grantAccessData", + mapper: GrantAccessDataMapper +}; + +export const snapshot: OperationParameter = { + parameterPath: "snapshot", + mapper: SnapshotMapper +}; + +export const snapshotName: OperationURLParameter = { parameterPath: "snapshotName", mapper: { - required: true, serializedName: "snapshotName", + required: true, type: { name: "String" } } }; -export const sshPublicKeyName: msRest.OperationURLParameter = { - parameterPath: "sshPublicKeyName", + +export const snapshot1: OperationParameter = { + parameterPath: "snapshot", + mapper: SnapshotUpdateMapper +}; + +export const diskEncryptionSet: OperationParameter = { + parameterPath: "diskEncryptionSet", + mapper: DiskEncryptionSetMapper +}; + +export const diskEncryptionSetName: OperationURLParameter = { + parameterPath: "diskEncryptionSetName", mapper: { + serializedName: "diskEncryptionSetName", required: true, - serializedName: "sshPublicKeyName", type: { name: "String" } } }; -export const statusOnly: msRest.OperationQueryParameter = { - parameterPath: ["options", "statusOnly"], + +export const diskEncryptionSet1: OperationParameter = { + parameterPath: "diskEncryptionSet", + mapper: DiskEncryptionSetUpdateMapper +}; + +export const diskAccess: OperationParameter = { + parameterPath: "diskAccess", + mapper: DiskAccessMapper +}; + +export const diskAccessName: OperationURLParameter = { + parameterPath: "diskAccessName", mapper: { - serializedName: "statusOnly", + serializedName: "diskAccessName", + required: true, type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const diskAccess1: OperationParameter = { + parameterPath: "diskAccess", + mapper: DiskAccessUpdateMapper +}; + +export const privateEndpointConnection: OperationParameter = { + parameterPath: "privateEndpointConnection", + mapper: PrivateEndpointConnectionMapper +}; + +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", mapper: { + serializedName: "privateEndpointConnectionName", required: true, - serializedName: "subscriptionId", type: { name: "String" } } }; -export const top: msRest.OperationQueryParameter = { - parameterPath: ["options", "top"], + +export const vmRestorePointName: OperationURLParameter = { + parameterPath: "vmRestorePointName", mapper: { - serializedName: "$top", + serializedName: "vmRestorePointName", + required: true, type: { - name: "Number" + name: "String" } } }; -export const type: msRest.OperationURLParameter = { - parameterPath: "type", + +export const diskRestorePointName: OperationURLParameter = { + parameterPath: "diskRestorePointName", mapper: { + serializedName: "diskRestorePointName", required: true, - serializedName: "type", type: { name: "String" } } }; -export const updateDomain: msRest.OperationURLParameter = { - parameterPath: "updateDomain", + +export const gallery: OperationParameter = { + parameterPath: "gallery", + mapper: GalleryMapper +}; + +export const galleryName: OperationURLParameter = { + parameterPath: "galleryName", mapper: { + serializedName: "galleryName", required: true, - serializedName: "updateDomain", type: { - name: "Number" + name: "String" } } }; -export const version: msRest.OperationURLParameter = { - parameterPath: "version", + +export const apiVersion3: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2020-09-30", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const gallery1: OperationParameter = { + parameterPath: "gallery", + mapper: GalleryUpdateMapper +}; + +export const select1: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$select", + type: { + name: "String" + } + } +}; + +export const galleryImage: OperationParameter = { + parameterPath: "galleryImage", + mapper: GalleryImageMapper +}; + +export const galleryImageName: OperationURLParameter = { + parameterPath: "galleryImageName", mapper: { + serializedName: "galleryImageName", required: true, - serializedName: "version", type: { name: "String" } } }; -export const virtualMachineScaleSetName: msRest.OperationURLParameter = { - parameterPath: "virtualMachineScaleSetName", + +export const galleryImage1: OperationParameter = { + parameterPath: "galleryImage", + mapper: GalleryImageUpdateMapper +}; + +export const galleryImageVersion: OperationParameter = { + parameterPath: "galleryImageVersion", + mapper: GalleryImageVersionMapper +}; + +export const galleryImageVersionName: OperationURLParameter = { + parameterPath: "galleryImageVersionName", mapper: { + serializedName: "galleryImageVersionName", required: true, - serializedName: "virtualMachineScaleSetName", type: { name: "String" } } }; -export const vmExtensionName: msRest.OperationURLParameter = { - parameterPath: "vmExtensionName", + +export const galleryImageVersion1: OperationParameter = { + parameterPath: "galleryImageVersion", + mapper: GalleryImageVersionUpdateMapper +}; + +export const expand4: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; + +export const galleryApplication: OperationParameter = { + parameterPath: "galleryApplication", + mapper: GalleryApplicationMapper +}; + +export const galleryApplicationName: OperationURLParameter = { + parameterPath: "galleryApplicationName", mapper: { + serializedName: "galleryApplicationName", required: true, - serializedName: "vmExtensionName", type: { name: "String" } } }; -export const vmName: msRest.OperationURLParameter = { - parameterPath: "vmName", + +export const galleryApplication1: OperationParameter = { + parameterPath: "galleryApplication", + mapper: GalleryApplicationUpdateMapper +}; + +export const galleryApplicationVersion: OperationParameter = { + parameterPath: "galleryApplicationVersion", + mapper: GalleryApplicationVersionMapper +}; + +export const galleryApplicationVersionName: OperationURLParameter = { + parameterPath: "galleryApplicationVersionName", mapper: { + serializedName: "galleryApplicationVersionName", required: true, - serializedName: "vmName", type: { name: "String" } } }; -export const vmRestorePointName: msRest.OperationURLParameter = { - parameterPath: "vmRestorePointName", + +export const galleryApplicationVersion1: OperationParameter = { + parameterPath: "galleryApplicationVersion", + mapper: GalleryApplicationVersionUpdateMapper +}; + +export const sharingUpdate: OperationParameter = { + parameterPath: "sharingUpdate", + mapper: SharingUpdateMapper +}; + +export const sharedTo: OperationQueryParameter = { + parameterPath: ["options", "sharedTo"], mapper: { + serializedName: "sharedTo", + type: { + name: "String" + } + } +}; + +export const galleryUniqueName: OperationURLParameter = { + parameterPath: "galleryUniqueName", + mapper: { + serializedName: "galleryUniqueName", required: true, - serializedName: "vmRestorePointName", type: { name: "String" } } }; -export const vmScaleSetName: msRest.OperationURLParameter = { - parameterPath: "vmScaleSetName", + +export const roleInstanceName: OperationURLParameter = { + parameterPath: "roleInstanceName", mapper: { + serializedName: "roleInstanceName", required: true, - serializedName: "vmScaleSetName", type: { name: "String" } } }; -export const vmssExtensionName: msRest.OperationURLParameter = { - parameterPath: "vmssExtensionName", + +export const cloudServiceName: OperationURLParameter = { + parameterPath: "cloudServiceName", mapper: { + serializedName: "cloudServiceName", + required: true, + type: { + name: "String" + } + } +}; + +export const accept2: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/x-rdp", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const roleName: OperationURLParameter = { + parameterPath: "roleName", + mapper: { + serializedName: "roleName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters27: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: CloudServiceMapper +}; + +export const parameters28: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: CloudServiceUpdateMapper +}; + +export const parameters29: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: RoleInstancesMapper +}; + +export const parameters30: OperationParameter = { + parameterPath: ["options", "parameters"], + mapper: UpdateDomainMapper +}; + +export const updateDomain: OperationURLParameter = { + parameterPath: "updateDomain", + mapper: { + serializedName: "updateDomain", + required: true, + type: { + name: "Number" + } + } +}; + +export const osVersionName: OperationURLParameter = { + parameterPath: "osVersionName", + mapper: { + serializedName: "osVersionName", + required: true, + type: { + name: "String" + } + } +}; + +export const osFamilyName: OperationURLParameter = { + parameterPath: "osFamilyName", + mapper: { + serializedName: "osFamilyName", required: true, - serializedName: "vmssExtensionName", type: { name: "String" } diff --git a/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts b/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts deleted file mode 100644 index 8bf13b7b73b0..000000000000 --- a/sdk/compute/arm-compute/src/models/proximityPlacementGroupsMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupListResult, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/resourceSkusMappers.ts b/sdk/compute/arm-compute/src/models/resourceSkusMappers.ts deleted file mode 100644 index 2f02dae60cc5..000000000000 --- a/sdk/compute/arm-compute/src/models/resourceSkusMappers.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 { - CloudError, - ResourceSku, - ResourceSkuCapabilities, - ResourceSkuCapacity, - ResourceSkuCosts, - ResourceSkuLocationInfo, - ResourceSkuRestrictionInfo, - ResourceSkuRestrictions, - ResourceSkusResult, - ResourceSkuZoneDetails -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/restorePointCollectionsMappers.ts b/sdk/compute/arm-compute/src/models/restorePointCollectionsMappers.ts deleted file mode 100644 index 5648fc69c126..000000000000 --- a/sdk/compute/arm-compute/src/models/restorePointCollectionsMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionListResult, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/restorePointsMappers.ts b/sdk/compute/arm-compute/src/models/restorePointsMappers.ts deleted file mode 100644 index 959e24e26d33..000000000000 --- a/sdk/compute/arm-compute/src/models/restorePointsMappers.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/sharedGalleriesMappers.ts b/sdk/compute/arm-compute/src/models/sharedGalleriesMappers.ts deleted file mode 100644 index ce674aba8515..000000000000 --- a/sdk/compute/arm-compute/src/models/sharedGalleriesMappers.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - Disallowed, - GalleryImageFeature, - GalleryImageIdentifier, - ImagePurchasePlan, - InnerError, - PirResource, - PirSharedGalleryResource, - RecommendedMachineConfiguration, - ResourceRange, - SharedGallery, - SharedGalleryImage, - SharedGalleryImageVersion, - SharedGalleryList -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/sharedGalleryImageVersionsMappers.ts b/sdk/compute/arm-compute/src/models/sharedGalleryImageVersionsMappers.ts deleted file mode 100644 index 45b623b19c9d..000000000000 --- a/sdk/compute/arm-compute/src/models/sharedGalleryImageVersionsMappers.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - Disallowed, - GalleryImageFeature, - GalleryImageIdentifier, - ImagePurchasePlan, - InnerError, - PirResource, - PirSharedGalleryResource, - RecommendedMachineConfiguration, - ResourceRange, - SharedGallery, - SharedGalleryImage, - SharedGalleryImageVersion, - SharedGalleryImageVersionList -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/sharedGalleryImagesMappers.ts b/sdk/compute/arm-compute/src/models/sharedGalleryImagesMappers.ts deleted file mode 100644 index b5cecede4fdd..000000000000 --- a/sdk/compute/arm-compute/src/models/sharedGalleryImagesMappers.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { - ApiError, - ApiErrorBase, - CloudError, - Disallowed, - GalleryImageFeature, - GalleryImageIdentifier, - ImagePurchasePlan, - InnerError, - PirResource, - PirSharedGalleryResource, - RecommendedMachineConfiguration, - ResourceRange, - SharedGallery, - SharedGalleryImage, - SharedGalleryImageList, - SharedGalleryImageVersion -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/snapshotsMappers.ts b/sdk/compute/arm-compute/src/models/snapshotsMappers.ts deleted file mode 100644 index 91db2eb525a5..000000000000 --- a/sdk/compute/arm-compute/src/models/snapshotsMappers.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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 { - AccessUri, - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - GrantAccessData, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotList, - SnapshotSku, - SnapshotUpdate, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts b/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts deleted file mode 100644 index a1ec275cc4ce..000000000000 --- a/sdk/compute/arm-compute/src/models/sshPublicKeysMappers.ts +++ /dev/null @@ -1,250 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyGenerateKeyPairResult, - SshPublicKeyResource, - SshPublicKeysGroupListResult, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/usageOperationsMappers.ts b/sdk/compute/arm-compute/src/models/usageOperationsMappers.ts deleted file mode 100644 index 2bb344ff0880..000000000000 --- a/sdk/compute/arm-compute/src/models/usageOperationsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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 { - CloudError, - ListUsagesResult, - Usage, - UsageName -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts deleted file mode 100644 index 959e24e26d33..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineExtensionImagesMappers.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts deleted file mode 100644 index c51cee5cf8cb..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineExtensionsMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionsListResult, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineImagesEdgeZoneMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineImagesEdgeZoneMappers.ts deleted file mode 100644 index 959e24e26d33..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineImagesEdgeZoneMappers.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts deleted file mode 100644 index 959e24e26d33..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineImagesMappers.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts deleted file mode 100644 index ff65623f4621..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineRunCommandsMappers.ts +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandDocument, - RunCommandDocumentBase, - RunCommandInputParameter, - RunCommandListResult, - RunCommandParameterDefinition, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandsListResult, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts deleted file mode 100644 index 1882675e03de..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetExtensionsMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionListResult, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts deleted file mode 100644 index 959e24e26d33..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetRollingUpgradesMappers.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts deleted file mode 100644 index aa1cbaedbd70..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMExtensionsMappers.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionsListResult, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMRunCommandsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMRunCommandsMappers.ts deleted file mode 100644 index 84fc5ee4c5c2..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMRunCommandsMappers.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandsListResult, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineUpdate, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts deleted file mode 100644 index afe42c9aefeb..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetVMsMappers.ts +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RetrieveBootDiagnosticsDataResult, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInput, - RunCommandInputParameter, - RunCommandResult, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineReimageParameters, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetReimageParameters, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMListResult, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineScaleSetVMReimageParameters, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts deleted file mode 100644 index 8636320a95ad..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineScaleSetsMappers.ts +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OrchestrationServiceStateInput, - OrchestrationServiceSummary, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RecoveryWalkResponse, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RollbackStatusInfo, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInputParameter, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradeOperationHistoricalStatusInfo, - UpgradeOperationHistoricalStatusInfoProperties, - UpgradeOperationHistoryStatus, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineReimageParameters, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetInstanceView, - VirtualMachineScaleSetInstanceViewStatusesSummary, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetListOSUpgradeHistory, - VirtualMachineScaleSetListResult, - VirtualMachineScaleSetListSkusResult, - VirtualMachineScaleSetListWithLinkResult, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetReimageParameters, - VirtualMachineScaleSetSku, - VirtualMachineScaleSetSkuCapacity, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionsSummary, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceIDs, - VirtualMachineScaleSetVMInstanceRequiredIDs, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineScaleSetVMReimageParameters, - VirtualMachineStatusCodeCount, - VirtualMachineUpdate, - VMScaleSetConvertToSinglePlacementGroupInput, - WindowsConfiguration, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachineSizesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachineSizesMappers.ts deleted file mode 100644 index 28fe9cbb2f07..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachineSizesMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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 { - CloudError, - VirtualMachineSize, - VirtualMachineSizeListResult -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts b/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts deleted file mode 100644 index d54d9d227b61..000000000000 --- a/sdk/compute/arm-compute/src/models/virtualMachinesMappers.ts +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 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 { - AdditionalCapabilities, - AdditionalUnattendContent, - ApiEntityReference, - ApiError, - ApiErrorBase, - AutomaticOSUpgradePolicy, - AutomaticOSUpgradeProperties, - AutomaticRepairsPolicy, - AvailabilitySet, - AvailabilitySetUpdate, - AvailablePatchSummary, - BaseResource, - BillingProfile, - BootDiagnostics, - BootDiagnosticsInstanceView, - CloudError, - CloudService, - CloudServiceExtensionProfile, - CloudServiceExtensionProperties, - CloudServiceNetworkProfile, - CloudServiceOsProfile, - CloudServiceProperties, - CloudServiceRoleProfile, - CloudServiceRoleProfileProperties, - CloudServiceRoleSku, - CloudServiceVaultAndSecretReference, - CloudServiceVaultCertificate, - CloudServiceVaultSecretGroup, - CreationData, - DataDisk, - DataDiskImage, - DataDiskImageEncryption, - DedicatedHost, - DedicatedHostAllocatableVM, - DedicatedHostAvailableCapacity, - DedicatedHostGroup, - DedicatedHostGroupInstanceView, - DedicatedHostGroupUpdate, - DedicatedHostInstanceView, - DedicatedHostInstanceViewWithName, - DedicatedHostUpdate, - DiagnosticsProfile, - DiffDiskSettings, - Disallowed, - DisallowedConfiguration, - Disk, - DiskAccess, - DiskEncryptionSet, - DiskEncryptionSetParameters, - DiskEncryptionSettings, - DiskImageEncryption, - DiskInstanceView, - DiskSecurityProfile, - DiskSku, - Encryption, - EncryptionImages, - EncryptionSetIdentity, - EncryptionSettingsCollection, - EncryptionSettingsElement, - ExtendedLocation, - Extension, - Gallery, - GalleryApplication, - GalleryApplicationUpdate, - GalleryApplicationVersion, - GalleryApplicationVersionPublishingProfile, - GalleryApplicationVersionUpdate, - GalleryArtifactPublishingProfileBase, - GalleryArtifactVersionSource, - GalleryDataDiskImage, - GalleryDiskImage, - GalleryIdentifier, - GalleryImage, - GalleryImageFeature, - GalleryImageIdentifier, - GalleryImageUpdate, - GalleryImageVersion, - GalleryImageVersionPublishingProfile, - GalleryImageVersionStorageProfile, - GalleryImageVersionUpdate, - GalleryOSDiskImage, - GalleryUpdate, - HardwareProfile, - Image, - ImageDataDisk, - ImageDisk, - ImageDiskReference, - ImageOSDisk, - ImagePurchasePlan, - ImageReference, - ImageStorageProfile, - ImageUpdate, - InnerError, - InstanceViewStatus, - KeyForDiskEncryptionSet, - KeyVaultAndKeyReference, - KeyVaultAndSecretReference, - KeyVaultKeyReference, - KeyVaultSecretReference, - LastPatchInstallationSummary, - LinuxConfiguration, - LinuxParameters, - LinuxPatchSettings, - LoadBalancerConfiguration, - LoadBalancerConfigurationProperties, - LoadBalancerFrontendIPConfiguration, - LoadBalancerFrontendIPConfigurationProperties, - MaintenanceRedeployStatus, - ManagedDiskParameters, - NetworkInterfaceReference, - NetworkProfile, - OSDisk, - OSDiskImage, - OSDiskImageEncryption, - OSProfile, - PatchInstallationDetail, - PatchSettings, - Plan, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateLinkServiceConnectionState, - PropertyUpdatesInProgress, - ProximityPlacementGroup, - ProximityPlacementGroupUpdate, - ProxyResource, - PublicIPAddressSku, - PurchasePlan, - RecommendedMachineConfiguration, - RegionalReplicationStatus, - ReplicationStatus, - Resource, - ResourceRange, - RestorePoint, - RestorePointCollection, - RestorePointCollectionSourceProperties, - RestorePointCollectionUpdate, - RestorePointProvisioningDetails, - RestorePointSourceMetadata, - RestorePointSourceVMDataDisk, - RestorePointSourceVMOSDisk, - RestorePointSourceVMStorageProfile, - RetrieveBootDiagnosticsDataResult, - RollingUpgradePolicy, - RollingUpgradeProgressInfo, - RollingUpgradeRunningStatus, - RollingUpgradeStatusInfo, - RunCommandInput, - RunCommandInputParameter, - RunCommandResult, - ScaleInPolicy, - ScheduledEventsProfile, - SecurityProfile, - ShareInfoElement, - SharingProfile, - SharingProfileGroup, - SharingUpdate, - Sku, - Snapshot, - SnapshotSku, - SourceVault, - SshConfiguration, - SshPublicKey, - SshPublicKeyResource, - SshPublicKeyUpdateResource, - StorageProfile, - SubResource, - SubResourceReadOnly, - SubResourceWithColocationStatus, - TargetRegion, - TerminateNotificationProfile, - UefiSettings, - UpdateResource, - UpdateResourceDefinition, - UpgradePolicy, - UserArtifactManage, - UserArtifactSource, - VaultCertificate, - VaultSecretGroup, - VirtualHardDisk, - VirtualMachine, - VirtualMachineAgentInstanceView, - VirtualMachineAssessPatchesResult, - VirtualMachineCaptureParameters, - VirtualMachineCaptureResult, - VirtualMachineExtension, - VirtualMachineExtensionHandlerInstanceView, - VirtualMachineExtensionImage, - VirtualMachineExtensionInstanceView, - VirtualMachineExtensionUpdate, - VirtualMachineHealthStatus, - VirtualMachineIdentity, - VirtualMachineIdentityUserAssignedIdentitiesValue, - VirtualMachineImage, - VirtualMachineImageFeature, - VirtualMachineImageResource, - VirtualMachineInstallPatchesParameters, - VirtualMachineInstallPatchesResult, - VirtualMachineInstanceView, - VirtualMachineIpTag, - VirtualMachineListResult, - VirtualMachineNetworkInterfaceConfiguration, - VirtualMachineNetworkInterfaceDnsSettingsConfiguration, - VirtualMachineNetworkInterfaceIPConfiguration, - VirtualMachinePatchStatus, - VirtualMachinePublicIPAddressConfiguration, - VirtualMachinePublicIPAddressDnsSettingsConfiguration, - VirtualMachineReimageParameters, - VirtualMachineRunCommand, - VirtualMachineRunCommandInstanceView, - VirtualMachineRunCommandScriptSource, - VirtualMachineRunCommandUpdate, - VirtualMachineScaleSet, - VirtualMachineScaleSetDataDisk, - VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProfile, - VirtualMachineScaleSetExtensionUpdate, - VirtualMachineScaleSetIdentity, - VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue, - VirtualMachineScaleSetIPConfiguration, - VirtualMachineScaleSetIpTag, - VirtualMachineScaleSetManagedDiskParameters, - VirtualMachineScaleSetNetworkConfiguration, - VirtualMachineScaleSetNetworkConfigurationDnsSettings, - VirtualMachineScaleSetNetworkProfile, - VirtualMachineScaleSetOSDisk, - VirtualMachineScaleSetOSProfile, - VirtualMachineScaleSetPublicIPAddressConfiguration, - VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings, - VirtualMachineScaleSetReimageParameters, - VirtualMachineScaleSetStorageProfile, - VirtualMachineScaleSetUpdate, - VirtualMachineScaleSetUpdateIPConfiguration, - VirtualMachineScaleSetUpdateNetworkConfiguration, - VirtualMachineScaleSetUpdateNetworkProfile, - VirtualMachineScaleSetUpdateOSDisk, - VirtualMachineScaleSetUpdateOSProfile, - VirtualMachineScaleSetUpdatePublicIPAddressConfiguration, - VirtualMachineScaleSetUpdateStorageProfile, - VirtualMachineScaleSetUpdateVMProfile, - VirtualMachineScaleSetVM, - VirtualMachineScaleSetVMExtension, - VirtualMachineScaleSetVMExtensionUpdate, - VirtualMachineScaleSetVMInstanceView, - VirtualMachineScaleSetVMNetworkProfileConfiguration, - VirtualMachineScaleSetVMProfile, - VirtualMachineScaleSetVMProtectionPolicy, - VirtualMachineScaleSetVMReimageParameters, - VirtualMachineSize, - VirtualMachineSizeListResult, - VirtualMachineSoftwarePatchProperties, - VirtualMachineUpdate, - WindowsConfiguration, - WindowsParameters, - WinRMConfiguration, - WinRMListener -} from "../models/mappers"; diff --git a/sdk/compute/arm-compute/src/operations/availabilitySets.ts b/sdk/compute/arm-compute/src/operations/availabilitySets.ts index 9f7df2e368c4..bee7def60b68 100644 --- a/sdk/compute/arm-compute/src/operations/availabilitySets.ts +++ b/sdk/compute/arm-compute/src/operations/availabilitySets.ts @@ -3,214 +3,303 @@ * 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/availabilitySetsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AvailabilitySets } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + AvailabilitySet, + AvailabilitySetsListBySubscriptionNextOptionalParams, + AvailabilitySetsListBySubscriptionOptionalParams, + AvailabilitySetsListNextOptionalParams, + AvailabilitySetsListOptionalParams, + VirtualMachineSize, + AvailabilitySetsListAvailableSizesOptionalParams, + AvailabilitySetsCreateOrUpdateOptionalParams, + AvailabilitySetsCreateOrUpdateResponse, + AvailabilitySetUpdate, + AvailabilitySetsUpdateOptionalParams, + AvailabilitySetsUpdateResponse, + AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsGetOptionalParams, + AvailabilitySetsGetResponse, + AvailabilitySetsListBySubscriptionResponse, + AvailabilitySetsListResponse, + AvailabilitySetsListAvailableSizesResponse, + AvailabilitySetsListBySubscriptionNextResponse, + AvailabilitySetsListNextResponse +} from "../models"; +/// /** Class representing a AvailabilitySets. */ -export class AvailabilitySets { +export class AvailabilitySetsImpl implements AvailabilitySets { private readonly client: ComputeManagementClientContext; /** - * Create a AvailabilitySets. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class AvailabilitySets class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update an availability set. - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param parameters Parameters supplied to the Create Availability Set operation. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySet, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param parameters Parameters supplied to the Create Availability Set operation. - * @param callback The callback + * Lists all availability sets in a subscription. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySet, callback: msRest.ServiceCallback): void; + public listBySubscription( + options?: AvailabilitySetsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: AvailabilitySetsListBySubscriptionOptionalParams + ): 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?: AvailabilitySetsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** + * Lists all availability sets in a resource group. * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param parameters Parameters supplied to the Create Availability Set operation. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySet, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySet, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public list( + resourceGroupName: string, + options?: AvailabilitySetsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: AvailabilitySetsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( resourceGroupName, - availabilitySetName, - parameters, + continuationToken, options - }, - createOrUpdateOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: AvailabilitySetsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } } /** - * Update an availability set. + * Lists all available virtual machine sizes that can be used to create a new virtual machine in an + * existing availability set. * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. - * @param parameters Parameters supplied to the Update Availability Set operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySetUpdate, options?: msRest.RequestOptionsBase): Promise; + public listAvailableSizes( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsListAvailableSizesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAvailableSizesPagingAll( + resourceGroupName, + availabilitySetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAvailableSizesPagingPage( + resourceGroupName, + availabilitySetName, + options + ); + } + }; + } + + private async *listAvailableSizesPagingPage( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsListAvailableSizesOptionalParams + ): AsyncIterableIterator { + let result = await this._listAvailableSizes( + resourceGroupName, + availabilitySetName, + options + ); + yield result.value || []; + } + + private async *listAvailableSizesPagingAll( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsListAvailableSizesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAvailableSizesPagingPage( + resourceGroupName, + availabilitySetName, + options + )) { + yield* page; + } + } + /** + * Create or update an availability set. * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. - * @param parameters Parameters supplied to the Update Availability Set operation. - * @param callback The callback + * @param parameters Parameters supplied to the Create Availability Set operation. + * @param options The options parameters. */ - update(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySetUpdate, callback: msRest.ServiceCallback): void; + createOrUpdate( + resourceGroupName: string, + availabilitySetName: string, + parameters: AvailabilitySet, + options?: AvailabilitySetsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, availabilitySetName, parameters, options }, + createOrUpdateOperationSpec + ); + } + /** + * Update an availability set. * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. * @param parameters Parameters supplied to the Update Availability Set operation. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - update(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySetUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, availabilitySetName: string, parameters: Models.AvailabilitySetUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + availabilitySetName: string, + parameters: AvailabilitySetUpdate, + options?: AvailabilitySetsUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - availabilitySetName, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, availabilitySetName, parameters, options }, + updateOperationSpec + ); } /** * Delete an availability set. * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, availabilitySetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, availabilitySetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, availabilitySetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, availabilitySetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - availabilitySetName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, availabilitySetName, options }, + deleteOperationSpec + ); } /** * Retrieves information about an availability set. * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, availabilitySetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param callback The callback - */ - get(resourceGroupName: string, availabilitySetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, availabilitySetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, availabilitySetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - availabilitySetName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, availabilitySetName, options }, + getOperationSpec + ); } /** * Lists all availability sets in a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.AvailabilitySetsListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listBySubscription(options: Models.AvailabilitySetsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.AvailabilitySetsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscription( + options?: AvailabilitySetsListBySubscriptionOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; + { options }, + listBySubscriptionOperationSpec + ); } /** * Lists all availability sets in a resource group. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - list(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + resourceGroupName: string, + options?: AvailabilitySetsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listOperationSpec, - callback) as Promise; + { resourceGroupName, options }, + listOperationSpec + ); } /** @@ -218,324 +307,212 @@ export class AvailabilitySets { * existing availability set. * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listAvailableSizes(resourceGroupName: string, availabilitySetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param callback The callback - */ - listAvailableSizes(resourceGroupName: string, availabilitySetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param availabilitySetName The name of the availability set. - * @param options The optional parameters - * @param callback The callback - */ - listAvailableSizes(resourceGroupName: string, availabilitySetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSizes(resourceGroupName: string, availabilitySetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listAvailableSizes( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsListAvailableSizesOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - availabilitySetName, - options - }, - listAvailableSizesOperationSpec, - callback) as Promise; + { resourceGroupName, availabilitySetName, options }, + listAvailableSizesOperationSpec + ); } /** - * Lists all availability sets in a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: Models.AvailabilitySetsListBySubscriptionNextOptionalParams): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(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. */ - listBySubscriptionNext(nextPageLink: string, options: Models.AvailabilitySetsListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: Models.AvailabilitySetsListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: AvailabilitySetsListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } /** - * Lists all availability sets in a resource group. - * @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 resourceGroupName The name of the resource group. + * @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( + resourceGroupName: string, + nextLink: string, + options?: AvailabilitySetsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.availabilitySetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AvailabilitySet, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.AvailabilitySet - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.availabilitySetName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AvailabilitySetUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.AvailabilitySet - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.availabilitySetName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.availabilitySetName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AvailabilitySet - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.availabilitySetName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.expand0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AvailabilitySetListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.AvailabilitySetListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listAvailableSizesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.availabilitySetName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const listAvailableSizesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineSizeListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.availabilitySetName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.expand0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AvailabilitySetListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AvailabilitySetListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/cloudServiceOperatingSystems.ts b/sdk/compute/arm-compute/src/operations/cloudServiceOperatingSystems.ts index b3911192d099..8d2343ef09ec 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServiceOperatingSystems.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServiceOperatingSystems.ts @@ -3,123 +3,184 @@ * 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/cloudServiceOperatingSystemsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { CloudServiceOperatingSystems } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + OSVersion, + CloudServiceOperatingSystemsListOSVersionsNextOptionalParams, + CloudServiceOperatingSystemsListOSVersionsOptionalParams, + OSFamily, + CloudServiceOperatingSystemsListOSFamiliesNextOptionalParams, + CloudServiceOperatingSystemsListOSFamiliesOptionalParams, + CloudServiceOperatingSystemsGetOSVersionOptionalParams, + CloudServiceOperatingSystemsGetOSVersionResponse, + CloudServiceOperatingSystemsListOSVersionsResponse, + CloudServiceOperatingSystemsGetOSFamilyOptionalParams, + CloudServiceOperatingSystemsGetOSFamilyResponse, + CloudServiceOperatingSystemsListOSFamiliesResponse, + CloudServiceOperatingSystemsListOSVersionsNextResponse, + CloudServiceOperatingSystemsListOSFamiliesNextResponse +} from "../models"; +/// /** Class representing a CloudServiceOperatingSystems. */ -export class CloudServiceOperatingSystems { +export class CloudServiceOperatingSystemsImpl + implements CloudServiceOperatingSystems { private readonly client: ComputeManagementClientContext; /** - * Create a CloudServiceOperatingSystems. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class CloudServiceOperatingSystems class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Gets properties of a guest operating system version that can be specified in the XML service - * configuration (.cscfg) for a cloud service. - * @param location Name of the location that the OS version pertains to. - * @param osVersionName Name of the OS version. - * @param [options] The optional parameters - * @returns Promise + * Gets a list of all guest operating system versions available to be specified in the XML service + * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next + * page of OS versions. Do this till nextLink is null to fetch all the OS versions. + * @param location Name of the location that the OS versions pertain to. + * @param options The options parameters. */ - getOSVersion( + public listOSVersions( location: string, - osVersionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: CloudServiceOperatingSystemsListOSVersionsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listOSVersionsPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listOSVersionsPagingPage(location, options); + } + }; + } + + private async *listOSVersionsPagingPage( + location: string, + options?: CloudServiceOperatingSystemsListOSVersionsOptionalParams + ): AsyncIterableIterator { + let result = await this._listOSVersions(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listOSVersionsNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listOSVersionsPagingAll( + location: string, + options?: CloudServiceOperatingSystemsListOSVersionsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listOSVersionsPagingPage(location, options)) { + yield* page; + } + } + /** - * @param location Name of the location that the OS version pertains to. - * @param osVersionName Name of the OS version. - * @param callback The callback + * Gets a list of all guest operating system families available to be specified in the XML service + * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next + * page of OS Families. Do this till nextLink is null to fetch all the OS Families. + * @param location Name of the location that the OS families pertain to. + * @param options The options parameters. */ - getOSVersion( + public listOSFamilies( location: string, - osVersionName: string, - callback: msRest.ServiceCallback - ): void; + options?: CloudServiceOperatingSystemsListOSFamiliesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listOSFamiliesPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listOSFamiliesPagingPage(location, options); + } + }; + } + + private async *listOSFamiliesPagingPage( + location: string, + options?: CloudServiceOperatingSystemsListOSFamiliesOptionalParams + ): AsyncIterableIterator { + let result = await this._listOSFamilies(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listOSFamiliesNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listOSFamiliesPagingAll( + location: string, + options?: CloudServiceOperatingSystemsListOSFamiliesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listOSFamiliesPagingPage(location, options)) { + yield* page; + } + } + /** + * Gets properties of a guest operating system version that can be specified in the XML service + * configuration (.cscfg) for a cloud service. * @param location Name of the location that the OS version pertains to. * @param osVersionName Name of the OS version. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ getOSVersion( location: string, osVersionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getOSVersion( - location: string, - osVersionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceOperatingSystemsGetOSVersionOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - osVersionName, - options - }, - getOSVersionOperationSpec, - callback - ) as Promise; + { location, osVersionName, options }, + getOSVersionOperationSpec + ); } /** * Gets a list of all guest operating system versions available to be specified in the XML service - * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the - * next page of OS versions. Do this till nextLink is null to fetch all the OS versions. + * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next + * page of OS versions. Do this till nextLink is null to fetch all the OS versions. * @param location Name of the location that the OS versions pertain to. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listOSVersions( + private _listOSVersions( location: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param location Name of the location that the OS versions pertain to. - * @param callback The callback - */ - listOSVersions( - location: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param location Name of the location that the OS versions pertain to. - * @param options The optional parameters - * @param callback The callback - */ - listOSVersions( - location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listOSVersions( - location: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceOperatingSystemsListOSVersionsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listOSVersionsOperationSpec, - callback - ) as Promise; + { location, options }, + listOSVersionsOperationSpec + ); } /** @@ -127,198 +188,77 @@ export class CloudServiceOperatingSystems { * configuration (.cscfg) for a cloud service. * @param location Name of the location that the OS family pertains to. * @param osFamilyName Name of the OS family. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ getOSFamily( location: string, osFamilyName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param location Name of the location that the OS family pertains to. - * @param osFamilyName Name of the OS family. - * @param callback The callback - */ - getOSFamily( - location: string, - osFamilyName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param location Name of the location that the OS family pertains to. - * @param osFamilyName Name of the OS family. - * @param options The optional parameters - * @param callback The callback - */ - getOSFamily( - location: string, - osFamilyName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getOSFamily( - location: string, - osFamilyName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceOperatingSystemsGetOSFamilyOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - osFamilyName, - options - }, - getOSFamilyOperationSpec, - callback - ) as Promise; + { location, osFamilyName, options }, + getOSFamilyOperationSpec + ); } /** * Gets a list of all guest operating system families available to be specified in the XML service - * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the - * next page of OS Families. Do this till nextLink is null to fetch all the OS Families. + * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next + * page of OS Families. Do this till nextLink is null to fetch all the OS Families. * @param location Name of the location that the OS families pertain to. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listOSFamilies( + private _listOSFamilies( location: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param location Name of the location that the OS families pertain to. - * @param callback The callback - */ - listOSFamilies( - location: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param location Name of the location that the OS families pertain to. - * @param options The optional parameters - * @param callback The callback - */ - listOSFamilies( - location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listOSFamilies( - location: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceOperatingSystemsListOSFamiliesOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listOSFamiliesOperationSpec, - callback - ) as Promise; + { location, options }, + listOSFamiliesOperationSpec + ); } /** - * Gets a list of all guest operating system versions available to be specified in the XML service - * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the - * next page of OS versions. Do this till nextLink is null to fetch all the OS versions. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listOSVersionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listOSVersionsNext( - 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 + * ListOSVersionsNext + * @param location Name of the location that the OS versions pertain to. + * @param nextLink The nextLink from the previous successful call to the ListOSVersions method. + * @param options The options parameters. */ - listOSVersionsNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listOSVersionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listOSVersionsNext( + location: string, + nextLink: string, + options?: CloudServiceOperatingSystemsListOSVersionsNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listOSVersionsNextOperationSpec, - callback - ) as Promise; + { location, nextLink, options }, + listOSVersionsNextOperationSpec + ); } /** - * Gets a list of all guest operating system families available to be specified in the XML service - * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the - * next page of OS Families. Do this till nextLink is null to fetch all the OS Families. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listOSFamiliesNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listOSFamiliesNext( - 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 + * ListOSFamiliesNext + * @param location Name of the location that the OS families pertain to. + * @param nextLink The nextLink from the previous successful call to the ListOSFamilies method. + * @param options The options parameters. */ - listOSFamiliesNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listOSFamiliesNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listOSFamiliesNext( + location: string, + nextLink: string, + options?: CloudServiceOperatingSystemsListOSFamiliesNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listOSFamiliesNextOperationSpec, - callback - ) as Promise; + { location, nextLink, options }, + listOSFamiliesNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOSVersionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOSVersionOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", - urlParameters: [Parameters.location0, Parameters.osVersionName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OSVersion @@ -327,16 +267,20 @@ const getOSVersionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.osVersionName + ], + headerParameters: [Parameters.accept], serializer }; - -const listOSVersionsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const listOSVersionsOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions", - urlParameters: [Parameters.location0, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OSVersionListResult @@ -345,16 +289,19 @@ const listOSVersionsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; - -const getOSFamilyOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const getOSFamilyOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", - urlParameters: [Parameters.location0, Parameters.osFamilyName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OSFamily @@ -363,16 +310,20 @@ const getOSFamilyOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.osFamilyName + ], + headerParameters: [Parameters.accept], serializer }; - -const listOSFamiliesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const listOSFamiliesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies", - urlParameters: [Parameters.location0, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OSFamilyListResult @@ -381,16 +332,18 @@ const listOSFamiliesOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; - -const listOSVersionsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listOSVersionsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OSVersionListResult @@ -399,16 +352,19 @@ const listOSVersionsNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; - -const listOSFamiliesNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listOSFamiliesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OSFamilyListResult @@ -417,5 +373,13 @@ const listOSFamiliesNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts b/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts index baea34465d69..e17cb8ef4f4b 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServiceRoleInstances.ts @@ -3,705 +3,740 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/cloudServiceRoleInstancesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { CloudServiceRoleInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + RoleInstance, + CloudServiceRoleInstancesListNextOptionalParams, + CloudServiceRoleInstancesListOptionalParams, + CloudServiceRoleInstancesDeleteOptionalParams, + CloudServiceRoleInstancesGetOptionalParams, + CloudServiceRoleInstancesGetResponse, + CloudServiceRoleInstancesGetInstanceViewOptionalParams, + CloudServiceRoleInstancesGetInstanceViewResponse, + CloudServiceRoleInstancesListResponse, + CloudServiceRoleInstancesRestartOptionalParams, + CloudServiceRoleInstancesReimageOptionalParams, + CloudServiceRoleInstancesRebuildOptionalParams, + CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams, + CloudServiceRoleInstancesGetRemoteDesktopFileResponse, + CloudServiceRoleInstancesListNextResponse +} from "../models"; +/// /** Class representing a CloudServiceRoleInstances. */ -export class CloudServiceRoleInstances { +export class CloudServiceRoleInstancesImpl + implements CloudServiceRoleInstances { private readonly client: ComputeManagementClientContext; /** - * Create a CloudServiceRoleInstances. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class CloudServiceRoleInstances class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Deletes a role instance from a cloud service. - * @param roleInstanceName Name of the role instance. + * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get + * the next page of role instances. Do this till nextLink is null to fetch all the role instances. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod( - roleInstanceName: string, + public list( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( - roleInstanceName, + options?: CloudServiceRoleInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( resourceGroupName, cloudServiceName, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + cloudServiceName, + options + ); + } + }; } - /** - * Gets a role instance from a cloud service. - * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise - */ - get( - roleInstanceName: string, + private async *listPagingPage( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServiceRoleInstancesGetOptionalParams - ): Promise; - /** - * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName - * @param callback The callback - */ - get( - roleInstanceName: string, + options?: CloudServiceRoleInstancesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, cloudServiceName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + cloudServiceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( resourceGroupName: string, cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; + options?: CloudServiceRoleInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + cloudServiceName, + options + )) { + yield* page; + } + } + /** + * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get( - roleInstanceName: string, - resourceGroupName: string, - cloudServiceName: string, - options: Models.CloudServiceRoleInstancesGetOptionalParams, - callback: msRest.ServiceCallback - ): void; - get( + async beginDelete( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: - | Models.CloudServiceRoleInstancesGetOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - getOperationSpec, - callback - ) as Promise; + options?: CloudServiceRoleInstancesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Retrieves information about the run-time state of a role instance in a cloud service. + * Deletes a role instance from a cloud service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - getInstanceView( + async beginDeleteAndWait( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: CloudServiceRoleInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + roleInstanceName, + resourceGroupName, + cloudServiceName, + options + ); + return poller.pollUntilDone(); + } + /** + * Gets a role instance from a cloud service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param callback The callback + * @param options The options parameters. */ - getInstanceView( + get( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; + options?: CloudServiceRoleInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + getOperationSpec + ); + } + /** + * Retrieves information about the run-time state of a role instance in a cloud service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ getInstanceView( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getInstanceView( - roleInstanceName: string, - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceRoleInstancesGetInstanceViewOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - getInstanceViewOperationSpec, - callback - ) as Promise; + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + getInstanceViewOperationSpec + ); } /** - * Gets the list of all role instances in a cloud service. Use nextLink property in the response to - * get the next page of role instances. Do this till nextLink is null to fetch all the role - * instances. - * @param resourceGroupName - * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise - */ - list( - resourceGroupName: string, - cloudServiceName: string, - options?: Models.CloudServiceRoleInstancesListOptionalParams - ): Promise; - /** + * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get + * the next page of role instances. Do this till nextLink is null to fetch all the role instances. * @param resourceGroupName * @param cloudServiceName - * @param callback The callback + * @param options The options parameters. */ - list( + private _list( resourceGroupName: string, cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName - * @param cloudServiceName - * @param options The optional parameters - * @param callback The callback - */ - list( - resourceGroupName: string, - cloudServiceName: string, - options: Models.CloudServiceRoleInstancesListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - cloudServiceName: string, - options?: - | Models.CloudServiceRoleInstancesListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceRoleInstancesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - options - }, - listOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, options }, + listOperationSpec + ); } /** - * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the - * cloud service. + * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud + * service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - restart( + async beginRestart( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRestart( - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + options?: CloudServiceRoleInstancesRestartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + restartOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of - * web roles or worker roles. + * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud + * service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - reimage( + async beginRestartAndWait( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginReimage( + options?: CloudServiceRoleInstancesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( roleInstanceName, resourceGroupName, cloudServiceName, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of - * web roles or worker roles and initializes the storage resources that are used by them. If you do - * not want to initialize storage resources, you can use Reimage Role Instance. + * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - rebuild( + async beginReimage( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRebuild( - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + options?: CloudServiceRoleInstancesReimageOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + reimageOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets a remote desktop file for a role instance in a cloud service. + * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - getRemoteDesktopFile( - roleInstanceName: string, - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName - * @param callback The callback - */ - getRemoteDesktopFile( - roleInstanceName: string, - resourceGroupName: string, - cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param roleInstanceName Name of the role instance. - * @param resourceGroupName - * @param cloudServiceName - * @param options The optional parameters - * @param callback The callback - */ - getRemoteDesktopFile( + async beginReimageAndWait( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getRemoteDesktopFile( - roleInstanceName: string, - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - getRemoteDesktopFileOperationSpec, - callback - ) as Promise; + options?: CloudServiceRoleInstancesReimageOptionalParams + ): Promise { + const poller = await this.beginReimage( + roleInstanceName, + resourceGroupName, + cloudServiceName, + options + ); + return poller.pollUntilDone(); } /** - * Deletes a role instance from a cloud service. + * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles and initializes the storage resources that are used by them. If you do not + * want to initialize storage resources, you can use Reimage Role Instance. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginRebuild( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - beginDeleteMethodOperationSpec, - options + options?: CloudServiceRoleInstancesRebuildOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + rebuildOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the - * cloud service. + * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles and initializes the storage resources that are used by them. If you do not + * want to initialize storage resources, you can use Reimage Role Instance. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRestart( + async beginRebuildAndWait( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - beginRestartOperationSpec, + options?: CloudServiceRoleInstancesRebuildOptionalParams + ): Promise { + const poller = await this.beginRebuild( + roleInstanceName, + resourceGroupName, + cloudServiceName, options ); + return poller.pollUntilDone(); } /** - * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of - * web roles or worker roles. + * Gets a remote desktop file for a role instance in a cloud service. * @param roleInstanceName Name of the role instance. * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginReimage( + getRemoteDesktopFile( roleInstanceName: string, resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - beginReimageOperationSpec, - options + options?: CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { roleInstanceName, resourceGroupName, cloudServiceName, options }, + getRemoteDesktopFileOperationSpec ); } /** - * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of - * web roles or worker roles and initializes the storage resources that are used by them. If you do - * not want to initialize storage resources, you can use Reimage Role Instance. - * @param roleInstanceName Name of the role instance. + * ListNext * @param resourceGroupName * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - beginRebuild( - roleInstanceName: string, + private _listNext( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - roleInstanceName, - resourceGroupName, - cloudServiceName, - options - }, - beginRebuildOperationSpec, - options - ); - } - - /** - * Gets the list of all role instances in a cloud service. Use nextLink property in the response to - * get the next page of role instances. Do this till nextLink is null to fetch all the role - * instances. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: Models.CloudServiceRoleInstancesListNextOptionalParams - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext( - nextPageLink: string, - options: Models.CloudServiceRoleInstancesListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.CloudServiceRoleInstancesListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + nextLink: string, + options?: CloudServiceRoleInstancesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", - urlParameters: [ - Parameters.roleInstanceName, - Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.apiVersion0, Parameters.expand1], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.RoleInstance - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getInstanceViewOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.roleInstanceName, + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.RoleInstanceInstanceView + bodyMapper: Mappers.RoleInstance }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances", + queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0, Parameters.expand1], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const getInstanceViewOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.RoleInstanceListResult + bodyMapper: Mappers.RoleInstanceView }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getRemoteDesktopFileOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.roleInstanceName, + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances", + httpMethod: "GET", responses: { 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Stream" - } - } + bodyMapper: Mappers.RoleInstanceListResult }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", + queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ - Parameters.roleInstanceName, + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginRestartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.roleInstanceName, + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const reimageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginReimageOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.roleInstanceName, + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const rebuildOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginRebuildOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const getRemoteDesktopFileOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" } + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.roleInstanceName, + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.roleInstanceName, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept2], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.expand1], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RoleInstanceListResult @@ -710,5 +745,14 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts b/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts index 73eca8bd4d83..3dd83e1245b0 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServiceRoles.ts @@ -3,198 +3,170 @@ * 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/cloudServiceRolesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { CloudServiceRoles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + CloudServiceRole, + CloudServiceRolesListNextOptionalParams, + CloudServiceRolesListOptionalParams, + CloudServiceRolesGetOptionalParams, + CloudServiceRolesGetResponse, + CloudServiceRolesListResponse, + CloudServiceRolesListNextResponse +} from "../models"; +/// /** Class representing a CloudServiceRoles. */ -export class CloudServiceRoles { +export class CloudServiceRolesImpl implements CloudServiceRoles { private readonly client: ComputeManagementClientContext; /** - * Create a CloudServiceRoles. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class CloudServiceRoles class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Gets a role from a cloud service. - * @param roleName Name of the role. - * @param resourceGroupName - * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise - */ - get( - roleName: string, - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param roleName Name of the role. + * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next + * page of roles. Do this till nextLink is null to fetch all the roles. * @param resourceGroupName * @param cloudServiceName - * @param callback The callback + * @param options The options parameters. */ - get( - roleName: string, - resourceGroupName: string, - cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param roleName Name of the role. - * @param resourceGroupName - * @param cloudServiceName - * @param options The optional parameters - * @param callback The callback - */ - get( - roleName: string, + public list( resourceGroupName: string, cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - roleName: string, + options?: CloudServiceRolesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + cloudServiceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + cloudServiceName, + options + ); + } + }; + } + + private async *listPagingPage( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - roleName, + options?: CloudServiceRolesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, cloudServiceName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( resourceGroupName, cloudServiceName, + continuationToken, options - }, - getOperationSpec, - callback - ) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the - * next page of roles. Do this till nextLink is null to fetch all the roles. - * @param resourceGroupName - * @param cloudServiceName - * @param [options] The optional parameters - * @returns Promise - */ - list( + private async *listPagingAll( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: CloudServiceRolesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + cloudServiceName, + options + )) { + yield* page; + } + } + /** + * Gets a role from a cloud service. + * @param roleName Name of the role. * @param resourceGroupName * @param cloudServiceName - * @param callback The callback + * @param options The options parameters. */ - list( + get( + roleName: string, resourceGroupName: string, cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; + options?: CloudServiceRolesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { roleName, resourceGroupName, cloudServiceName, options }, + getOperationSpec + ); + } + /** + * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next + * page of roles. Do this till nextLink is null to fetch all the roles. * @param resourceGroupName * @param cloudServiceName - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list( - resourceGroupName: string, - cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( + private _list( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServiceRolesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - options - }, - listOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, options }, + listOperationSpec + ); } /** - * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the - * next page of roles. Do this till nextLink is null to fetch all the roles. - * @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 resourceGroupName + * @param cloudServiceName + * @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( + resourceGroupName: string, + cloudServiceName: string, + nextLink: string, + options?: CloudServiceRolesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}", - urlParameters: [ - Parameters.roleName, - Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceRole @@ -203,20 +175,21 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.roleName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceRoleListResult @@ -225,16 +198,19 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceRoleListResult @@ -243,5 +219,14 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/cloudServices.ts b/sdk/compute/arm-compute/src/operations/cloudServices.ts index f126fbe8fc33..db6d8c48c2e6 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServices.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServices.ts @@ -3,983 +3,1284 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/cloudServicesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { CloudServices } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + CloudService, + CloudServicesListAllNextOptionalParams, + CloudServicesListAllOptionalParams, + CloudServicesListNextOptionalParams, + CloudServicesListOptionalParams, + CloudServicesCreateOrUpdateOptionalParams, + CloudServicesCreateOrUpdateResponse, + CloudServicesUpdateOptionalParams, + CloudServicesUpdateResponse, + CloudServicesDeleteOptionalParams, + CloudServicesGetOptionalParams, + CloudServicesGetResponse, + CloudServicesGetInstanceViewOptionalParams, + CloudServicesGetInstanceViewResponse, + CloudServicesListAllResponse, + CloudServicesListResponse, + CloudServicesStartOptionalParams, + CloudServicesPowerOffOptionalParams, + CloudServicesRestartOptionalParams, + CloudServicesReimageOptionalParams, + CloudServicesRebuildOptionalParams, + CloudServicesDeleteInstancesOptionalParams, + CloudServicesListAllNextResponse, + CloudServicesListNextResponse +} from "../models"; +/// /** Class representing a CloudServices. */ -export class CloudServices { +export class CloudServicesImpl implements CloudServices { private readonly client: ComputeManagementClientContext; /** - * Create a CloudServices. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class CloudServices class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a cloud service. Please note some properties can be set only during cloud - * service creation. + * Gets a list of all cloud services in the subscription, regardless of the associated resource group. + * Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink + * is null to fetch all the Cloud Services. + * @param options The options parameters. + */ + public listAll( + options?: CloudServicesListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAllPagingPage(options); + } + }; + } + + private async *listAllPagingPage( + options?: CloudServicesListAllOptionalParams + ): AsyncIterableIterator { + let result = await this._listAll(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listAllPagingAll( + options?: CloudServicesListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of all cloud services under a resource group. Use nextLink property in the response to + * get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. * @param resourceGroupName Name of the resource group. - * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + public list( resourceGroupName: string, - cloudServiceName: string, - options?: Models.CloudServicesCreateOrUpdateOptionalParams - ): Promise { - return this.beginCreateOrUpdate( - resourceGroupName, - cloudServiceName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.CloudServicesCreateOrUpdateResponse - >; + options?: CloudServicesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: CloudServicesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: CloudServicesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } } /** - * Update a cloud service. + * Create or update a cloud service. Please note some properties can be set only during cloud service + * creation. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update( + async beginCreateOrUpdate( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesUpdateOptionalParams - ): Promise { - return this.beginUpdate(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + options?: CloudServicesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CloudServicesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a cloud service. + * Create or update a cloud service. Please note some properties can be set only during cloud service + * creation. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod( + async beginCreateOrUpdateAndWait( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: CloudServicesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + cloudServiceName, + options ); + return poller.pollUntilDone(); } /** - * Display information about a cloud service. + * Update a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get( + async beginUpdate( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: CloudServicesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CloudServicesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Update a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param callback The callback + * @param options The options parameters. */ - get( + async beginUpdateAndWait( resourceGroupName: string, cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; + options?: CloudServicesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + cloudServiceName, + options + ); + return poller.pollUntilDone(); + } + /** + * Deletes a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get( - resourceGroupName: string, - cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( + async beginDelete( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - options - }, - getOperationSpec, - callback - ) as Promise; + options?: CloudServicesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets the status of a cloud service. + * Deletes a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - getInstanceView( + async beginDeleteAndWait( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: CloudServicesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + cloudServiceName, + options + ); + return poller.pollUntilDone(); + } + /** + * Display information about a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param callback The callback + * @param options The options parameters. */ - getInstanceView( + get( resourceGroupName: string, cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; + options?: CloudServicesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, cloudServiceName, options }, + getOperationSpec + ); + } + /** + * Gets the status of a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ getInstanceView( resourceGroupName: string, cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getInstanceView( - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServicesGetInstanceViewOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - options - }, - getInstanceViewOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, options }, + getInstanceViewOperationSpec + ); } /** - * Gets a list of all cloud services in the subscription, regardless of the associated resource - * group. Use nextLink property in the response to get the next page of Cloud Services. Do this - * till nextLink is null to fetch all the Cloud Services. - * @param [options] The optional parameters - * @returns Promise - */ - listAll(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listAll(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * Gets a list of all cloud services in the subscription, regardless of the associated resource group. + * Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink + * is null to fetch all the Cloud Services. + * @param options The options parameters. */ - listAll( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAll( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listAllOperationSpec, - callback - ) as Promise; + private _listAll( + options?: CloudServicesListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); } /** - * Gets a list of all cloud services under a resource group. Use nextLink property in the response - * to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud - * Services. - * @param resourceGroupName Name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - list( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName Name of the resource group. - * @param callback The callback - */ - list( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Gets a list of all cloud services under a resource group. Use nextLink property in the response to + * get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. * @param resourceGroupName Name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( + private _list( resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServicesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listOperationSpec, - callback - ) as Promise; + { resourceGroupName, options }, + listOperationSpec + ); } /** * Starts the cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - start( + async beginStart( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginStart(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); - } + options?: CloudServicesStartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Power off the cloud service. Note that resources are still attached and you are getting charged - * for the resources. - * @param resourceGroupName Name of the resource group. - * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise - */ - powerOff( - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginPowerOff(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + startOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Restarts one or more role instances in a cloud service. + * Starts the cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - restart( + async beginStartAndWait( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesRestartOptionalParams - ): Promise { - return this.beginRestart(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: CloudServicesStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + cloudServiceName, + options ); + return poller.pollUntilDone(); } /** - * Reimage asynchronous operation reinstalls the operating system on instances of web roles or - * worker roles. + * Power off the cloud service. Note that resources are still attached and you are getting charged for + * the resources. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - reimage( + async beginPowerOff( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesReimageOptionalParams - ): Promise { - return this.beginReimage(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); - } + options?: CloudServicesPowerOffOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles - * and initializes the storage resources that are used by them. If you do not want to initialize - * storage resources, you can use Reimage Role Instances. - * @param resourceGroupName Name of the resource group. - * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise - */ - rebuild( - resourceGroupName: string, - cloudServiceName: string, - options?: Models.CloudServicesRebuildOptionalParams - ): Promise { - return this.beginRebuild(resourceGroupName, cloudServiceName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + powerOffOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes role instances in a cloud service. + * Power off the cloud service. Note that resources are still attached and you are getting charged for + * the resources. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteInstances( + async beginPowerOffAndWait( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesDeleteInstancesOptionalParams - ): Promise { - return this.beginDeleteInstances( + options?: CloudServicesPowerOffOptionalParams + ): Promise { + const poller = await this.beginPowerOff( resourceGroupName, cloudServiceName, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); - } - - /** - * Create or update a cloud service. Please note some properties can be set only during cloud - * service creation. - * @param resourceGroupName Name of the resource group. - * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate( - resourceGroupName: string, - cloudServiceName: string, - options?: Models.CloudServicesBeginCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginCreateOrUpdateOperationSpec, - options ); + return poller.pollUntilDone(); } /** - * Update a cloud service. + * Restarts one or more role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate( + async beginRestart( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesBeginUpdateOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginUpdateOperationSpec, - options + options?: CloudServicesRestartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + restartOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a cloud service. + * Restarts one or more role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginRestartAndWait( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginDeleteMethodOperationSpec, + options?: CloudServicesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( + resourceGroupName, + cloudServiceName, options ); + return poller.pollUntilDone(); } /** - * Starts the cloud service. + * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker + * roles. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginStart( + async beginReimage( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginStartOperationSpec, - options + options?: CloudServicesReimageOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + reimageOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Power off the cloud service. Note that resources are still attached and you are getting charged - * for the resources. + * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker + * roles. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginPowerOff( + async beginReimageAndWait( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginPowerOffOperationSpec, + options?: CloudServicesReimageOptionalParams + ): Promise { + const poller = await this.beginReimage( + resourceGroupName, + cloudServiceName, options ); + return poller.pollUntilDone(); } /** - * Restarts one or more role instances in a cloud service. + * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and + * initializes the storage resources that are used by them. If you do not want to initialize storage + * resources, you can use Reimage Role Instances. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRestart( + async beginRebuild( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesBeginRestartOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginRestartOperationSpec, - options + options?: CloudServicesRebuildOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + rebuildOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Reimage asynchronous operation reinstalls the operating system on instances of web roles or - * worker roles. + * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and + * initializes the storage resources that are used by them. If you do not want to initialize storage + * resources, you can use Reimage Role Instances. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginReimage( + async beginRebuildAndWait( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesBeginReimageOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginReimageOperationSpec, + options?: CloudServicesRebuildOptionalParams + ): Promise { + const poller = await this.beginRebuild( + resourceGroupName, + cloudServiceName, options ); + return poller.pollUntilDone(); } /** - * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles - * and initializes the storage resources that are used by them. If you do not want to initialize - * storage resources, you can use Reimage Role Instances. + * Deletes role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRebuild( + async beginDeleteInstances( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesBeginRebuildOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginRebuildOperationSpec, - options + options?: CloudServicesDeleteInstancesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, options }, + deleteInstancesOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** * Deletes role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteInstances( + async beginDeleteInstancesAndWait( resourceGroupName: string, cloudServiceName: string, - options?: Models.CloudServicesBeginDeleteInstancesOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - options - }, - beginDeleteInstancesOperationSpec, + options?: CloudServicesDeleteInstancesOptionalParams + ): Promise { + const poller = await this.beginDeleteInstances( + resourceGroupName, + cloudServiceName, options ); + return poller.pollUntilDone(); } /** - * Gets a list of all cloud services in the subscription, regardless of the associated resource - * group. Use nextLink property in the response to get the next page of Cloud Services. Do this - * till nextLink is null to fetch all the Cloud Services. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listAllNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. */ - listAllNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listAllNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAllNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listAllNext( + nextLink: string, + options?: CloudServicesListAllNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAllNextOperationSpec, - callback - ) as Promise; + { nextLink, options }, + listAllNextOperationSpec + ); } /** - * Gets a list of all cloud services under a resource group. Use nextLink property in the response - * to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud - * Services. - * @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 resourceGroupName Name of the resource group. + * @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( + resourceGroupName: string, + nextLink: string, + options?: CloudServicesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.CloudService }, + 201: { + bodyMapper: Mappers.CloudService + }, + 202: { + bodyMapper: Mappers.CloudService + }, + 204: { + bodyMapper: Mappers.CloudService + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getInstanceViewOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView", + requestBody: Parameters.parameters27, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.CloudServiceInstanceView + bodyMapper: Mappers.CloudService + }, + 201: { + bodyMapper: Mappers.CloudService + }, + 202: { + bodyMapper: Mappers.CloudService + }, + 204: { + bodyMapper: Mappers.CloudService }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters28, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listAllOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.CloudServiceListResult - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept], serializer }; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const getOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices", - urlParameters: [Parameters.resourceGroupName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CloudServiceListResult + bodyMapper: Mappers.CloudService }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.CloudService - }, + headerParameters: [Parameters.accept], + serializer +}; +const getInstanceViewOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CloudService - }, - 201: { - bodyMapper: Mappers.CloudService + bodyMapper: Mappers.CloudServiceInstanceView }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.CloudServiceUpdate - }, + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CloudService + bodyMapper: Mappers.CloudServiceListResult }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const listOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.CloudServiceListResult + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginStartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginPowerOffOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const powerOffOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginRestartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.RoleInstances - }, + headerParameters: [Parameters.accept], + serializer +}; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginReimageOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.RoleInstances - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const reimageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginRebuildOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.RoleInstances - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const rebuildOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteInstancesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.RoleInstances - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteInstancesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listAllNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listAllNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceListResult @@ -988,16 +1289,18 @@ const listAllNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceListResult @@ -1006,5 +1309,13 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts b/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts index cc3f67d276aa..5b465150528c 100644 --- a/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts +++ b/sdk/compute/arm-compute/src/operations/cloudServicesUpdateDomain.ts @@ -3,257 +3,292 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/cloudServicesUpdateDomainMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { CloudServicesUpdateDomain } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + UpdateDomain, + CloudServicesUpdateDomainListUpdateDomainsNextOptionalParams, + CloudServicesUpdateDomainListUpdateDomainsOptionalParams, + CloudServicesUpdateDomainWalkUpdateDomainOptionalParams, + CloudServicesUpdateDomainGetUpdateDomainOptionalParams, + CloudServicesUpdateDomainGetUpdateDomainResponse, + CloudServicesUpdateDomainListUpdateDomainsResponse, + CloudServicesUpdateDomainListUpdateDomainsNextResponse +} from "../models"; +/// /** Class representing a CloudServicesUpdateDomain. */ -export class CloudServicesUpdateDomain { +export class CloudServicesUpdateDomainImpl + implements CloudServicesUpdateDomain { private readonly client: ComputeManagementClientContext; /** - * Create a CloudServicesUpdateDomain. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class CloudServicesUpdateDomain class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Updates the role instances in the specified update domain. + * Gets a list of all update domains in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param updateDomain Specifies an integer value that identifies the update domain. Update domains - * are identified with a zero-based index: the first update domain has an ID of 0, the second has - * an ID of 1, and so on. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - walkUpdateDomain( + public listUpdateDomains( resourceGroupName: string, cloudServiceName: string, - updateDomain: number, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginWalkUpdateDomain( + options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listUpdateDomainsPagingAll( + resourceGroupName, + cloudServiceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listUpdateDomainsPagingPage( + resourceGroupName, + cloudServiceName, + options + ); + } + }; + } + + private async *listUpdateDomainsPagingPage( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams + ): AsyncIterableIterator { + let result = await this._listUpdateDomains( + resourceGroupName, + cloudServiceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listUpdateDomainsNext( + resourceGroupName, + cloudServiceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listUpdateDomainsPagingAll( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listUpdateDomainsPagingPage( resourceGroupName, cloudServiceName, - updateDomain, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + )) { + yield* page; + } } /** - * Gets the specified update domain of a cloud service. Use nextLink property in the response to - * get the next page of update domains. Do this till nextLink is null to fetch all the update - * domains. + * Updates the role instances in the specified update domain. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param updateDomain Specifies an integer value that identifies the update domain. Update domains - * are identified with a zero-based index: the first update domain has an ID of 0, the second has - * an ID of 1, and so on. - * @param [options] The optional parameters - * @returns Promise + * @param updateDomain Specifies an integer value that identifies the update domain. Update domains are + * identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of + * 1, and so on. + * @param options The options parameters. */ - getUpdateDomain( + async beginWalkUpdateDomain( resourceGroupName: string, cloudServiceName: string, updateDomain: number, - options?: msRest.RequestOptionsBase - ): Promise; + options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, cloudServiceName, updateDomain, options }, + walkUpdateDomainOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Updates the role instances in the specified update domain. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param updateDomain Specifies an integer value that identifies the update domain. Update domains - * are identified with a zero-based index: the first update domain has an ID of 0, the second has - * an ID of 1, and so on. - * @param callback The callback + * @param updateDomain Specifies an integer value that identifies the update domain. Update domains are + * identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of + * 1, and so on. + * @param options The options parameters. */ - getUpdateDomain( + async beginWalkUpdateDomainAndWait( resourceGroupName: string, cloudServiceName: string, updateDomain: number, - callback: msRest.ServiceCallback - ): void; + options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams + ): Promise { + const poller = await this.beginWalkUpdateDomain( + resourceGroupName, + cloudServiceName, + updateDomain, + options + ); + return poller.pollUntilDone(); + } + /** + * Gets the specified update domain of a cloud service. Use nextLink property in the response to get + * the next page of update domains. Do this till nextLink is null to fetch all the update domains. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param updateDomain Specifies an integer value that identifies the update domain. Update domains - * are identified with a zero-based index: the first update domain has an ID of 0, the second has - * an ID of 1, and so on. - * @param options The optional parameters - * @param callback The callback + * @param updateDomain Specifies an integer value that identifies the update domain. Update domains are + * identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of + * 1, and so on. + * @param options The options parameters. */ getUpdateDomain( resourceGroupName: string, cloudServiceName: string, updateDomain: number, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getUpdateDomain( - resourceGroupName: string, - cloudServiceName: string, - updateDomain: number, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServicesUpdateDomainGetUpdateDomainOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - updateDomain, - options - }, - getUpdateDomainOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, updateDomain, options }, + getUpdateDomainOperationSpec + ); } /** * Gets a list of all update domains in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listUpdateDomains( + private _listUpdateDomains( resourceGroupName: string, cloudServiceName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName Name of the resource group. - * @param cloudServiceName Name of the cloud service. - * @param callback The callback - */ - listUpdateDomains( - resourceGroupName: string, - cloudServiceName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName Name of the resource group. - * @param cloudServiceName Name of the cloud service. - * @param options The optional parameters - * @param callback The callback - */ - listUpdateDomains( - resourceGroupName: string, - cloudServiceName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listUpdateDomains( - resourceGroupName: string, - cloudServiceName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - cloudServiceName, - options - }, - listUpdateDomainsOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, options }, + listUpdateDomainsOperationSpec + ); } /** - * Updates the role instances in the specified update domain. + * ListUpdateDomainsNext * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. - * @param updateDomain Specifies an integer value that identifies the update domain. Update domains - * are identified with a zero-based index: the first update domain has an ID of 0, the second has - * an ID of 1, and so on. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the ListUpdateDomains method. + * @param options The options parameters. */ - beginWalkUpdateDomain( + private _listUpdateDomainsNext( resourceGroupName: string, cloudServiceName: string, - updateDomain: number, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - cloudServiceName, - updateDomain, - options - }, - beginWalkUpdateDomainOperationSpec, - options - ); - } - - /** - * Gets a list of all update domains in a cloud service. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listUpdateDomainsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listUpdateDomainsNext( - 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 - */ - listUpdateDomainsNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listUpdateDomainsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + nextLink: string, + options?: CloudServicesUpdateDomainListUpdateDomainsNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listUpdateDomainsNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, cloudServiceName, nextLink, options }, + listUpdateDomainsNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getUpdateDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const walkUpdateDomainOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", + httpMethod: "PUT", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.parameters30, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.cloudServiceName, - Parameters.updateDomain, - Parameters.subscriptionId + Parameters.updateDomain ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getUpdateDomainOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.UpdateDomain @@ -262,20 +297,21 @@ const getUpdateDomainOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listUpdateDomainsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.cloudServiceName, - Parameters.subscriptionId + Parameters.updateDomain ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listUpdateDomainsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.UpdateDomainListResult @@ -284,42 +320,19 @@ const listUpdateDomainsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginWalkUpdateDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.cloudServiceName, - Parameters.updateDomain, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.cloudServiceName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.UpdateDomain - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; - -const listUpdateDomainsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listUpdateDomainsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.UpdateDomainListResult @@ -328,5 +341,14 @@ const listUpdateDomainsNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.cloudServiceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/dedicatedHostGroups.ts b/sdk/compute/arm-compute/src/operations/dedicatedHostGroups.ts index e5470bb2a190..c57c2d5edab8 100644 --- a/sdk/compute/arm-compute/src/operations/dedicatedHostGroups.ts +++ b/sdk/compute/arm-compute/src/operations/dedicatedHostGroups.ts @@ -3,63 +3,164 @@ * 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/dedicatedHostGroupsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DedicatedHostGroups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + DedicatedHostGroup, + DedicatedHostGroupsListByResourceGroupNextOptionalParams, + DedicatedHostGroupsListByResourceGroupOptionalParams, + DedicatedHostGroupsListBySubscriptionNextOptionalParams, + DedicatedHostGroupsListBySubscriptionOptionalParams, + DedicatedHostGroupsCreateOrUpdateOptionalParams, + DedicatedHostGroupsCreateOrUpdateResponse, + DedicatedHostGroupUpdate, + DedicatedHostGroupsUpdateOptionalParams, + DedicatedHostGroupsUpdateResponse, + DedicatedHostGroupsDeleteOptionalParams, + DedicatedHostGroupsGetOptionalParams, + DedicatedHostGroupsGetResponse, + DedicatedHostGroupsListByResourceGroupResponse, + DedicatedHostGroupsListBySubscriptionResponse, + DedicatedHostGroupsListByResourceGroupNextResponse, + DedicatedHostGroupsListBySubscriptionNextResponse +} from "../models"; +/// /** Class representing a DedicatedHostGroups. */ -export class DedicatedHostGroups { +export class DedicatedHostGroupsImpl implements DedicatedHostGroups { private readonly client: ComputeManagementClientContext; /** - * Create a DedicatedHostGroups. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class DedicatedHostGroups class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups - * please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) + * Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in + * the response to get the next page of dedicated host groups. * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param parameters Parameters supplied to the Create Dedicated Host Group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroup, options?: msRest.RequestOptionsBase): Promise; + public listByResourceGroup( + resourceGroupName: string, + options?: DedicatedHostGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: DedicatedHostGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: DedicatedHostGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param parameters Parameters supplied to the Create Dedicated Host Group. - * @param callback The callback + * Lists all of the dedicated host groups in the subscription. Use the nextLink property in the + * response to get the next page of dedicated host groups. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroup, callback: msRest.ServiceCallback): void; + public listBySubscription( + options?: DedicatedHostGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: DedicatedHostGroupsListBySubscriptionOptionalParams + ): 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?: DedicatedHostGroupsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** + * Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups + * please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param parameters Parameters supplied to the Create Dedicated Host Group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + hostGroupName: string, + parameters: DedicatedHostGroup, + options?: DedicatedHostGroupsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - hostGroupName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, hostGroupName, parameters, options }, + createOrUpdateOperationSpec + ); } /** @@ -67,424 +168,261 @@ export class DedicatedHostGroups { * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param parameters Parameters supplied to the Update Dedicated Host Group operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroupUpdate, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param parameters Parameters supplied to the Update Dedicated Host Group operation. - * @param callback The callback - */ - update(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroupUpdate, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param parameters Parameters supplied to the Update Dedicated Host Group operation. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroupUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, hostGroupName: string, parameters: Models.DedicatedHostGroupUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + hostGroupName: string, + parameters: DedicatedHostGroupUpdate, + options?: DedicatedHostGroupsUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - hostGroupName, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, hostGroupName, parameters, options }, + updateOperationSpec + ); } /** * Delete a dedicated host group. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, hostGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, hostGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, hostGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, hostGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostGroupsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - hostGroupName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, hostGroupName, options }, + deleteOperationSpec + ); } /** * Retrieves information about a dedicated host group. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, hostGroupName: string, options?: Models.DedicatedHostGroupsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, hostGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, hostGroupName: string, options: Models.DedicatedHostGroupsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, hostGroupName: string, options?: Models.DedicatedHostGroupsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostGroupsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - hostGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, hostGroupName, options }, + getOperationSpec + ); } /** - * Lists all of the dedicated host groups in the specified resource group. Use the nextLink - * property in the response to get the next page of dedicated host groups. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in + * the response to get the next page of dedicated host groups. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: DedicatedHostGroupsListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * Lists all of the dedicated host groups in the subscription. Use the nextLink property in the * response to get the next page of dedicated host groups. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback + * @param options The options parameters. */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscription( + options?: DedicatedHostGroupsListBySubscriptionOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; + { options }, + listBySubscriptionOperationSpec + ); } /** - * Lists all of the dedicated host groups in the specified resource group. Use the nextLink - * property in the response to get the next page of dedicated host groups. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(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 + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: DedicatedHostGroupsListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } /** - * Lists all of the dedicated host groups in the subscription. Use the nextLink property in the - * response to get the next page of dedicated host groups. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(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. */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: DedicatedHostGroupsListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.hostGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DedicatedHostGroup, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.DedicatedHostGroup }, 201: { bodyMapper: Mappers.DedicatedHostGroup - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.hostGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.hostGroupName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DedicatedHostGroupUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.DedicatedHostGroup - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.hostGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + responses: { 200: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.hostGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.hostGroupName ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.hostGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand1, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.DedicatedHostGroup - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups", + queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.hostGroupName ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DedicatedHostGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DedicatedHostGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DedicatedHostGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DedicatedHostGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts b/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts index 4ea103423d43..740ebb1dfb3e 100644 --- a/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts +++ b/sdk/compute/arm-compute/src/operations/dedicatedHosts.ts @@ -3,309 +3,480 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/dedicatedHostsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DedicatedHosts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + DedicatedHost, + DedicatedHostsListByHostGroupNextOptionalParams, + DedicatedHostsListByHostGroupOptionalParams, + DedicatedHostsCreateOrUpdateOptionalParams, + DedicatedHostsCreateOrUpdateResponse, + DedicatedHostUpdate, + DedicatedHostsUpdateOptionalParams, + DedicatedHostsUpdateResponse, + DedicatedHostsDeleteOptionalParams, + DedicatedHostsGetOptionalParams, + DedicatedHostsGetResponse, + DedicatedHostsListByHostGroupResponse, + DedicatedHostsListByHostGroupNextResponse +} from "../models"; +/// /** Class representing a DedicatedHosts. */ -export class DedicatedHosts { +export class DedicatedHostsImpl implements DedicatedHosts { private readonly client: ComputeManagementClientContext; /** - * Create a DedicatedHosts. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class DedicatedHosts class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a dedicated host . + * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in + * the response to get the next page of dedicated hosts. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host . - * @param parameters Parameters supplied to the Create Dedicated Host. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: Models.DedicatedHost, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,hostGroupName,hostName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public listByHostGroup( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostsListByHostGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByHostGroupPagingAll( + resourceGroupName, + hostGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByHostGroupPagingPage( + resourceGroupName, + hostGroupName, + options + ); + } + }; + } + + private async *listByHostGroupPagingPage( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostsListByHostGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByHostGroup( + resourceGroupName, + hostGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByHostGroupNext( + resourceGroupName, + hostGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByHostGroupPagingAll( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostsListByHostGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByHostGroupPagingPage( + resourceGroupName, + hostGroupName, + options + )) { + yield* page; + } } /** - * Update an dedicated host . + * Create or update a dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param hostName The name of the dedicated host . - * @param parameters Parameters supplied to the Update Dedicated Host operation. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create Dedicated Host. + * @param options The options parameters. */ - update(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: Models.DedicatedHostUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,hostGroupName,hostName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHost, + options?: DedicatedHostsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DedicatedHostsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, hostGroupName, hostName, parameters, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Delete a dedicated host. + * Create or update a dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host. - * @param [options] The optional parameters - * @returns Promise + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Create Dedicated Host. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, hostGroupName: string, hostName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,hostGroupName,hostName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHost, + options?: DedicatedHostsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + hostGroupName, + hostName, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Retrieves information about a dedicated host. + * Update an dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host. - * @param [options] The optional parameters - * @returns Promise + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Update Dedicated Host operation. + * @param options The options parameters. */ - get(resourceGroupName: string, hostGroupName: string, hostName: string, options?: Models.DedicatedHostsGetOptionalParams): Promise; + async beginUpdate( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHostUpdate, + options?: DedicatedHostsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DedicatedHostsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, hostGroupName, hostName, parameters, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Update an dedicated host . * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host. - * @param callback The callback + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Update Dedicated Host operation. + * @param options The options parameters. */ - get(resourceGroupName: string, hostGroupName: string, hostName: string, callback: msRest.ServiceCallback): void; + async beginUpdateAndWait( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHostUpdate, + options?: DedicatedHostsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + hostGroupName, + hostName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** + * Delete a dedicated host. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. * @param hostName The name of the dedicated host. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, hostGroupName: string, hostName: string, options: Models.DedicatedHostsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, hostGroupName: string, hostName: string, options?: Models.DedicatedHostsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - hostGroupName, - hostName, - options - }, - getOperationSpec, - callback) as Promise; + async beginDelete( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, hostGroupName, hostName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink - * property in the response to get the next page of dedicated hosts. - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param [options] The optional parameters - * @returns Promise - */ - listByHostGroup(resourceGroupName: string, hostGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param hostGroupName The name of the dedicated host group. - * @param callback The callback - */ - listByHostGroup(resourceGroupName: string, hostGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Delete a dedicated host. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param options The optional parameters - * @param callback The callback + * @param hostName The name of the dedicated host. + * @param options The options parameters. */ - listByHostGroup(resourceGroupName: string, hostGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByHostGroup(resourceGroupName: string, hostGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - hostGroupName, - options - }, - listByHostGroupOperationSpec, - callback) as Promise; + async beginDeleteAndWait( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + hostGroupName, + hostName, + options + ); + return poller.pollUntilDone(); } /** - * Create or update a dedicated host . + * Retrieves information about a dedicated host. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host . - * @param parameters Parameters supplied to the Create Dedicated Host. - * @param [options] The optional parameters - * @returns Promise + * @param hostName The name of the dedicated host. + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: Models.DedicatedHost, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hostGroupName, - hostName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); + get( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostGroupName, hostName, options }, + getOperationSpec + ); } /** - * Update an dedicated host . + * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in + * the response to get the next page of dedicated hosts. * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host . - * @param parameters Parameters supplied to the Update Dedicated Host operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, hostGroupName: string, hostName: string, parameters: Models.DedicatedHostUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hostGroupName, - hostName, - parameters, - options - }, - beginUpdateOperationSpec, - options); + private _listByHostGroup( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostsListByHostGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, hostGroupName, options }, + listByHostGroupOperationSpec + ); } /** - * Delete a dedicated host. + * ListByHostGroupNext * @param resourceGroupName The name of the resource group. * @param hostGroupName The name of the dedicated host group. - * @param hostName The name of the dedicated host. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, hostGroupName: string, hostName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - hostGroupName, - hostName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink - * property in the response to get the next page of dedicated hosts. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the ListByHostGroup method. + * @param options The options parameters. */ - listByHostGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByHostGroupNext(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 - */ - listByHostGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByHostGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByHostGroupNext( + resourceGroupName: string, + hostGroupName: string, + nextLink: string, + options?: DedicatedHostsListByHostGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByHostGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, hostGroupName, nextLink, options }, + listByHostGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.hostGroupName, - Parameters.hostName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand1, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.DedicatedHost }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.DedicatedHost + }, + 202: { + bodyMapper: Mappers.DedicatedHost + }, + 204: { + bodyMapper: Mappers.DedicatedHost } }, - serializer -}; - -const listByHostGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts", + requestBody: Parameters.parameters6, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.hostGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.hostName ], - responses: { - 200: { - bodyMapper: Mappers.DedicatedHostListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.hostGroupName, - Parameters.hostName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DedicatedHost, - required: true - } - }, +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.DedicatedHost @@ -313,92 +484,96 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.DedicatedHost }, - default: { - bodyMapper: Mappers.CloudError + 202: { + bodyMapper: Mappers.DedicatedHost + }, + 204: { + bodyMapper: Mappers.DedicatedHost } }, + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.hostGroupName, + Parameters.hostName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.hostGroupName, - Parameters.hostName, - Parameters.subscriptionId + Parameters.hostName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DedicatedHostUpdate, - required: true - } - }, + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DedicatedHost - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.hostGroupName, - Parameters.hostName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.hostName ], + headerParameters: [Parameters.accept], + serializer +}; +const listByHostGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.DedicatedHostListResult } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.hostGroupName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByHostGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByHostGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DedicatedHostListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.hostGroupName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/diskAccesses.ts b/sdk/compute/arm-compute/src/operations/diskAccesses.ts index e3c113656c1b..660a9761012b 100644 --- a/sdk/compute/arm-compute/src/operations/diskAccesses.ts +++ b/sdk/compute/arm-compute/src/operations/diskAccesses.ts @@ -3,374 +3,679 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/diskAccessesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DiskAccesses } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + DiskAccess, + DiskAccessesListByResourceGroupNextOptionalParams, + DiskAccessesListByResourceGroupOptionalParams, + DiskAccessesListNextOptionalParams, + DiskAccessesListOptionalParams, + PrivateEndpointConnection, + DiskAccessesListPrivateEndpointConnectionsNextOptionalParams, + DiskAccessesListPrivateEndpointConnectionsOptionalParams, + DiskAccessesCreateOrUpdateOptionalParams, + DiskAccessesCreateOrUpdateResponse, + DiskAccessUpdate, + DiskAccessesUpdateOptionalParams, + DiskAccessesUpdateResponse, + DiskAccessesGetOptionalParams, + DiskAccessesGetResponse, + DiskAccessesDeleteOptionalParams, + DiskAccessesListByResourceGroupResponse, + DiskAccessesListResponse, + DiskAccessesGetPrivateLinkResourcesOptionalParams, + DiskAccessesGetPrivateLinkResourcesResponse, + DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams, + DiskAccessesUpdateAPrivateEndpointConnectionResponse, + DiskAccessesGetAPrivateEndpointConnectionOptionalParams, + DiskAccessesGetAPrivateEndpointConnectionResponse, + DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams, + DiskAccessesListPrivateEndpointConnectionsResponse, + DiskAccessesListByResourceGroupNextResponse, + DiskAccessesListNextResponse, + DiskAccessesListPrivateEndpointConnectionsNextResponse +} from "../models"; +/// /** Class representing a DiskAccesses. */ -export class DiskAccesses { +export class DiskAccessesImpl implements DiskAccesses { private readonly client: ComputeManagementClientContext; /** - * Create a DiskAccesses. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class DiskAccesses class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Creates or updates a disk access resource + * Lists all the disk access resources under a resource group. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskAccess disk access object supplied in the body of the Put disk access operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + public listByResourceGroup( resourceGroupName: string, - diskAccessName: string, - diskAccess: Models.DiskAccess, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: DiskAccessesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: DiskAccessesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: DiskAccessesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - diskAccessName, - diskAccess, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.DiskAccessesCreateOrUpdateResponse - >; + )) { + yield* page; + } } /** - * Updates (patches) a disk access resource. + * Lists all the disk access resources under a subscription. + * @param options The options parameters. + */ + public list( + options?: DiskAccessesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: DiskAccessesListOptionalParams + ): 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?: DiskAccessesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List information about private endpoint connections under a disk access resource * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskAccess disk access object supplied in the body of the Patch disk access operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - update( + public listPrivateEndpointConnections( resourceGroupName: string, diskAccessName: string, - diskAccess: Models.DiskAccessUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + options?: DiskAccessesListPrivateEndpointConnectionsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPrivateEndpointConnectionsPagingAll( + resourceGroupName, + diskAccessName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPrivateEndpointConnectionsPagingPage( + resourceGroupName, + diskAccessName, + options + ); + } + }; + } + + private async *listPrivateEndpointConnectionsPagingPage( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesListPrivateEndpointConnectionsOptionalParams + ): AsyncIterableIterator { + let result = await this._listPrivateEndpointConnections( + resourceGroupName, + diskAccessName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listPrivateEndpointConnectionsNext( + resourceGroupName, + diskAccessName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPrivateEndpointConnectionsPagingAll( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesListPrivateEndpointConnectionsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPrivateEndpointConnectionsPagingPage( resourceGroupName, diskAccessName, - diskAccess, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.DiskAccessesUpdateResponse - >; + )) { + yield* page; + } } /** - * Gets information about a disk access resource. + * Creates or updates a disk access resource * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Put disk access operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdate( resourceGroupName: string, diskAccessName: string, - options?: msRest.RequestOptionsBase - ): Promise; + diskAccess: DiskAccess, + options?: DiskAccessesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskAccessesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskAccessName, diskAccess, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Creates or updates a disk access resource * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param callback The callback + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Put disk access operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdateAndWait( resourceGroupName: string, diskAccessName: string, - callback: msRest.ServiceCallback - ): void; + diskAccess: DiskAccess, + options?: DiskAccessesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + diskAccessName, + diskAccess, + options + ); + return poller.pollUntilDone(); + } + /** + * Updates (patches) a disk access resource. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Patch disk access operation. + * @param options The options parameters. */ - get( + async beginUpdate( resourceGroupName: string, diskAccessName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( + diskAccess: DiskAccessUpdate, + options?: DiskAccessesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskAccessesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskAccessName, diskAccess, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + + /** + * Updates (patches) a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Patch disk access operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( resourceGroupName: string, diskAccessName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - diskAccessName, - options - }, - getOperationSpec, - callback - ) as Promise; + diskAccess: DiskAccessUpdate, + options?: DiskAccessesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + diskAccessName, + diskAccess, + options + ); + return poller.pollUntilDone(); } /** - * Deletes a disk access resource. + * Gets information about a disk access resource. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - deleteMethod( + get( resourceGroupName: string, diskAccessName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, diskAccessName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: DiskAccessesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskAccessName, options }, + getOperationSpec ); } /** - * Lists all the disk access resources under a resource group. + * Deletes a disk access resource. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - listByResourceGroup( + async beginDelete( resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; + diskAccessName: string, + options?: DiskAccessesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskAccessName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Deletes a disk access resource. * @param resourceGroupName The name of the resource group. - * @param callback The callback + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - listByResourceGroup( + async beginDeleteAndWait( resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + diskAccessName: string, + options?: DiskAccessesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + diskAccessName, + options + ); + return poller.pollUntilDone(); + } + /** + * Lists all the disk access resources under a resource group. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByResourceGroup( + private _listByResourceGroup( resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: DiskAccessesListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback - ) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * Lists all the disk access resources under a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback + * @param options The options parameters. */ - 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 - }, - listOperationSpec, - callback - ) as Promise; + private _list( + options?: DiskAccessesListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } /** * Gets the private link resources possible under disk access resource * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise - */ - getPrivateLinkResources( - resourceGroupName: string, - diskAccessName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param callback The callback + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ getPrivateLinkResources( resourceGroupName: string, diskAccessName: string, - callback: msRest.ServiceCallback - ): void; + options?: DiskAccessesGetPrivateLinkResourcesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskAccessName, options }, + getPrivateLinkResourcesOperationSpec + ); + } + /** + * Approve or reject a private endpoint connection under disk access resource, this can't be used to + * create a new private endpoint connection. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection private endpoint connection object supplied in the body of the Put + * private endpoint connection operation. + * @param options The options parameters. */ - getPrivateLinkResources( - resourceGroupName: string, - diskAccessName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getPrivateLinkResources( + async beginUpdateAPrivateEndpointConnection( resourceGroupName: string, diskAccessName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + privateEndpointConnectionName: string, + privateEndpointConnection: PrivateEndpointConnection, + options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskAccessesUpdateAPrivateEndpointConnectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, diskAccessName, + privateEndpointConnectionName, + privateEndpointConnection, options }, - getPrivateLinkResourcesOperationSpec, - callback - ) as Promise; + updateAPrivateEndpointConnectionOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Approve or reject a private endpoint connection under disk access resource, this can't be used - * to create a new private endpoint connection. + * Approve or reject a private endpoint connection under disk access resource, this can't be used to + * create a new private endpoint connection. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. * @param privateEndpointConnectionName The name of the private endpoint connection - * @param privateEndpointConnection private endpoint connection object supplied in the body of the - * Put private endpoint connection operation. - * @param [options] The optional parameters - * @returns Promise + * @param privateEndpointConnection private endpoint connection object supplied in the body of the Put + * private endpoint connection operation. + * @param options The options parameters. */ - updateAPrivateEndpointConnection( + async beginUpdateAPrivateEndpointConnectionAndWait( resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, - privateEndpointConnection: Models.PrivateEndpointConnection, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdateAPrivateEndpointConnection( + privateEndpointConnection: PrivateEndpointConnection, + options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams + ): Promise { + const poller = await this.beginUpdateAPrivateEndpointConnection( resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.DiskAccessesUpdateAPrivateEndpointConnectionResponse - >; + ); + return poller.pollUntilDone(); } /** * Gets information about a private endpoint connection under a disk access resource. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param [options] The optional parameters - * @returns Promise - */ - getAPrivateEndpointConnection( - resourceGroupName: string, - diskAccessName: string, - privateEndpointConnectionName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param callback The callback - */ - getAPrivateEndpointConnection( - resourceGroupName: string, - diskAccessName: string, - privateEndpointConnectionName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. * @param privateEndpointConnectionName The name of the private endpoint connection - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ getAPrivateEndpointConnection( resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getAPrivateEndpointConnection( - resourceGroupName: string, - diskAccessName: string, - privateEndpointConnectionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: DiskAccessesGetAPrivateEndpointConnectionOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -378,640 +683,451 @@ export class DiskAccesses { privateEndpointConnectionName, options }, - getAPrivateEndpointConnectionOperationSpec, - callback - ) as Promise; + getAPrivateEndpointConnectionOperationSpec + ); } /** * Deletes a private endpoint connection under a disk access resource. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. * @param privateEndpointConnectionName The name of the private endpoint connection - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteAPrivateEndpointConnection( + async beginDeleteAPrivateEndpointConnection( resourceGroupName: string, diskAccessName: string, privateEndpointConnectionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteAPrivateEndpointConnection( - resourceGroupName, - diskAccessName, - privateEndpointConnectionName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); - } + options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * List information about private endpoint connections under a disk access resource - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise - */ - listPrivateEndpointConnections( - resourceGroupName: string, - diskAccessName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param callback The callback - */ - listPrivateEndpointConnections( - resourceGroupName: string, - diskAccessName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback - */ - listPrivateEndpointConnections( - resourceGroupName: string, - diskAccessName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listPrivateEndpointConnections( - resourceGroupName: string, - diskAccessName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, diskAccessName, + privateEndpointConnectionName, options }, - listPrivateEndpointConnectionsOperationSpec, - callback - ) as Promise; + deleteAPrivateEndpointConnectionOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Creates or updates a disk access resource + * Deletes a private endpoint connection under a disk access resource. * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskAccess disk access object supplied in the body of the Put disk access operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The options parameters. */ - beginCreateOrUpdate( + async beginDeleteAPrivateEndpointConnectionAndWait( resourceGroupName: string, diskAccessName: string, - diskAccess: Models.DiskAccess, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskAccessName, - diskAccess, - options - }, - beginCreateOrUpdateOperationSpec, + privateEndpointConnectionName: string, + options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams + ): Promise { + const poller = await this.beginDeleteAPrivateEndpointConnection( + resourceGroupName, + diskAccessName, + privateEndpointConnectionName, options ); + return poller.pollUntilDone(); } /** - * Updates (patches) a disk access resource. + * List information about private endpoint connections under a disk access resource * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskAccess disk access object supplied in the body of the Patch disk access operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - beginUpdate( + private _listPrivateEndpointConnections( resourceGroupName: string, diskAccessName: string, - diskAccess: Models.DiskAccessUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskAccessName, - diskAccess, - options - }, - beginUpdateOperationSpec, - options + options?: DiskAccessesListPrivateEndpointConnectionsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskAccessName, options }, + listPrivateEndpointConnectionsOperationSpec ); } /** - * Deletes a disk access resource. + * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - beginDeleteMethod( + private _listByResourceGroupNext( resourceGroupName: string, - diskAccessName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskAccessName, - options - }, - beginDeleteMethodOperationSpec, - options + nextLink: string, + options?: DiskAccessesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec ); } /** - * Approve or reject a private endpoint connection under disk access resource, this can't be used - * to create a new private endpoint connection. - * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param privateEndpointConnection private endpoint connection object supplied in the body of the - * Put private endpoint connection operation. - * @param [options] The optional parameters - * @returns Promise + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - beginUpdateAPrivateEndpointConnection( - resourceGroupName: string, - diskAccessName: string, - privateEndpointConnectionName: string, - privateEndpointConnection: Models.PrivateEndpointConnection, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskAccessName, - privateEndpointConnectionName, - privateEndpointConnection, - options - }, - beginUpdateAPrivateEndpointConnectionOperationSpec, - options + private _listNext( + nextLink: string, + options?: DiskAccessesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec ); } /** - * Deletes a private endpoint connection under a disk access resource. + * ListPrivateEndpointConnectionsNext * @param resourceGroupName The name of the resource group. - * @param diskAccessName The name of the disk access resource that is being created. The name can't - * be changed after the disk encryption set is created. Supported characters for the name are a-z, - * A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection - * @param [options] The optional parameters - * @returns Promise + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param nextLink The nextLink from the previous successful call to the ListPrivateEndpointConnections + * method. + * @param options The options parameters. */ - beginDeleteAPrivateEndpointConnection( + private _listPrivateEndpointConnectionsNext( resourceGroupName: string, diskAccessName: string, - privateEndpointConnectionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskAccessName, - privateEndpointConnectionName, - options - }, - beginDeleteAPrivateEndpointConnectionOperationSpec, - options - ); - } - - /** - * Lists all the disk access resources under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext( - 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 - */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + nextLink: string, + options?: DiskAccessesListPrivateEndpointConnectionsNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback - ) as Promise; - } - - /** - * Lists all the disk access resources under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; - } - - /** - * List information about private endpoint connections under a disk access resource - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listPrivateEndpointConnectionsNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listPrivateEndpointConnectionsNext( - 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 - */ - listPrivateEndpointConnectionsNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listPrivateEndpointConnectionsNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listPrivateEndpointConnectionsNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, diskAccessName, nextLink, options }, + listPrivateEndpointConnectionsNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.diskAccessName - ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.DiskAccess }, + 201: { + bodyMapper: Mappers.DiskAccess + }, + 202: { + bodyMapper: Mappers.DiskAccess + }, + 204: { + bodyMapper: Mappers.DiskAccess + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.diskAccess, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskAccessName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.DiskAccessList + bodyMapper: Mappers.DiskAccess + }, + 201: { + bodyMapper: Mappers.DiskAccess + }, + 202: { + bodyMapper: Mappers.DiskAccess + }, + 204: { + bodyMapper: Mappers.DiskAccess }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.diskAccess1, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskAccessName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { - bodyMapper: Mappers.DiskAccessList + bodyMapper: Mappers.DiskAccess }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getPrivateLinkResourcesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.diskAccessName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getAPrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.diskAccessName, - Parameters.privateEndpointConnectionName + Parameters.subscriptionId, + Parameters.diskAccessName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.DiskAccessList }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listPrivateEndpointConnectionsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.diskAccessName + Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + bodyMapper: Mappers.DiskAccessList }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const getPrivateLinkResourcesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + } + }, + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.diskAccessName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "diskAccess", - mapper: { - ...Mappers.DiskAccess, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const updateAPrivateEndpointConnectionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.DiskAccess + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection }, 202: { - bodyMapper: Mappers.DiskAccess + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + requestBody: Parameters.privateEndpointConnection, + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.diskAccessName + Parameters.subscriptionId, + Parameters.diskAccessName, + Parameters.privateEndpointConnectionName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "diskAccess", - mapper: { - ...Mappers.DiskAccessUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getAPrivateEndpointConnectionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DiskAccess - }, - 202: { - bodyMapper: Mappers.DiskAccess + bodyMapper: Mappers.PrivateEndpointConnection }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.diskAccessName + Parameters.subscriptionId, + Parameters.diskAccessName, + Parameters.privateEndpointConnectionName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteAPrivateEndpointConnectionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateAPrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.diskAccessName, Parameters.privateEndpointConnectionName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "privateEndpointConnection", - mapper: { - ...Mappers.PrivateEndpointConnection, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listPrivateEndpointConnectionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 202: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnectionListResult }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteAPrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.diskAccessName, - Parameters.privateEndpointConnectionName + Parameters.subscriptionId, + Parameters.diskAccessName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskAccessList @@ -1020,16 +1136,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskAccessList @@ -1038,16 +1157,18 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listPrivateEndpointConnectionsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listPrivateEndpointConnectionsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionListResult @@ -1056,5 +1177,14 @@ const listPrivateEndpointConnectionsNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.diskAccessName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts b/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts index 3c2b3fddb72d..440c6b8019f4 100644 --- a/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts +++ b/sdk/compute/arm-compute/src/operations/diskEncryptionSets.ts @@ -3,679 +3,785 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/diskEncryptionSetsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DiskEncryptionSets } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + DiskEncryptionSet, + DiskEncryptionSetsListByResourceGroupNextOptionalParams, + DiskEncryptionSetsListByResourceGroupOptionalParams, + DiskEncryptionSetsListNextOptionalParams, + DiskEncryptionSetsListOptionalParams, + DiskEncryptionSetsListAssociatedResourcesNextOptionalParams, + DiskEncryptionSetsListAssociatedResourcesOptionalParams, + DiskEncryptionSetsCreateOrUpdateOptionalParams, + DiskEncryptionSetsCreateOrUpdateResponse, + DiskEncryptionSetUpdate, + DiskEncryptionSetsUpdateOptionalParams, + DiskEncryptionSetsUpdateResponse, + DiskEncryptionSetsGetOptionalParams, + DiskEncryptionSetsGetResponse, + DiskEncryptionSetsDeleteOptionalParams, + DiskEncryptionSetsListByResourceGroupResponse, + DiskEncryptionSetsListResponse, + DiskEncryptionSetsListAssociatedResourcesResponse, + DiskEncryptionSetsListByResourceGroupNextResponse, + DiskEncryptionSetsListNextResponse, + DiskEncryptionSetsListAssociatedResourcesNextResponse +} from "../models"; +/// /** Class representing a DiskEncryptionSets. */ -export class DiskEncryptionSets { +export class DiskEncryptionSetsImpl implements DiskEncryptionSets { private readonly client: ComputeManagementClientContext; /** - * Create a DiskEncryptionSets. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class DiskEncryptionSets class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Creates or updates a disk encryption set + * Lists all the disk encryption sets under a resource group. * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set object supplied in the body of the Put disk - * encryption set operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + public listByResourceGroup( resourceGroupName: string, - diskEncryptionSetName: string, - diskEncryptionSet: Models.DiskEncryptionSet, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( - resourceGroupName, - diskEncryptionSetName, - diskEncryptionSet, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.DiskEncryptionSetsCreateOrUpdateResponse - >; + options?: DiskEncryptionSetsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; } - /** - * Updates (patches) a disk encryption set. - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set object supplied in the body of the Patch disk - * encryption set operation. - * @param [options] The optional parameters - * @returns Promise - */ - update( + private async *listByResourceGroupPagingPage( resourceGroupName: string, - diskEncryptionSetName: string, - diskEncryptionSet: Models.DiskEncryptionSetUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + options?: DiskEncryptionSetsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: DiskEncryptionSetsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - diskEncryptionSetName, - diskEncryptionSet, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.DiskEncryptionSetsUpdateResponse - >; + )) { + yield* page; + } } /** - * Gets information about a disk encryption set. - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise - */ - get( - resourceGroupName: string, - diskEncryptionSetName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param callback The callback + * Lists all the disk encryption sets under a subscription. + * @param options The options parameters. */ - get( - resourceGroupName: string, - diskEncryptionSetName: string, - callback: msRest.ServiceCallback - ): void; + public list( + options?: DiskEncryptionSetsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: DiskEncryptionSetsListOptionalParams + ): 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?: DiskEncryptionSetsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** + * Lists all resources that are encrypted with this disk encryption set. * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - get( + public listAssociatedResources( resourceGroupName: string, diskEncryptionSetName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( + options?: DiskEncryptionSetsListAssociatedResourcesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAssociatedResourcesPagingAll( + resourceGroupName, + diskEncryptionSetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAssociatedResourcesPagingPage( + resourceGroupName, + diskEncryptionSetName, + options + ); + } + }; + } + + private async *listAssociatedResourcesPagingPage( resourceGroupName: string, diskEncryptionSetName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { + options?: DiskEncryptionSetsListAssociatedResourcesOptionalParams + ): AsyncIterableIterator { + let result = await this._listAssociatedResources( + resourceGroupName, + diskEncryptionSetName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listAssociatedResourcesNext( resourceGroupName, diskEncryptionSetName, + continuationToken, options - }, - getOperationSpec, - callback - ) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Deletes a disk encryption set. - * @param resourceGroupName The name of the resource group. - * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod( + private async *listAssociatedResourcesPagingAll( resourceGroupName: string, diskEncryptionSetName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + options?: DiskEncryptionSetsListAssociatedResourcesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAssociatedResourcesPagingPage( resourceGroupName, diskEncryptionSetName, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + )) { + yield* page; + } } /** - * Lists all the disk encryption sets under a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Creates or updates a disk encryption set * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Put disk encryption + * set operation. + * @param options The options parameters. */ - listByResourceGroup( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( + async beginCreateOrUpdate( resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback - ) as Promise; - } + diskEncryptionSetName: string, + diskEncryptionSet: DiskEncryptionSet, + options?: DiskEncryptionSetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskEncryptionSetsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Lists all the disk encryption sets under a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback - ) as Promise; + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Lists all resources that are encrypted with this disk encryption set. + * Creates or updates a disk encryption set * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Put disk encryption + * set operation. + * @param options The options parameters. */ - listAssociatedResources( + async beginCreateOrUpdateAndWait( resourceGroupName: string, diskEncryptionSetName: string, - options?: msRest.RequestOptionsBase - ): Promise; + diskEncryptionSet: DiskEncryptionSet, + options?: DiskEncryptionSetsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + diskEncryptionSetName, + diskEncryptionSet, + options + ); + return poller.pollUntilDone(); + } + /** + * Updates (patches) a disk encryption set. * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param callback The callback + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Patch disk + * encryption set operation. + * @param options The options parameters. */ - listAssociatedResources( + async beginUpdate( resourceGroupName: string, diskEncryptionSetName: string, - callback: msRest.ServiceCallback - ): void; + diskEncryptionSet: DiskEncryptionSetUpdate, + options?: DiskEncryptionSetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskEncryptionSetsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Updates (patches) a disk encryption set. * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Patch disk + * encryption set operation. + * @param options The options parameters. */ - listAssociatedResources( - resourceGroupName: string, - diskEncryptionSetName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAssociatedResources( + async beginUpdateAndWait( resourceGroupName: string, diskEncryptionSetName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - diskEncryptionSetName, - options - }, - listAssociatedResourcesOperationSpec, - callback - ) as Promise; + diskEncryptionSet: DiskEncryptionSetUpdate, + options?: DiskEncryptionSetsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + diskEncryptionSetName, + diskEncryptionSet, + options + ); + return poller.pollUntilDone(); } /** - * Creates or updates a disk encryption set + * Gets information about a disk encryption set. * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set object supplied in the body of the Put disk - * encryption set operation. - * @param [options] The optional parameters - * @returns Promise + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - beginCreateOrUpdate( + get( resourceGroupName: string, diskEncryptionSetName: string, - diskEncryptionSet: Models.DiskEncryptionSet, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskEncryptionSetName, - diskEncryptionSet, - options - }, - beginCreateOrUpdateOperationSpec, - options + options?: DiskEncryptionSetsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, diskEncryptionSetName, options }, + getOperationSpec ); } /** - * Updates (patches) a disk encryption set. + * Deletes a disk encryption set. * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param diskEncryptionSet disk encryption set object supplied in the body of the Patch disk - * encryption set operation. - * @param [options] The optional parameters - * @returns Promise + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - beginUpdate( + async beginDelete( resourceGroupName: string, diskEncryptionSetName: string, - diskEncryptionSet: Models.DiskEncryptionSetUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskEncryptionSetName, - diskEncryptionSet, - options - }, - beginUpdateOperationSpec, - options + options?: DiskEncryptionSetsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskEncryptionSetName, options }, + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** * Deletes a disk encryption set. * @param resourceGroupName The name of the resource group. * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name - * can't be changed after the disk encryption set is created. Supported characters for the name are - * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - beginDeleteMethod( + async beginDeleteAndWait( resourceGroupName: string, diskEncryptionSetName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskEncryptionSetName, - options - }, - beginDeleteMethodOperationSpec, + options?: DiskEncryptionSetsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + diskEncryptionSetName, options ); + return poller.pollUntilDone(); } /** * Lists all the disk encryption sets under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext( - 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 + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: DiskEncryptionSetsListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * Lists all the disk encryption sets under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - 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; + private _list( + options?: DiskEncryptionSetsListOptionalParams + ): 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 + * Lists all resources that are encrypted with this disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listAssociatedResources( + resourceGroupName: string, + diskEncryptionSetName: string, + options?: DiskEncryptionSetsListAssociatedResourcesOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, diskEncryptionSetName, options }, + listAssociatedResourcesOperationSpec + ); } /** - * Lists all resources that are encrypted with this disk encryption set. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listAssociatedResourcesNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: DiskEncryptionSetsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listAssociatedResourcesNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + private _listNext( + nextLink: string, + options?: DiskEncryptionSetsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListAssociatedResourcesNext + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param nextLink The nextLink from the previous successful call to the ListAssociatedResources + * method. + * @param options The options parameters. */ - listAssociatedResourcesNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAssociatedResourcesNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listAssociatedResourcesNext( + resourceGroupName: string, + diskEncryptionSetName: string, + nextLink: string, + options?: DiskEncryptionSetsListAssociatedResourcesNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAssociatedResourcesNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, diskEncryptionSetName, nextLink, options }, + listAssociatedResourcesNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.diskEncryptionSetName - ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.DiskEncryptionSet }, + 201: { + bodyMapper: Mappers.DiskEncryptionSet + }, + 202: { + bodyMapper: Mappers.DiskEncryptionSet + }, + 204: { + bodyMapper: Mappers.DiskEncryptionSet + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.diskEncryptionSet, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskEncryptionSetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.DiskEncryptionSetList + bodyMapper: Mappers.DiskEncryptionSet + }, + 201: { + bodyMapper: Mappers.DiskEncryptionSet + }, + 202: { + bodyMapper: Mappers.DiskEncryptionSet + }, + 204: { + bodyMapper: Mappers.DiskEncryptionSet }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.diskEncryptionSet1, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskEncryptionSetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { - bodyMapper: Mappers.DiskEncryptionSetList + bodyMapper: Mappers.DiskEncryptionSet }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listAssociatedResourcesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.diskEncryptionSetName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.ResourceUriList - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.diskEncryptionSetName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "diskEncryptionSet", - mapper: { - ...Mappers.DiskEncryptionSet, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DiskEncryptionSet - }, - 202: { - bodyMapper: Mappers.DiskEncryptionSet + bodyMapper: Mappers.DiskEncryptionSetList }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.diskEncryptionSetName + Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "diskEncryptionSet", - mapper: { - ...Mappers.DiskEncryptionSetUpdate, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DiskEncryptionSet - }, - 202: { - bodyMapper: Mappers.DiskEncryptionSet + bodyMapper: Mappers.DiskEncryptionSetList }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const listAssociatedResourcesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.diskEncryptionSetName - ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.ResourceUriList + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskEncryptionSetName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskEncryptionSetList @@ -684,16 +790,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskEncryptionSetList @@ -702,16 +811,18 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listAssociatedResourcesNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listAssociatedResourcesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ResourceUriList @@ -720,5 +831,14 @@ const listAssociatedResourcesNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.diskEncryptionSetName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts b/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts index 79e31f1f2a0c..087cd8c8305c 100644 --- a/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts +++ b/sdk/compute/arm-compute/src/operations/diskRestorePointOperations.ts @@ -3,97 +3,149 @@ * 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/diskRestorePointOperationsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DiskRestorePointOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + DiskRestorePoint, + DiskRestorePointOperationsListByRestorePointNextOptionalParams, + DiskRestorePointOperationsListByRestorePointOptionalParams, + DiskRestorePointOperationsGetOptionalParams, + DiskRestorePointOperationsGetResponse, + DiskRestorePointOperationsListByRestorePointResponse, + GrantAccessData, + DiskRestorePointOperationsGrantAccessOptionalParams, + DiskRestorePointOperationsGrantAccessResponse, + DiskRestorePointOperationsRevokeAccessOptionalParams, + DiskRestorePointOperationsListByRestorePointNextResponse +} from "../models"; +/// /** Class representing a DiskRestorePointOperations. */ -export class DiskRestorePointOperations { +export class DiskRestorePointOperationsImpl + implements DiskRestorePointOperations { private readonly client: ComputeManagementClientContext; /** - * Create a DiskRestorePointOperations. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class DiskRestorePointOperations class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Get disk restorePoint resource + * Lists diskRestorePoints under a vmRestorePoint. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection that the disk restore - * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name - * length is 80 characters. - * @param vmRestorePointName The name of the vm restore point that the disk disk restore point - * belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is - * 80 characters. - * @param diskRestorePointName The name of the disk restore point created. Supported characters for - * the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - get( + public listByRestorePoint( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, - diskRestorePointName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection that the disk restore - * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name - * length is 80 characters. - * @param vmRestorePointName The name of the vm restore point that the disk disk restore point - * belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is - * 80 characters. - * @param diskRestorePointName The name of the disk restore point created. Supported characters for - * the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param callback The callback - */ - get( + options?: DiskRestorePointOperationsListByRestorePointOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByRestorePointPagingAll( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByRestorePointPagingPage( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + options + ); + } + }; + } + + private async *listByRestorePointPagingPage( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, - diskRestorePointName: string, - callback: msRest.ServiceCallback - ): void; + options?: DiskRestorePointOperationsListByRestorePointOptionalParams + ): AsyncIterableIterator { + let result = await this._listByRestorePoint( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByRestorePointNext( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByRestorePointPagingAll( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + options?: DiskRestorePointOperationsListByRestorePointOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByRestorePointPagingPage( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + options + )) { + yield* page; + } + } + /** + * Get disk restorePoint resource * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection that the disk restore - * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name - * length is 80 characters. - * @param vmRestorePointName The name of the vm restore point that the disk disk restore point - * belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is - * 80 characters. - * @param diskRestorePointName The name of the disk restore point created. Supported characters for - * the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ get( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, diskRestorePointName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - restorePointCollectionName: string, - vmRestorePointName: string, - diskRestorePointName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: DiskRestorePointOperationsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -102,182 +154,395 @@ export class DiskRestorePointOperations { diskRestorePointName, options }, - getOperationSpec, - callback - ) as Promise; + getOperationSpec + ); } /** * Lists diskRestorePoints under a vmRestorePoint. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection that the disk restore - * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name - * length is 80 characters. - * @param vmRestorePointName The name of the vm restore point that the disk disk restore point - * belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is - * 80 characters. - * @param [options] The optional parameters - * @returns Promise + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - listByRestorePoint( + private _listByRestorePoint( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: DiskRestorePointOperationsListByRestorePointOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + options + }, + listByRestorePointOperationSpec + ); + } + /** + * Grants access to a diskRestorePoint. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection that the disk restore - * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name - * length is 80 characters. - * @param vmRestorePointName The name of the vm restore point that the disk disk restore point - * belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is - * 80 characters. - * @param callback The callback + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. */ - listByRestorePoint( + async beginGrantAccess( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, - callback: msRest.ServiceCallback - ): void; + diskRestorePointName: string, + grantAccessData: GrantAccessData, + options?: DiskRestorePointOperationsGrantAccessOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskRestorePointOperationsGrantAccessResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + diskRestorePointName, + grantAccessData, + options + }, + grantAccessOperationSpec, + "location" + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Grants access to a diskRestorePoint. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection that the disk restore - * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name - * length is 80 characters. - * @param vmRestorePointName The name of the vm restore point that the disk disk restore point - * belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is - * 80 characters. - * @param options The optional parameters - * @param callback The callback + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. */ - listByRestorePoint( + async beginGrantAccessAndWait( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByRestorePoint( + diskRestorePointName: string, + grantAccessData: GrantAccessData, + options?: DiskRestorePointOperationsGrantAccessOptionalParams + ): Promise { + const poller = await this.beginGrantAccess( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + diskRestorePointName, + grantAccessData, + options + ); + return poller.pollUntilDone(); + } + + /** + * Revokes access to a diskRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + async beginRevokeAccess( resourceGroupName: string, restorePointCollectionName: string, vmRestorePointName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + diskRestorePointName: string, + options?: DiskRestorePointOperationsRevokeAccessOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, restorePointCollectionName, vmRestorePointName, + diskRestorePointName, options }, - listByRestorePointOperationSpec, - callback - ) as Promise; + revokeAccessOperationSpec, + "location" + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Lists diskRestorePoints under a vmRestorePoint. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByRestorePointNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * Revokes access to a diskRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. */ - listByRestorePointNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + async beginRevokeAccessAndWait( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + diskRestorePointName: string, + options?: DiskRestorePointOperationsRevokeAccessOptionalParams + ): Promise { + const poller = await this.beginRevokeAccess( + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + diskRestorePointName, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByRestorePointNext + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param nextLink The nextLink from the previous successful call to the ListByRestorePoint method. + * @param options The options parameters. */ - listByRestorePointNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByRestorePointNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByRestorePointNext( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + nextLink: string, + options?: DiskRestorePointOperationsListByRestorePointNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { - nextPageLink, + resourceGroupName, + restorePointCollectionName, + vmRestorePointName, + nextLink, options }, - listByRestorePointNextOperationSpec, - callback - ) as Promise; + listByRestorePointNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiskRestorePoint + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.restorePointCollectionName, Parameters.vmRestorePointName, Parameters.diskRestorePointName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listByRestorePointOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DiskRestorePoint + bodyMapper: Mappers.DiskRestorePointList }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listByRestorePointOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints", + queryParameters: [Parameters.apiVersion2], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.restorePointCollectionName, Parameters.vmRestorePointName ], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const grantAccessOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.DiskRestorePointList + bodyMapper: Mappers.AccessUri + }, + 201: { + bodyMapper: Mappers.AccessUri + }, + 202: { + bodyMapper: Mappers.AccessUri + }, + 204: { + bodyMapper: Mappers.AccessUri }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.grantAccessData, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.restorePointCollectionName, + Parameters.vmRestorePointName, + Parameters.diskRestorePointName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByRestorePointNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], +const revokeAccessOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.restorePointCollectionName, + Parameters.vmRestorePointName, + Parameters.diskRestorePointName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByRestorePointNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskRestorePointList @@ -286,5 +551,15 @@ const listByRestorePointNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.restorePointCollectionName, + Parameters.vmRestorePointName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/disks.ts b/sdk/compute/arm-compute/src/operations/disks.ts index b1cf7a7f6776..80552b63a039 100644 --- a/sdk/compute/arm-compute/src/operations/disks.ts +++ b/sdk/compute/arm-compute/src/operations/disks.ts @@ -3,685 +3,858 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/disksMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Disks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + Disk, + DisksListByResourceGroupNextOptionalParams, + DisksListByResourceGroupOptionalParams, + DisksListNextOptionalParams, + DisksListOptionalParams, + DisksCreateOrUpdateOptionalParams, + DisksCreateOrUpdateResponse, + DiskUpdate, + DisksUpdateOptionalParams, + DisksUpdateResponse, + DisksGetOptionalParams, + DisksGetResponse, + DisksDeleteOptionalParams, + DisksListByResourceGroupResponse, + DisksListResponse, + GrantAccessData, + DisksGrantAccessOptionalParams, + DisksGrantAccessResponse, + DisksRevokeAccessOptionalParams, + DisksListByResourceGroupNextResponse, + DisksListNextResponse +} from "../models"; +/// /** Class representing a Disks. */ -export class Disks { +export class DisksImpl implements Disks { private readonly client: ComputeManagementClientContext; /** - * Create a Disks. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Disks class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } + /** + * Lists all the disks under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: DisksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: DisksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: DisksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists all the disks under a subscription. + * @param options The options parameters. + */ + public list( + options?: DisksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: DisksListOptionalParams + ): 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?: DisksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** * Creates or updates a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, diskName: string, - disk: Models.Disk, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate(resourceGroupName, diskName, disk, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + disk: Disk, + options?: DisksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DisksCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskName, disk, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Updates (patches) a disk. + * Creates or updates a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param disk Disk object supplied in the body of the Patch disk operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Put disk operation. + * @param options The options parameters. */ - update( + async beginCreateOrUpdateAndWait( resourceGroupName: string, diskName: string, - disk: Models.DiskUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate(resourceGroupName, diskName, disk, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + disk: Disk, + options?: DisksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + diskName, + disk, + options + ); + return poller.pollUntilDone(); } /** - * Gets information about a disk. + * Updates (patches) a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Patch disk operation. + * @param options The options parameters. */ - get( + async beginUpdate( resourceGroupName: string, diskName: string, - options?: msRest.RequestOptionsBase - ): Promise; + disk: DiskUpdate, + options?: DisksUpdateOptionalParams + ): Promise< + PollerLike, DisksUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskName, disk, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Updates (patches) a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param callback The callback + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Patch disk operation. + * @param options The options parameters. */ - get( + async beginUpdateAndWait( resourceGroupName: string, diskName: string, - callback: msRest.ServiceCallback - ): void; + disk: DiskUpdate, + options?: DisksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + diskName, + disk, + options + ); + return poller.pollUntilDone(); + } + /** + * Gets information about a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. */ get( resourceGroupName: string, diskName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - diskName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: DisksGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - diskName, - options - }, - getOperationSpec, - callback - ) as Promise; + { resourceGroupName, diskName, options }, + getOperationSpec + ); } /** * Deletes a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. */ - deleteMethod( + async beginDelete( resourceGroupName: string, diskName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, diskName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: DisksDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskName, options }, + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Lists all the disks under a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** + * Deletes a disk. * @param resourceGroupName The name of the resource group. - * @param callback The callback + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. */ - listByResourceGroup( + async beginDeleteAndWait( resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + diskName: string, + options?: DisksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, diskName, options); + return poller.pollUntilDone(); + } + /** + * Lists all the disks under a resource group. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByResourceGroup( + private _listByResourceGroup( resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: DisksListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback - ) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * Lists all the disks under a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback - ) as Promise; + private _list(options?: DisksListOptionalParams): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } /** * Grants access to a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - grantAccess( + async beginGrantAccess( resourceGroupName: string, diskName: string, - grantAccessData: Models.GrantAccessData, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginGrantAccess( - resourceGroupName, - diskName, - grantAccessData, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.DisksGrantAccessResponse - >; - } + grantAccessData: GrantAccessData, + options?: DisksGrantAccessOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DisksGrantAccessResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Revokes access to a disk. - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise - */ - revokeAccess( - resourceGroupName: string, - diskName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRevokeAccess(resourceGroupName, diskName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskName, grantAccessData, options }, + grantAccessOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Creates or updates a disk. + * Grants access to a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param disk Disk object supplied in the body of the Put disk operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. */ - beginCreateOrUpdate( + async beginGrantAccessAndWait( resourceGroupName: string, diskName: string, - disk: Models.Disk, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskName, - disk, - options - }, - beginCreateOrUpdateOperationSpec, + grantAccessData: GrantAccessData, + options?: DisksGrantAccessOptionalParams + ): Promise { + const poller = await this.beginGrantAccess( + resourceGroupName, + diskName, + grantAccessData, options ); + return poller.pollUntilDone(); } /** - * Updates (patches) a disk. + * Revokes access to a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param disk Disk object supplied in the body of the Patch disk operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. */ - beginUpdate( + async beginRevokeAccess( resourceGroupName: string, diskName: string, - disk: Models.DiskUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskName, - disk, - options - }, - beginUpdateOperationSpec, - options - ); - } + options?: DisksRevokeAccessOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Deletes a disk. - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod( - resourceGroupName: string, - diskName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskName, - options - }, - beginDeleteMethodOperationSpec, - options + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, diskName, options }, + revokeAccessOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Grants access to a disk. + * Revokes access to a disk. * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param grantAccessData Access data object supplied in the body of the get disk access operation. - * @param [options] The optional parameters - * @returns Promise + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. */ - beginGrantAccess( + async beginRevokeAccessAndWait( resourceGroupName: string, diskName: string, - grantAccessData: Models.GrantAccessData, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskName, - grantAccessData, - options - }, - beginGrantAccessOperationSpec, + options?: DisksRevokeAccessOptionalParams + ): Promise { + const poller = await this.beginRevokeAccess( + resourceGroupName, + diskName, options ); + return poller.pollUntilDone(); } /** - * Revokes access to a disk. + * ListByResourceGroupNext * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed - * after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * maximum name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - beginRevokeAccess( + private _listByResourceGroupNext( resourceGroupName: string, - diskName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - diskName, - options - }, - beginRevokeAccessOperationSpec, - options - ); - } - - /** - * Lists all the disks under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext( - 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 - */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + nextLink: string, + options?: DisksListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } /** - * Lists all the disks under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listNext( + nextLink: string, + options?: DisksListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.diskName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Disk }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.Disk + }, + 202: { + bodyMapper: Mappers.Disk + }, + 204: { + bodyMapper: Mappers.Disk } }, + requestBody: Parameters.disk, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.DiskList + bodyMapper: Mappers.Disk + }, + 201: { + bodyMapper: Mappers.Disk }, - default: { - bodyMapper: Mappers.CloudError + 202: { + bodyMapper: Mappers.Disk + }, + 204: { + bodyMapper: Mappers.Disk } }, + requestBody: Parameters.disk1, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { - bodyMapper: Mappers.DiskList - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.Disk } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const deleteOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.diskName], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "disk", - mapper: { - ...Mappers.Disk, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Disk - }, - 202: { - bodyMapper: Mappers.Disk - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskName + ], serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.diskName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "disk", - mapper: { - ...Mappers.DiskUpdate, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Disk - }, - 202: { - bodyMapper: Mappers.Disk - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.DiskList } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.diskName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.DiskList } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginGrantAccessOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const grantAccessOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.diskName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "grantAccessData", - mapper: { - ...Mappers.GrantAccessData, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.AccessUri }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.AccessUri + }, + 202: { + bodyMapper: Mappers.AccessUri + }, + 204: { + bodyMapper: Mappers.AccessUri } }, + requestBody: Parameters.grantAccessData, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginRevokeAccessOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const revokeAccessOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.diskName], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.diskName + ], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskList - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DiskList - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/galleries.ts b/sdk/compute/arm-compute/src/operations/galleries.ts index 2328f28c4569..85f35295f73d 100644 --- a/sdk/compute/arm-compute/src/operations/galleries.ts +++ b/sdk/compute/arm-compute/src/operations/galleries.ts @@ -3,513 +3,630 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/galleriesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Galleries } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + Gallery, + GalleriesListByResourceGroupNextOptionalParams, + GalleriesListByResourceGroupOptionalParams, + GalleriesListNextOptionalParams, + GalleriesListOptionalParams, + GalleriesCreateOrUpdateOptionalParams, + GalleriesCreateOrUpdateResponse, + GalleryUpdate, + GalleriesUpdateOptionalParams, + GalleriesUpdateResponse, + GalleriesGetOptionalParams, + GalleriesGetResponse, + GalleriesDeleteOptionalParams, + GalleriesListByResourceGroupResponse, + GalleriesListResponse, + GalleriesListByResourceGroupNextResponse, + GalleriesListNextResponse +} from "../models"; +/// /** Class representing a Galleries. */ -export class Galleries { +export class GalleriesImpl implements Galleries { private readonly client: ComputeManagementClientContext; /** - * Create a Galleries. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Galleries class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a Shared Image Gallery. + * List galleries under a resource group. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets - * and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Parameters supplied to the create or update Shared Image Gallery operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + public listByResourceGroup( resourceGroupName: string, - galleryName: string, - gallery: Models.Gallery, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: GalleriesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: GalleriesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: GalleriesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - galleryName, - gallery, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleriesCreateOrUpdateResponse - >; + )) { + yield* page; + } } /** - * Update a Shared Image Gallery. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets - * and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Parameters supplied to the update Shared Image Gallery operation. - * @param [options] The optional parameters - * @returns Promise + * List galleries under a subscription. + * @param options The options parameters. */ - update( - resourceGroupName: string, - galleryName: string, - gallery: Models.GalleryUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate(resourceGroupName, galleryName, gallery, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + public list( + options?: GalleriesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: GalleriesListOptionalParams + ): 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?: GalleriesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** - * Retrieves information about a Shared Image Gallery. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. - * @param [options] The optional parameters - * @returns Promise - */ - get( - resourceGroupName: string, - galleryName: string, - options?: Models.GalleriesGetOptionalParams - ): Promise; - /** + * Create or update a Shared Image Gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. - * @param callback The callback + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the create or update Shared Image Gallery operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdate( resourceGroupName: string, galleryName: string, - callback: msRest.ServiceCallback - ): void; + gallery: Gallery, + options?: GalleriesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleriesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, galleryName, gallery, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Create or update a Shared Image Gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the create or update Shared Image Gallery operation. + * @param options The options parameters. */ - get( - resourceGroupName: string, - galleryName: string, - options: Models.GalleriesGetOptionalParams, - callback: msRest.ServiceCallback - ): void; - get( + async beginCreateOrUpdateAndWait( resourceGroupName: string, galleryName: string, - options?: Models.GalleriesGetOptionalParams | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - galleryName, - options - }, - getOperationSpec, - callback - ) as Promise; + gallery: Gallery, + options?: GalleriesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + galleryName, + gallery, + options + ); + return poller.pollUntilDone(); } /** - * Delete a Shared Image Gallery. + * Update a Shared Image Gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the update Shared Image Gallery operation. + * @param options The options parameters. */ - deleteMethod( + async beginUpdate( resourceGroupName: string, galleryName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, galleryName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + gallery: GalleryUpdate, + options?: GalleriesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleriesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, galleryName, gallery, options }, + updateOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * List galleries under a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Update a Shared Image Gallery. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the update Shared Image Gallery operation. + * @param options The options parameters. */ - listByResourceGroup( + async beginUpdateAndWait( resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback - ) as Promise; - } - - /** - * List galleries under a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback - ) as Promise; + galleryName: string, + gallery: GalleryUpdate, + options?: GalleriesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + gallery, + options + ); + return poller.pollUntilDone(); } /** - * Create or update a Shared Image Gallery. + * Retrieves information about a Shared Image Gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets - * and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Parameters supplied to the create or update Shared Image Gallery operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Image Gallery. + * @param options The options parameters. */ - beginCreateOrUpdate( + get( resourceGroupName: string, galleryName: string, - gallery: Models.Gallery, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - gallery, - options - }, - beginCreateOrUpdateOperationSpec, - options + options?: GalleriesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, options }, + getOperationSpec ); } /** - * Update a Shared Image Gallery. + * Delete a Shared Image Gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets - * and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - * @param gallery Parameters supplied to the update Shared Image Gallery operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Image Gallery to be deleted. + * @param options The options parameters. */ - beginUpdate( + async beginDelete( resourceGroupName: string, galleryName: string, - gallery: Models.GalleryUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - gallery, - options - }, - beginUpdateOperationSpec, - options + options?: GalleriesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, galleryName, options }, + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** * Delete a Shared Image Gallery. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginDeleteAndWait( resourceGroupName: string, galleryName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - options - }, - beginDeleteMethodOperationSpec, + options?: GalleriesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, options ); + return poller.pollUntilDone(); } /** * List galleries under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext( - 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 + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: GalleriesListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** * List galleries under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + private _list( + options?: GalleriesListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: GalleriesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + /** - * @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?: GalleriesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3, Parameters.select], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Gallery }, + 201: { + bodyMapper: Mappers.Gallery + }, + 202: { + bodyMapper: Mappers.Gallery + }, + 204: { + bodyMapper: Mappers.Gallery + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.gallery, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.GalleryList + bodyMapper: Mappers.Gallery + }, + 201: { + bodyMapper: Mappers.Gallery + }, + 202: { + bodyMapper: Mappers.Gallery + }, + 204: { + bodyMapper: Mappers.Gallery }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.gallery1, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { - bodyMapper: Mappers.GalleryList + bodyMapper: Mappers.Gallery }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3, Parameters.select1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const deleteOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "gallery", - mapper: { - ...Mappers.Gallery, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.Gallery - }, - 201: { - bodyMapper: Mappers.Gallery - }, - 202: { - bodyMapper: Mappers.Gallery - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "gallery", - mapper: { - ...Mappers.GalleryUpdate, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Gallery + bodyMapper: Mappers.GalleryList }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.GalleryList + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryList @@ -518,16 +635,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryList @@ -536,5 +656,12 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts b/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts index 8e270dd24cc2..0432145526d6 100644 --- a/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts +++ b/sdk/compute/arm-compute/src/operations/galleryApplicationVersions.ts @@ -3,368 +3,446 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/galleryApplicationVersionsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { GalleryApplicationVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + GalleryApplicationVersion, + GalleryApplicationVersionsListByGalleryApplicationNextOptionalParams, + GalleryApplicationVersionsListByGalleryApplicationOptionalParams, + GalleryApplicationVersionsCreateOrUpdateOptionalParams, + GalleryApplicationVersionsCreateOrUpdateResponse, + GalleryApplicationVersionUpdate, + GalleryApplicationVersionsUpdateOptionalParams, + GalleryApplicationVersionsUpdateResponse, + GalleryApplicationVersionsGetOptionalParams, + GalleryApplicationVersionsGetResponse, + GalleryApplicationVersionsDeleteOptionalParams, + GalleryApplicationVersionsListByGalleryApplicationResponse, + GalleryApplicationVersionsListByGalleryApplicationNextResponse +} from "../models"; +/// /** Class representing a GalleryApplicationVersions. */ -export class GalleryApplicationVersions { +export class GalleryApplicationVersionsImpl + implements GalleryApplicationVersions { private readonly client: ComputeManagementClientContext; /** - * Create a GalleryApplicationVersions. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class GalleryApplicationVersions class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a gallery Application Version. + * List gallery Application Versions in a gallery Application Definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version is to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. - * Needs to follow semantic version name pattern: The allowed characters are digit and period. - * Digits must be within the range of a 32-bit integer. Format: - * .. - * @param galleryApplicationVersion Parameters supplied to the create or update gallery Application - * Version operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the Shared Application Gallery Application Definition from + * which the Application Versions are to be listed. + * @param options The options parameters. */ - createOrUpdate( + public listByGalleryApplication( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - galleryApplicationVersionName: string, - galleryApplicationVersion: Models.GalleryApplicationVersion, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByGalleryApplicationPagingAll( resourceGroupName, galleryName, galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryApplicationVersionsCreateOrUpdateResponse - >; + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByGalleryApplicationPagingPage( + resourceGroupName, + galleryName, + galleryApplicationName, + options + ); + } + }; } - /** - * Update a gallery Application Version. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version is to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. - * Needs to follow semantic version name pattern: The allowed characters are digit and period. - * Digits must be within the range of a 32-bit integer. Format: - * .. - * @param galleryApplicationVersion Parameters supplied to the update gallery Application Version - * operation. - * @param [options] The optional parameters - * @returns Promise - */ - update( + private async *listByGalleryApplicationPagingPage( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - galleryApplicationVersionName: string, - galleryApplicationVersion: Models.GalleryApplicationVersionUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams + ): AsyncIterableIterator { + let result = await this._listByGalleryApplication( resourceGroupName, galleryName, galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryApplicationVersionsUpdateResponse - >; + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByGalleryApplicationNext( + resourceGroupName, + galleryName, + galleryApplicationName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Retrieves information about a gallery Application Version. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be - * retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - get( + private async *listByGalleryApplicationPagingAll( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - galleryApplicationVersionName: string, - options?: Models.GalleryApplicationVersionsGetOptionalParams - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be - * retrieved. - * @param callback The callback - */ - get( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - galleryApplicationVersionName: string, - callback: msRest.ServiceCallback - ): void; + options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByGalleryApplicationPagingPage( + resourceGroupName, + galleryName, + galleryApplicationName, + options + )) { + yield* page; + } + } + /** + * Create or update a gallery Application Version. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be - * retrieved. - * @param options The optional parameters - * @param callback The callback + * Application Version is to be created. + * @param galleryApplicationVersionName The name of the gallery Application Version to be created. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the create or update gallery Application + * Version operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdate( resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, - options: Models.GalleryApplicationVersionsGetOptionalParams, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - galleryApplicationVersionName: string, - options?: - | Models.GalleryApplicationVersionsGetOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryApplicationVersion: GalleryApplicationVersion, + options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationVersionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, + galleryApplicationVersion, options }, - getOperationSpec, - callback - ) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Delete a gallery Application Version. + * Create or update a gallery Application Version. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version resides. - * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @param [options] The optional parameters - * @returns Promise + * Application Version is to be created. + * @param galleryApplicationVersionName The name of the gallery Application Version to be created. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the create or update gallery Application + * Version operation. + * @param options The options parameters. */ - deleteMethod( + async beginCreateOrUpdateAndWait( resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + galleryApplicationVersion: GalleryApplicationVersion, + options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, + galleryApplicationVersion, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * List gallery Application Versions in a gallery Application Definition. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the Shared Application Gallery Application Definition - * from which the Application Versions are to be listed. - * @param [options] The optional parameters - * @returns Promise - */ - listByGalleryApplication( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the Shared Application Gallery Application Definition - * from which the Application Versions are to be listed. - * @param callback The callback - */ - listByGalleryApplication( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Update a gallery Application Version. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. - * @param galleryApplicationName The name of the Shared Application Gallery Application Definition - * from which the Application Versions are to be listed. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version is to be updated. + * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the update gallery Application Version + * operation. + * @param options The options parameters. */ - listByGalleryApplication( + async beginUpdate( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGalleryApplication( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryApplicationVersionName: string, + galleryApplicationVersion: GalleryApplicationVersionUpdate, + options?: GalleryApplicationVersionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationVersionsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, galleryApplicationName, + galleryApplicationVersionName, + galleryApplicationVersion, options }, - listByGalleryApplicationOperationSpec, - callback - ) as Promise; + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Create or update a gallery Application Version. + * Update a gallery Application Version. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version is to be created. - * @param galleryApplicationVersionName The name of the gallery Application Version to be created. - * Needs to follow semantic version name pattern: The allowed characters are digit and period. - * Digits must be within the range of a 32-bit integer. Format: - * .. - * @param galleryApplicationVersion Parameters supplied to the create or update gallery Application - * Version operation. - * @param [options] The optional parameters - * @returns Promise + * Application Version is to be updated. + * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the update gallery Application Version + * operation. + * @param options The options parameters. */ - beginCreateOrUpdate( + async beginUpdateAndWait( resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, - galleryApplicationVersion: Models.GalleryApplicationVersion, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplicationVersionName, - galleryApplicationVersion, - options - }, - beginCreateOrUpdateOperationSpec, + galleryApplicationVersion: GalleryApplicationVersionUpdate, + options?: GalleryApplicationVersionsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + galleryApplicationName, + galleryApplicationVersionName, + galleryApplicationVersion, options ); + return poller.pollUntilDone(); } /** - * Update a gallery Application Version. + * Retrieves information about a gallery Application Version. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version is to be updated. - * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. - * Needs to follow semantic version name pattern: The allowed characters are digit and period. - * Digits must be within the range of a 32-bit integer. Format: - * .. - * @param galleryApplicationVersion Parameters supplied to the update gallery Application Version - * operation. - * @param [options] The optional parameters - * @returns Promise + * Application Version resides. + * @param galleryApplicationVersionName The name of the gallery Application Version to be retrieved. + * @param options The options parameters. */ - beginUpdate( + get( resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, - galleryApplicationVersion: Models.GalleryApplicationVersionUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( + options?: GalleryApplicationVersionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( { resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, - galleryApplicationVersion, options }, - beginUpdateOperationSpec, - options + getOperationSpec ); } /** * Delete a gallery Application Version. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition resides. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. * @param galleryApplicationName The name of the gallery Application Definition in which the - * Application Version resides. + * Application Version resides. * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginDelete( resourceGroupName: string, galleryName: string, galleryApplicationName: string, galleryApplicationVersionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( + options?: GalleryApplicationVersionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, @@ -372,126 +450,131 @@ export class GalleryApplicationVersions { galleryApplicationVersionName, options }, - beginDeleteMethodOperationSpec, - options + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * List gallery Application Versions in a gallery Application Definition. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * Delete a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version resides. + * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. + * @param options The options parameters. */ - listByGalleryApplicationNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + async beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + options?: GalleryApplicationVersionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, + galleryApplicationName, + galleryApplicationVersionName, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * List gallery Application Versions in a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the Shared Application Gallery Application Definition from + * which the Application Versions are to be listed. + * @param options The options parameters. */ - listByGalleryApplicationNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + private _listByGalleryApplication( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, galleryApplicationName, options }, + listByGalleryApplicationOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByGalleryApplicationNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the Shared Application Gallery Application Definition from + * which the Application Versions are to be listed. + * @param nextLink The nextLink from the previous successful call to the ListByGalleryApplication + * method. + * @param options The options parameters. */ - listByGalleryApplicationNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGalleryApplicationNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByGalleryApplicationNext( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + nextLink: string, + options?: GalleryApplicationVersionsListByGalleryApplicationNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { - nextPageLink, + resourceGroupName, + galleryName, + galleryApplicationName, + nextLink, options }, - listByGalleryApplicationNextOperationSpec, - callback - ) as Promise; + listByGalleryApplicationNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.galleryName, - Parameters.galleryApplicationName, - Parameters.galleryApplicationVersionName - ], - queryParameters: [Parameters.expand0, Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.GalleryApplicationVersion }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByGalleryApplicationOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.galleryName, - Parameters.galleryApplicationName - ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.GalleryApplicationVersionList + 201: { + bodyMapper: Mappers.GalleryApplicationVersion + }, + 202: { + bodyMapper: Mappers.GalleryApplicationVersion + }, + 204: { + bodyMapper: Mappers.GalleryApplicationVersion }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + requestBody: Parameters.galleryApplicationVersion, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryApplicationName, Parameters.galleryApplicationVersionName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryApplicationVersion", - mapper: { - ...Mappers.GalleryApplicationVersion, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.GalleryApplicationVersion @@ -502,33 +585,31 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 202: { bodyMapper: Mappers.GalleryApplicationVersion }, + 204: { + bodyMapper: Mappers.GalleryApplicationVersion + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + requestBody: Parameters.galleryApplicationVersion1, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryApplicationName, Parameters.galleryApplicationVersionName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryApplicationVersion", - mapper: { - ...Mappers.GalleryApplicationVersionUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryApplicationVersion @@ -537,40 +618,69 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + queryParameters: [Parameters.apiVersion3, Parameters.expand4], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryApplicationName, Parameters.galleryApplicationVersionName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName, + Parameters.galleryApplicationName, + Parameters.galleryApplicationVersionName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByGalleryApplicationNextOperationSpec: msRest.OperationSpec = { +const listByGalleryApplicationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], + responses: { + 200: { + bodyMapper: Mappers.GalleryApplicationVersionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName, + Parameters.galleryApplicationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByGalleryApplicationNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryApplicationVersionList @@ -579,5 +689,15 @@ const listByGalleryApplicationNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.galleryName, + Parameters.galleryApplicationName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/galleryApplications.ts b/sdk/compute/arm-compute/src/operations/galleryApplications.ts index 5f097d15483b..ab702ce73cfc 100644 --- a/sdk/compute/arm-compute/src/operations/galleryApplications.ts +++ b/sdk/compute/arm-compute/src/operations/galleryApplications.ts @@ -3,427 +3,511 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/galleryApplicationsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { GalleryApplications } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + GalleryApplication, + GalleryApplicationsListByGalleryNextOptionalParams, + GalleryApplicationsListByGalleryOptionalParams, + GalleryApplicationsCreateOrUpdateOptionalParams, + GalleryApplicationsCreateOrUpdateResponse, + GalleryApplicationUpdate, + GalleryApplicationsUpdateOptionalParams, + GalleryApplicationsUpdateResponse, + GalleryApplicationsGetOptionalParams, + GalleryApplicationsGetResponse, + GalleryApplicationsDeleteOptionalParams, + GalleryApplicationsListByGalleryResponse, + GalleryApplicationsListByGalleryNextResponse +} from "../models"; +/// /** Class representing a GalleryApplications. */ -export class GalleryApplications { +export class GalleryApplicationsImpl implements GalleryApplications { private readonly client: ComputeManagementClientContext; /** - * Create a GalleryApplications. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class GalleryApplications class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a gallery Application Definition. + * List gallery Application Definitions in a gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition is to be created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or - * updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed - * in the middle. The maximum length is 80 characters. - * @param galleryApplication Parameters supplied to the create or update gallery Application - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Application Gallery from which Application Definitions are + * to be listed. + * @param options The options parameters. */ - createOrUpdate( + public listByGallery( resourceGroupName: string, galleryName: string, - galleryApplicationName: string, - galleryApplication: Models.GalleryApplication, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: GalleryApplicationsListByGalleryOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByGalleryPagingAll( resourceGroupName, galleryName, - galleryApplicationName, - galleryApplication, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryApplicationsCreateOrUpdateResponse - >; + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByGalleryPagingPage( + resourceGroupName, + galleryName, + options + ); + } + }; } - /** - * Update a gallery Application Definition. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition is to be updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the - * middle. The maximum length is 80 characters. - * @param galleryApplication Parameters supplied to the update gallery Application operation. - * @param [options] The optional parameters - * @returns Promise - */ - update( + private async *listByGalleryPagingPage( resourceGroupName: string, galleryName: string, - galleryApplicationName: string, - galleryApplication: Models.GalleryApplicationUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + options?: GalleryApplicationsListByGalleryOptionalParams + ): AsyncIterableIterator { + let result = await this._listByGallery( resourceGroupName, galleryName, - galleryApplicationName, - galleryApplication, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryApplicationsUpdateResponse - >; + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByGalleryNext( + resourceGroupName, + galleryName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Retrieves information about a gallery Application Definition. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery from which the Application - * Definitions are to be retrieved. - * @param galleryApplicationName The name of the gallery Application Definition to be retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - get( + private async *listByGalleryPagingAll( resourceGroupName: string, galleryName: string, - galleryApplicationName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery from which the Application - * Definitions are to be retrieved. - * @param galleryApplicationName The name of the gallery Application Definition to be retrieved. - * @param callback The callback - */ - get( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - callback: msRest.ServiceCallback - ): void; + options?: GalleryApplicationsListByGalleryOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByGalleryPagingPage( + resourceGroupName, + galleryName, + options + )) { + yield* page; + } + } + /** + * Create or update a gallery Application Definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery from which the Application - * Definitions are to be retrieved. - * @param galleryApplicationName The name of the gallery Application Definition to be retrieved. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be created. + * @param galleryApplicationName The name of the gallery Application Definition to be created or + * updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in + * the middle. The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the create or update gallery Application operation. + * @param options The options parameters. */ - get( - resourceGroupName: string, - galleryName: string, - galleryApplicationName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( + async beginCreateOrUpdate( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryApplication: GalleryApplication, + options?: GalleryApplicationsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, galleryApplicationName, + galleryApplication, options }, - getOperationSpec, - callback - ) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Delete a gallery Application. + * Create or update a gallery Application Definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition is to be deleted. - * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be created. + * @param galleryApplicationName The name of the gallery Application Definition to be created or + * updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in + * the middle. The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the create or update gallery Application operation. + * @param options The options parameters. */ - deleteMethod( + async beginCreateOrUpdateAndWait( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + galleryApplication: GalleryApplication, + options?: GalleryApplicationsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, galleryName, galleryApplicationName, + galleryApplication, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * List gallery Application Definitions in a gallery. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery from which Application Definitions - * are to be listed. - * @param [options] The optional parameters - * @returns Promise - */ - listByGallery( - resourceGroupName: string, - galleryName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery from which Application Definitions - * are to be listed. - * @param callback The callback - */ - listByGallery( - resourceGroupName: string, - galleryName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Update a gallery Application Definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery from which Application Definitions - * are to be listed. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be updated. + * @param galleryApplicationName The name of the gallery Application Definition to be updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the update gallery Application operation. + * @param options The options parameters. */ - listByGallery( - resourceGroupName: string, - galleryName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGallery( + async beginUpdate( resourceGroupName: string, galleryName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryApplicationName: string, + galleryApplication: GalleryApplicationUpdate, + options?: GalleryApplicationsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, + galleryApplicationName, + galleryApplication, options }, - listByGalleryOperationSpec, - callback - ) as Promise; + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Create or update a gallery Application Definition. + * Update a gallery Application Definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition is to be created. - * @param galleryApplicationName The name of the gallery Application Definition to be created or - * updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed - * in the middle. The maximum length is 80 characters. - * @param galleryApplication Parameters supplied to the create or update gallery Application - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be updated. + * @param galleryApplicationName The name of the gallery Application Definition to be updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the update gallery Application operation. + * @param options The options parameters. */ - beginCreateOrUpdate( + async beginUpdateAndWait( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - galleryApplication: Models.GalleryApplication, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplication, - options - }, - beginCreateOrUpdateOperationSpec, + galleryApplication: GalleryApplicationUpdate, + options?: GalleryApplicationsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + galleryApplicationName, + galleryApplication, options ); + return poller.pollUntilDone(); } /** - * Update a gallery Application Definition. + * Retrieves information about a gallery Application Definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition is to be updated. - * @param galleryApplicationName The name of the gallery Application Definition to be updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the - * middle. The maximum length is 80 characters. - * @param galleryApplication Parameters supplied to the update gallery Application operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Application Gallery from which the Application Definitions + * are to be retrieved. + * @param galleryApplicationName The name of the gallery Application Definition to be retrieved. + * @param options The options parameters. */ - beginUpdate( + get( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - galleryApplication: Models.GalleryApplicationUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryApplicationName, - galleryApplication, - options - }, - beginUpdateOperationSpec, - options + options?: GalleryApplicationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, galleryApplicationName, options }, + getOperationSpec ); } /** * Delete a gallery Application. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Application Gallery in which the Application - * Definition is to be deleted. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be deleted. * @param galleryApplicationName The name of the gallery Application Definition to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginDelete( resourceGroupName: string, galleryName: string, galleryApplicationName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryApplicationName, - options - }, - beginDeleteMethodOperationSpec, - options + options?: GalleryApplicationsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, galleryName, galleryApplicationName, options }, + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * List gallery Application Definitions in a gallery. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * Delete a gallery Application. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be deleted. + * @param galleryApplicationName The name of the gallery Application Definition to be deleted. + * @param options The options parameters. */ - listByGalleryNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; + async beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + options?: GalleryApplicationsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, + galleryApplicationName, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * List gallery Application Definitions in a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery from which Application Definitions are + * to be listed. + * @param options The options parameters. */ - listByGalleryNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + private _listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryApplicationsListByGalleryOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, options }, + listByGalleryOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByGalleryNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery from which Application Definitions are + * to be listed. + * @param nextLink The nextLink from the previous successful call to the ListByGallery method. + * @param options The options parameters. */ - listByGalleryNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGalleryNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByGalleryNext( + resourceGroupName: string, + galleryName: string, + nextLink: string, + options?: GalleryApplicationsListByGalleryNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByGalleryNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, galleryName, nextLink, options }, + listByGalleryNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.galleryName, - Parameters.galleryApplicationName - ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.GalleryApplication }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByGalleryOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.GalleryApplicationList + 201: { + bodyMapper: Mappers.GalleryApplication + }, + 202: { + bodyMapper: Mappers.GalleryApplication + }, + 204: { + bodyMapper: Mappers.GalleryApplication }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + requestBody: Parameters.galleryApplication, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryApplicationName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryApplication", - mapper: { - ...Mappers.GalleryApplication, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.GalleryApplication @@ -434,32 +518,30 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 202: { bodyMapper: Mappers.GalleryApplication }, + 204: { + bodyMapper: Mappers.GalleryApplication + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + requestBody: Parameters.galleryApplication1, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryApplicationName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryApplication", - mapper: { - ...Mappers.GalleryApplicationUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryApplication @@ -468,39 +550,66 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryApplicationName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName, + Parameters.galleryApplicationName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByGalleryNextOperationSpec: msRest.OperationSpec = { +const listByGalleryOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications", httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], + responses: { + 200: { + bodyMapper: Mappers.GalleryApplicationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByGalleryNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryApplicationList @@ -509,5 +618,14 @@ const listByGalleryNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.galleryName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts b/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts index 850d3961b245..84a5b474eeb2 100644 --- a/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts +++ b/sdk/compute/arm-compute/src/operations/galleryImageVersions.ts @@ -3,470 +3,555 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/galleryImageVersionsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { GalleryImageVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + GalleryImageVersion, + GalleryImageVersionsListByGalleryImageNextOptionalParams, + GalleryImageVersionsListByGalleryImageOptionalParams, + GalleryImageVersionsCreateOrUpdateOptionalParams, + GalleryImageVersionsCreateOrUpdateResponse, + GalleryImageVersionUpdate, + GalleryImageVersionsUpdateOptionalParams, + GalleryImageVersionsUpdateResponse, + GalleryImageVersionsGetOptionalParams, + GalleryImageVersionsGetResponse, + GalleryImageVersionsDeleteOptionalParams, + GalleryImageVersionsListByGalleryImageResponse, + GalleryImageVersionsListByGalleryImageNextResponse +} from "../models"; +/// /** Class representing a GalleryImageVersions. */ -export class GalleryImageVersions { +export class GalleryImageVersionsImpl implements GalleryImageVersions { private readonly client: ComputeManagementClientContext; /** - * Create a GalleryImageVersions. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class GalleryImageVersions class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a gallery image version. + * List gallery image versions in a gallery image definition. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version is - * to be created. - * @param galleryImageVersionName The name of the gallery image version to be created. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param galleryImageVersion Parameters supplied to the create or update gallery image version - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the Image + * Versions are to be listed. + * @param options The options parameters. */ - createOrUpdate( + public listByGalleryImage( resourceGroupName: string, galleryName: string, galleryImageName: string, - galleryImageVersionName: string, - galleryImageVersion: Models.GalleryImageVersion, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: GalleryImageVersionsListByGalleryImageOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByGalleryImagePagingAll( resourceGroupName, galleryName, galleryImageName, - galleryImageVersionName, - galleryImageVersion, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryImageVersionsCreateOrUpdateResponse - >; + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByGalleryImagePagingPage( + resourceGroupName, + galleryName, + galleryImageName, + options + ); + } + }; } - /** - * Update a gallery image version. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version is - * to be updated. - * @param galleryImageVersionName The name of the gallery image version to be updated. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param galleryImageVersion Parameters supplied to the update gallery image version operation. - * @param [options] The optional parameters - * @returns Promise - */ - update( + private async *listByGalleryImagePagingPage( resourceGroupName: string, galleryName: string, galleryImageName: string, - galleryImageVersionName: string, - galleryImageVersion: Models.GalleryImageVersionUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + options?: GalleryImageVersionsListByGalleryImageOptionalParams + ): AsyncIterableIterator { + let result = await this._listByGalleryImage( resourceGroupName, galleryName, galleryImageName, - galleryImageVersionName, - galleryImageVersion, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryImageVersionsUpdateResponse - >; + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByGalleryImageNext( + resourceGroupName, + galleryName, + galleryImageName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Retrieves information about a gallery image version. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version - * resides. - * @param galleryImageVersionName The name of the gallery image version to be retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - get( - resourceGroupName: string, - galleryName: string, - galleryImageName: string, - galleryImageVersionName: string, - options?: Models.GalleryImageVersionsGetOptionalParams - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version - * resides. - * @param galleryImageVersionName The name of the gallery image version to be retrieved. - * @param callback The callback - */ - get( + private async *listByGalleryImagePagingAll( resourceGroupName: string, galleryName: string, galleryImageName: string, - galleryImageVersionName: string, - callback: msRest.ServiceCallback - ): void; + options?: GalleryImageVersionsListByGalleryImageOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByGalleryImagePagingPage( + resourceGroupName, + galleryName, + galleryImageName, + options + )) { + yield* page; + } + } + /** + * Create or update a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version - * resides. - * @param galleryImageVersionName The name of the gallery image version to be retrieved. - * @param options The optional parameters - * @param callback The callback + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * created. + * @param galleryImageVersionName The name of the gallery image version to be created. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version + * operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdate( resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, - options: Models.GalleryImageVersionsGetOptionalParams, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - galleryName: string, - galleryImageName: string, - galleryImageVersionName: string, - options?: - | Models.GalleryImageVersionsGetOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryImageVersion: GalleryImageVersion, + options?: GalleryImageVersionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImageVersionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, + galleryImageVersion, options }, - getOperationSpec, - callback - ) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Delete a gallery image version. + * Create or update a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version - * resides. - * @param galleryImageVersionName The name of the gallery image version to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * created. + * @param galleryImageVersionName The name of the gallery image version to be created. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version + * operation. + * @param options The options parameters. */ - deleteMethod( + async beginCreateOrUpdateAndWait( resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + galleryImageVersion: GalleryImageVersion, + options?: GalleryImageVersionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, + galleryImageVersion, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * List gallery image versions in a gallery image definition. + * Update a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the - * Image Versions are to be listed. - * @param [options] The optional parameters - * @returns Promise + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * updated. + * @param galleryImageVersionName The name of the gallery image version to be updated. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the update gallery image version operation. + * @param options The options parameters. */ - listByGalleryImage( + async beginUpdate( resourceGroupName: string, galleryName: string, galleryImageName: string, - options?: msRest.RequestOptionsBase - ): Promise; + galleryImageVersionName: string, + galleryImageVersion: GalleryImageVersionUpdate, + options?: GalleryImageVersionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImageVersionsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + options + }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Update a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the - * Image Versions are to be listed. - * @param callback The callback + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * updated. + * @param galleryImageVersionName The name of the gallery image version to be updated. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the update gallery image version operation. + * @param options The options parameters. */ - listByGalleryImage( + async beginUpdateAndWait( resourceGroupName: string, galleryName: string, galleryImageName: string, - callback: msRest.ServiceCallback - ): void; + galleryImageVersionName: string, + galleryImageVersion: GalleryImageVersionUpdate, + options?: GalleryImageVersionsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, + galleryImageVersion, + options + ); + return poller.pollUntilDone(); + } + /** + * Retrieves information about a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the - * Image Versions are to be listed. - * @param options The optional parameters - * @param callback The callback + * @param galleryImageName The name of the gallery image definition in which the Image Version resides. + * @param galleryImageVersionName The name of the gallery image version to be retrieved. + * @param options The options parameters. */ - listByGalleryImage( - resourceGroupName: string, - galleryName: string, - galleryImageName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGalleryImage( + get( resourceGroupName: string, galleryName: string, galleryImageName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + galleryImageVersionName: string, + options?: GalleryImageVersionsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, galleryName, galleryImageName, + galleryImageVersionName, options }, - listByGalleryImageOperationSpec, - callback - ) as Promise; + getOperationSpec + ); } /** - * Create or update a gallery image version. + * Delete a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version is - * to be created. - * @param galleryImageVersionName The name of the gallery image version to be created. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param galleryImageVersion Parameters supplied to the create or update gallery image version - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryImageName The name of the gallery image definition in which the Image Version resides. + * @param galleryImageVersionName The name of the gallery image version to be deleted. + * @param options The options parameters. */ - beginCreateOrUpdate( + async beginDelete( resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, - galleryImageVersion: Models.GalleryImageVersion, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( + options?: GalleryImageVersionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, - galleryImageVersion, options }, - beginCreateOrUpdateOperationSpec, - options + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Update a gallery image version. + * Delete a gallery image version. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version is - * to be updated. - * @param galleryImageVersionName The name of the gallery image version to be updated. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param galleryImageVersion Parameters supplied to the update gallery image version operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryImageName The name of the gallery image definition in which the Image Version resides. + * @param galleryImageVersionName The name of the gallery image version to be deleted. + * @param options The options parameters. */ - beginUpdate( + async beginDeleteAndWait( resourceGroupName: string, galleryName: string, galleryImageName: string, galleryImageVersionName: string, - galleryImageVersion: Models.GalleryImageVersionUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - galleryImageVersion, - options - }, - beginUpdateOperationSpec, + options?: GalleryImageVersionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, + galleryImageName, + galleryImageVersionName, options ); + return poller.pollUntilDone(); } /** - * Delete a gallery image version. + * List gallery image versions in a gallery image definition. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. - * @param galleryImageName The name of the gallery image definition in which the Image Version - * resides. - * @param galleryImageVersionName The name of the gallery image version to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the Image + * Versions are to be listed. + * @param options The options parameters. */ - beginDeleteMethod( + private _listByGalleryImage( resourceGroupName: string, galleryName: string, galleryImageName: string, - galleryImageVersionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryImageName, - galleryImageVersionName, - options - }, - beginDeleteMethodOperationSpec, - options + options?: GalleryImageVersionsListByGalleryImageOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, galleryImageName, options }, + listByGalleryImageOperationSpec ); } /** - * List gallery image versions in a gallery image definition. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByGalleryImageNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByGalleryImageNext( - 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 + * ListByGalleryImageNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the Image + * Versions are to be listed. + * @param nextLink The nextLink from the previous successful call to the ListByGalleryImage method. + * @param options The options parameters. */ - listByGalleryImageNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGalleryImageNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByGalleryImageNext( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + nextLink: string, + options?: GalleryImageVersionsListByGalleryImageNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByGalleryImageNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, galleryName, galleryImageName, nextLink, options }, + listByGalleryImageNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.galleryName, - Parameters.galleryImageName, - Parameters.galleryImageVersionName - ], - queryParameters: [Parameters.expand0, Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.GalleryImageVersion }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByGalleryImageOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.galleryName, - Parameters.galleryImageName - ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.GalleryImageVersionList + 201: { + bodyMapper: Mappers.GalleryImageVersion + }, + 202: { + bodyMapper: Mappers.GalleryImageVersion + }, + 204: { + bodyMapper: Mappers.GalleryImageVersion }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + requestBody: Parameters.galleryImageVersion, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryImageName, Parameters.galleryImageVersionName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryImageVersion", - mapper: { - ...Mappers.GalleryImageVersion, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.GalleryImageVersion @@ -477,33 +562,31 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 202: { bodyMapper: Mappers.GalleryImageVersion }, + 204: { + bodyMapper: Mappers.GalleryImageVersion + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + requestBody: Parameters.galleryImageVersion1, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryImageName, Parameters.galleryImageVersionName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryImageVersion", - mapper: { - ...Mappers.GalleryImageVersionUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryImageVersion @@ -512,40 +595,69 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + queryParameters: [Parameters.apiVersion3, Parameters.expand4], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryImageName, Parameters.galleryImageVersionName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName, + Parameters.galleryImageName, + Parameters.galleryImageVersionName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByGalleryImageNextOperationSpec: msRest.OperationSpec = { +const listByGalleryImageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], + responses: { + 200: { + bodyMapper: Mappers.GalleryImageVersionList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName, + Parameters.galleryImageName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByGalleryImageNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryImageVersionList @@ -554,5 +666,15 @@ const listByGalleryImageNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.galleryName, + Parameters.galleryImageName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/galleryImages.ts b/sdk/compute/arm-compute/src/operations/galleryImages.ts index 80fe688c6874..eda2dd24547a 100644 --- a/sdk/compute/arm-compute/src/operations/galleryImages.ts +++ b/sdk/compute/arm-compute/src/operations/galleryImages.ts @@ -3,425 +3,511 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/galleryImagesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { GalleryImages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + GalleryImage, + GalleryImagesListByGalleryNextOptionalParams, + GalleryImagesListByGalleryOptionalParams, + GalleryImagesCreateOrUpdateOptionalParams, + GalleryImagesCreateOrUpdateResponse, + GalleryImageUpdate, + GalleryImagesUpdateOptionalParams, + GalleryImagesUpdateResponse, + GalleryImagesGetOptionalParams, + GalleryImagesGetResponse, + GalleryImagesDeleteOptionalParams, + GalleryImagesListByGalleryResponse, + GalleryImagesListByGalleryNextResponse +} from "../models"; +/// /** Class representing a GalleryImages. */ -export class GalleryImages { +export class GalleryImagesImpl implements GalleryImages { private readonly client: ComputeManagementClientContext; /** - * Create a GalleryImages. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class GalleryImages class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a gallery image definition. + * List gallery image definitions in a gallery. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be - * created. - * @param galleryImageName The name of the gallery image definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the - * middle. The maximum length is 80 characters. - * @param galleryImage Parameters supplied to the create or update gallery image operation. - * @param [options] The optional parameters - * @returns Promise + * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be + * listed. + * @param options The options parameters. */ - createOrUpdate( + public listByGallery( resourceGroupName: string, galleryName: string, - galleryImageName: string, - galleryImage: Models.GalleryImage, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: GalleryImagesListByGalleryOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByGalleryPagingAll( resourceGroupName, galleryName, - galleryImageName, - galleryImage, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryImagesCreateOrUpdateResponse - >; + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByGalleryPagingPage( + resourceGroupName, + galleryName, + options + ); + } + }; } - /** - * Update a gallery image definition. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be - * updated. - * @param galleryImageName The name of the gallery image definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryImage Parameters supplied to the update gallery image operation. - * @param [options] The optional parameters - * @returns Promise - */ - update( + private async *listByGalleryPagingPage( resourceGroupName: string, galleryName: string, - galleryImageName: string, - galleryImage: Models.GalleryImageUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + options?: GalleryImagesListByGalleryOptionalParams + ): AsyncIterableIterator { + let result = await this._listByGallery( resourceGroupName, galleryName, - galleryImageName, - galleryImage, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GalleryImagesUpdateResponse - >; + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByGalleryNext( + resourceGroupName, + galleryName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Retrieves information about a gallery image definition. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to - * be retrieved. - * @param galleryImageName The name of the gallery image definition to be retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - get( + private async *listByGalleryPagingAll( resourceGroupName: string, galleryName: string, - galleryImageName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to - * be retrieved. - * @param galleryImageName The name of the gallery image definition to be retrieved. - * @param callback The callback - */ - get( - resourceGroupName: string, - galleryName: string, - galleryImageName: string, - callback: msRest.ServiceCallback - ): void; + options?: GalleryImagesListByGalleryOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByGalleryPagingPage( + resourceGroupName, + galleryName, + options + )) { + yield* page; + } + } + /** + * Create or update a gallery image definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to - * be retrieved. - * @param galleryImageName The name of the gallery image definition to be retrieved. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * created. + * @param galleryImageName The name of the gallery image definition to be created or updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdate( resourceGroupName: string, galleryName: string, galleryImageName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - galleryName: string, - galleryImageName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryImage: GalleryImage, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImagesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, galleryImageName, + galleryImage, options }, - getOperationSpec, - callback - ) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Delete a gallery image. + * Create or update a gallery image definition. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be - * deleted. - * @param galleryImageName The name of the gallery image definition to be deleted. - * @param [options] The optional parameters - * @returns Promise + * created. + * @param galleryImageName The name of the gallery image definition to be created or updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param options The options parameters. */ - deleteMethod( + async beginCreateOrUpdateAndWait( resourceGroupName: string, galleryName: string, galleryImageName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + galleryImage: GalleryImage, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, galleryName, galleryImageName, + galleryImage, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * List gallery image definitions in a gallery. - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be - * listed. - * @param [options] The optional parameters - * @returns Promise - */ - listByGallery( - resourceGroupName: string, - galleryName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be - * listed. - * @param callback The callback - */ - listByGallery( - resourceGroupName: string, - galleryName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Update a gallery image definition. * @param resourceGroupName The name of the resource group. - * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be - * listed. - * @param options The optional parameters - * @param callback The callback + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * updated. + * @param galleryImageName The name of the gallery image definition to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryImage Parameters supplied to the update gallery image operation. + * @param options The options parameters. */ - listByGallery( - resourceGroupName: string, - galleryName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGallery( + async beginUpdate( resourceGroupName: string, galleryName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + galleryImageName: string, + galleryImage: GalleryImageUpdate, + options?: GalleryImagesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImagesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, galleryName, + galleryImageName, + galleryImage, options }, - listByGalleryOperationSpec, - callback - ) as Promise; + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Create or update a gallery image definition. + * Update a gallery image definition. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be - * created. - * @param galleryImageName The name of the gallery image definition to be created or updated. The - * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the - * middle. The maximum length is 80 characters. - * @param galleryImage Parameters supplied to the create or update gallery image operation. - * @param [options] The optional parameters - * @returns Promise + * updated. + * @param galleryImageName The name of the gallery image definition to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryImage Parameters supplied to the update gallery image operation. + * @param options The options parameters. */ - beginCreateOrUpdate( + async beginUpdateAndWait( resourceGroupName: string, galleryName: string, galleryImageName: string, - galleryImage: Models.GalleryImage, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryImageName, - galleryImage, - options - }, - beginCreateOrUpdateOperationSpec, + galleryImage: GalleryImageUpdate, + options?: GalleryImagesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + galleryImageName, + galleryImage, options ); + return poller.pollUntilDone(); } /** - * Update a gallery image definition. + * Retrieves information about a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be + * retrieved. + * @param galleryImageName The name of the gallery image definition to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + options?: GalleryImagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, galleryImageName, options }, + getOperationSpec + ); + } + + /** + * Delete a gallery image. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be - * updated. - * @param galleryImageName The name of the gallery image definition to be updated. The allowed - * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The - * maximum length is 80 characters. - * @param galleryImage Parameters supplied to the update gallery image operation. - * @param [options] The optional parameters - * @returns Promise + * deleted. + * @param galleryImageName The name of the gallery image definition to be deleted. + * @param options The options parameters. */ - beginUpdate( + async beginDelete( resourceGroupName: string, galleryName: string, galleryImageName: string, - galleryImage: Models.GalleryImageUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryImageName, - galleryImage, - options - }, - beginUpdateOperationSpec, - options + options?: GalleryImagesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, galleryName, galleryImageName, options }, + deleteOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** * Delete a gallery image. * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be - * deleted. + * deleted. * @param galleryImageName The name of the gallery image definition to be deleted. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginDeleteAndWait( resourceGroupName: string, galleryName: string, galleryImageName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - galleryImageName, - options - }, - beginDeleteMethodOperationSpec, + options?: GalleryImagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + galleryName, + galleryImageName, options ); + return poller.pollUntilDone(); } /** * List gallery image definitions in a gallery. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByGalleryNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be + * listed. + * @param options The options parameters. */ - listByGalleryNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; + private _listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryImagesListByGalleryOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, galleryName, options }, + listByGalleryOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByGalleryNext + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be + * listed. + * @param nextLink The nextLink from the previous successful call to the ListByGallery method. + * @param options The options parameters. */ - listByGalleryNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByGalleryNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByGalleryNext( + resourceGroupName: string, + galleryName: string, + nextLink: string, + options?: GalleryImagesListByGalleryNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByGalleryNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, galleryName, nextLink, options }, + listByGalleryNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.galleryName, - Parameters.galleryImageName - ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.GalleryImage }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByGalleryOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.GalleryImageList + 201: { + bodyMapper: Mappers.GalleryImage + }, + 202: { + bodyMapper: Mappers.GalleryImage + }, + 204: { + bodyMapper: Mappers.GalleryImage }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + requestBody: Parameters.galleryImage, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryImageName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryImage", - mapper: { - ...Mappers.GalleryImage, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.GalleryImage @@ -432,32 +518,30 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 202: { bodyMapper: Mappers.GalleryImage }, + 204: { + bodyMapper: Mappers.GalleryImage + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + requestBody: Parameters.galleryImage1, + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryImageName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "galleryImage", - mapper: { - ...Mappers.GalleryImageUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryImage @@ -466,39 +550,66 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + queryParameters: [Parameters.apiVersion3], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.galleryName, Parameters.galleryImageName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName, + Parameters.galleryImageName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByGalleryNextOperationSpec: msRest.OperationSpec = { +const listByGalleryOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images", httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], + responses: { + 200: { + bodyMapper: Mappers.GalleryImageList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByGalleryNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.GalleryImageList @@ -507,5 +618,14 @@ const listByGalleryNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.galleryName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts b/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts index be248c81d161..644fc20eca92 100644 --- a/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts +++ b/sdk/compute/arm-compute/src/operations/gallerySharingProfile.ts @@ -3,24 +3,30 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/gallerySharingProfileMappers"; +import { GallerySharingProfile } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + SharingUpdate, + GallerySharingProfileUpdateOptionalParams, + GallerySharingProfileUpdateResponse +} from "../models"; /** Class representing a GallerySharingProfile. */ -export class GallerySharingProfile { +export class GallerySharingProfileImpl implements GallerySharingProfile { private readonly client: ComputeManagementClientContext; /** - * Create a GallerySharingProfile. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class GallerySharingProfile class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -31,23 +37,64 @@ export class GallerySharingProfile { * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery. * @param sharingUpdate Parameters supplied to the update gallery sharing profile. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update( + async beginUpdate( resourceGroupName: string, galleryName: string, - sharingUpdate: Models.SharingUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( - resourceGroupName, - galleryName, - sharingUpdate, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.GallerySharingProfileUpdateResponse - >; + sharingUpdate: SharingUpdate, + options?: GallerySharingProfileUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GallerySharingProfileUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, galleryName, sharingUpdate, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** @@ -55,54 +102,56 @@ export class GallerySharingProfile { * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery. * @param sharingUpdate Parameters supplied to the update gallery sharing profile. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate( + async beginUpdateAndWait( resourceGroupName: string, galleryName: string, - sharingUpdate: Models.SharingUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - galleryName, - sharingUpdate, - options - }, - beginUpdateOperationSpec, + sharingUpdate: SharingUpdate, + options?: GallerySharingProfileUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + galleryName, + sharingUpdate, options ); + return poller.pollUntilDone(); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.galleryName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "sharingUpdate", - mapper: { - ...Mappers.SharingUpdate, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.SharingUpdate }, + 201: { + bodyMapper: Mappers.SharingUpdate + }, 202: { bodyMapper: Mappers.SharingUpdate }, + 204: { + bodyMapper: Mappers.SharingUpdate + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.sharingUpdate, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.galleryName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/compute/arm-compute/src/operations/images.ts b/sdk/compute/arm-compute/src/operations/images.ts index 3cb8f8698344..6d21b5d5717a 100644 --- a/sdk/compute/arm-compute/src/operations/images.ts +++ b/sdk/compute/arm-compute/src/operations/images.ts @@ -3,482 +3,630 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/imagesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Images } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + Image, + ImagesListByResourceGroupNextOptionalParams, + ImagesListByResourceGroupOptionalParams, + ImagesListNextOptionalParams, + ImagesListOptionalParams, + ImagesCreateOrUpdateOptionalParams, + ImagesCreateOrUpdateResponse, + ImageUpdate, + ImagesUpdateOptionalParams, + ImagesUpdateResponse, + ImagesDeleteOptionalParams, + ImagesGetOptionalParams, + ImagesGetResponse, + ImagesListByResourceGroupResponse, + ImagesListResponse, + ImagesListByResourceGroupNextResponse, + ImagesListNextResponse +} from "../models"; +/// /** Class representing a Images. */ -export class Images { +export class ImagesImpl implements Images { private readonly client: ComputeManagementClientContext; /** - * Create a Images. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Images class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update an image. + * Gets the list of images under a resource group. * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters Parameters supplied to the Create Image operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, imageName: string, parameters: Models.Image, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,imageName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public listByResourceGroup( + resourceGroupName: string, + options?: ImagesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ImagesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ImagesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Update an image. - * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param parameters Parameters supplied to the Update Image operation. - * @param [options] The optional parameters - * @returns Promise + * Gets the list of Images in the subscription. Use nextLink property in the response to get the next + * page of Images. Do this till nextLink is null to fetch all the Images. + * @param options The options parameters. */ - update(resourceGroupName: string, imageName: string, parameters: Models.ImageUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,imageName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public list( + options?: ImagesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: ImagesListOptionalParams + ): 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?: ImagesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** - * Deletes an Image. + * Create or update an image. * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create Image operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, imageName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,imageName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdate( + resourceGroupName: string, + imageName: string, + parameters: Image, + options?: ImagesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ImagesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, imageName, parameters, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets an image. + * Create or update an image. * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create Image operation. + * @param options The options parameters. */ - get(resourceGroupName: string, imageName: string, options?: Models.ImagesGetOptionalParams): Promise; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + imageName: string, + parameters: Image, + options?: ImagesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + imageName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** + * Update an image. * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. - * @param callback The callback + * @param parameters Parameters supplied to the Update Image operation. + * @param options The options parameters. */ - get(resourceGroupName: string, imageName: string, callback: msRest.ServiceCallback): void; + async beginUpdate( + resourceGroupName: string, + imageName: string, + parameters: ImageUpdate, + options?: ImagesUpdateOptionalParams + ): Promise< + PollerLike, ImagesUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, imageName, parameters, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Update an image. * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. - * @param options The optional parameters - * @param callback The callback + * @param parameters Parameters supplied to the Update Image operation. + * @param options The options parameters. */ - get(resourceGroupName: string, imageName: string, options: Models.ImagesGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, imageName: string, options?: Models.ImagesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - imageName, - options - }, - getOperationSpec, - callback) as Promise; + async beginUpdateAndWait( + resourceGroupName: string, + imageName: string, + parameters: ImageUpdate, + options?: ImagesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + imageName, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Gets the list of images under a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Deletes an Image. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param imageName The name of the image. + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } + async beginDelete( + resourceGroupName: string, + imageName: string, + options?: ImagesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Gets the list of Images in the subscription. Use nextLink property in the response to get the - * next page of Images. Do this till nextLink is null to fetch all the Images. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, imageName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Create or update an image. + * Deletes an Image. * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. - * @param parameters Parameters supplied to the Create Image operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: Models.Image, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - imageName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + imageName: string, + options?: ImagesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + imageName, + options + ); + return poller.pollUntilDone(); } /** - * Update an image. + * Gets an image. * @param resourceGroupName The name of the resource group. * @param imageName The name of the image. - * @param parameters Parameters supplied to the Update Image operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, imageName: string, parameters: Models.ImageUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - imageName, - parameters, - options - }, - beginUpdateOperationSpec, - options); + get( + resourceGroupName: string, + imageName: string, + options?: ImagesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, imageName, options }, + getOperationSpec + ); } /** - * Deletes an Image. + * Gets the list of images under a resource group. * @param resourceGroupName The name of the resource group. - * @param imageName The name of the image. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, imageName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - imageName, - options - }, - beginDeleteMethodOperationSpec, - options); + private _listByResourceGroup( + resourceGroupName: string, + options?: ImagesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** - * Gets the list of images under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * Gets the list of Images in the subscription. Use nextLink property in the response to get the next + * page of Images. Do this till nextLink is null to fetch all the Images. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + options?: ImagesListOptionalParams + ): 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 + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ImagesListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } /** - * Gets the list of Images in the subscription. Use nextLink property in the response to get the - * next page of Images. Do this till nextLink is null to fetch all the Images. - * @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 + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + nextLink: string, + options?: ImagesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.imageName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Image }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.Image + }, + 202: { + bodyMapper: Mappers.Image + }, + 204: { + bodyMapper: Mappers.Image } }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images", + requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.imageName ], - responses: { - 200: { - bodyMapper: Mappers.ImageListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.ImageListResult + bodyMapper: Mappers.Image }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.Image + }, + 202: { + bodyMapper: Mappers.Image + }, + 204: { + bodyMapper: Mappers.Image } }, + requestBody: Parameters.parameters20, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.imageName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.imageName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.subscriptionId, + Parameters.imageName ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Image, - required: true - } - }, + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Image - }, - 201: { - bodyMapper: Mappers.Image - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.imageName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.imageName ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ImageUpdate, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Image - }, - 201: { - bodyMapper: Mappers.Image - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ImageListResult } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.imageName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.ImageListResult } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ImageListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ImageListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/index.ts b/sdk/compute/arm-compute/src/operations/index.ts index e77575004756..e53fe188a12e 100644 --- a/sdk/compute/arm-compute/src/operations/index.ts +++ b/sdk/compute/arm-compute/src/operations/index.ts @@ -3,8 +3,7 @@ * 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"; diff --git a/sdk/compute/arm-compute/src/operations/logAnalytics.ts b/sdk/compute/arm-compute/src/operations/logAnalytics.ts index 6eb293790941..c92962a6103b 100644 --- a/sdk/compute/arm-compute/src/operations/logAnalytics.ts +++ b/sdk/compute/arm-compute/src/operations/logAnalytics.ts @@ -3,24 +3,33 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/logAnalyticsMappers"; +import { LogAnalytics } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + RequestRateByIntervalInput, + LogAnalyticsExportRequestRateByIntervalOptionalParams, + LogAnalyticsExportRequestRateByIntervalResponse, + ThrottledRequestsInput, + LogAnalyticsExportThrottledRequestsOptionalParams, + LogAnalyticsExportThrottledRequestsResponse +} from "../models"; /** Class representing a LogAnalytics. */ -export class LogAnalytics { +export class LogAnalyticsImpl implements LogAnalytics { private readonly client: ComputeManagementClientContext; /** - * Create a LogAnalytics. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class LogAnalytics class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,130 +38,229 @@ export class LogAnalytics { /** * Export logs that show Api requests made by this subscription in the given time window to show * throttling activities. - * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. * @param location The location upon which virtual-machine-sizes is queried. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @param options The options parameters. */ - exportRequestRateByInterval(parameters: Models.RequestRateByIntervalInput, location: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginExportRequestRateByInterval(parameters,location,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginExportRequestRateByInterval( + location: string, + parameters: RequestRateByIntervalInput, + options?: LogAnalyticsExportRequestRateByIntervalOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LogAnalyticsExportRequestRateByIntervalResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { location, parameters, options }, + exportRequestRateByIntervalOperationSpec, + "azure-async-operation" + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Export logs that show total throttled Api requests for this subscription in the given time - * window. - * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * Export logs that show Api requests made by this subscription in the given time window to show + * throttling activities. * @param location The location upon which virtual-machine-sizes is queried. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @param options The options parameters. */ - exportThrottledRequests(parameters: Models.ThrottledRequestsInput, location: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginExportThrottledRequests(parameters,location,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginExportRequestRateByIntervalAndWait( + location: string, + parameters: RequestRateByIntervalInput, + options?: LogAnalyticsExportRequestRateByIntervalOptionalParams + ): Promise { + const poller = await this.beginExportRequestRateByInterval( + location, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Export logs that show Api requests made by this subscription in the given time window to show - * throttling activities. - * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * Export logs that show total throttled Api requests for this subscription in the given time window. * @param location The location upon which virtual-machine-sizes is queried. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @param options The options parameters. */ - beginExportRequestRateByInterval(parameters: Models.RequestRateByIntervalInput, location: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - parameters, - location, - options - }, - beginExportRequestRateByIntervalOperationSpec, - options); + async beginExportThrottledRequests( + location: string, + parameters: ThrottledRequestsInput, + options?: LogAnalyticsExportThrottledRequestsOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LogAnalyticsExportThrottledRequestsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { location, parameters, options }, + exportThrottledRequestsOperationSpec, + "azure-async-operation" + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Export logs that show total throttled Api requests for this subscription in the given time - * window. - * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * Export logs that show total throttled Api requests for this subscription in the given time window. * @param location The location upon which virtual-machine-sizes is queried. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @param options The options parameters. */ - beginExportThrottledRequests(parameters: Models.ThrottledRequestsInput, location: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - parameters, - location, - options - }, - beginExportThrottledRequestsOperationSpec, - options); + async beginExportThrottledRequestsAndWait( + location: string, + parameters: ThrottledRequestsInput, + options?: LogAnalyticsExportThrottledRequestsOptionalParams + ): Promise { + const poller = await this.beginExportThrottledRequests( + location, + parameters, + options + ); + return poller.pollUntilDone(); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const beginExportRequestRateByIntervalOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const exportRequestRateByIntervalOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval", - urlParameters: [ - Parameters.location1, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RequestRateByIntervalInput, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.LogAnalyticsOperationResult }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.LogAnalyticsOperationResult + }, + 202: { + bodyMapper: Mappers.LogAnalyticsOperationResult + }, + 204: { + bodyMapper: Mappers.LogAnalyticsOperationResult } }, + requestBody: Parameters.parameters25, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginExportThrottledRequestsOperationSpec: msRest.OperationSpec = { +const exportThrottledRequestsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests", - urlParameters: [ - Parameters.location1, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ThrottledRequestsInput, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.LogAnalyticsOperationResult }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.LogAnalyticsOperationResult + }, + 202: { + bodyMapper: Mappers.LogAnalyticsOperationResult + }, + 204: { + bodyMapper: Mappers.LogAnalyticsOperationResult } }, + requestBody: Parameters.parameters26, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/compute/arm-compute/src/operations/operations.ts b/sdk/compute/arm-compute/src/operations/operations.ts index dec5eb098fc5..b05d76ea4497 100644 --- a/sdk/compute/arm-compute/src/operations/operations.ts +++ b/sdk/compute/arm-compute/src/operations/operations.ts @@ -3,23 +3,30 @@ * 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 "@azure/core-paging"; +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 { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + ComputeOperationValue, + OperationsListOptionalParams, + OperationsListResponse +} from "../models"; +/// /** Class representing a Operations. */ -export class Operations { +export class OperationsImpl implements Operations { private readonly client: ComputeManagementClientContext; /** - * Create a Operations. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -27,47 +34,63 @@ export class Operations { /** * Gets a list of compute 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; + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** - * @param options The optional parameters - * @param callback The callback + * Gets a list of compute operations. + * @param options The options parameters. */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } } - // 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.Compute/operations", httpMethod: "GET", - path: "providers/Microsoft.Compute/operations", - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ComputeOperationListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/proximityPlacementGroups.ts b/sdk/compute/arm-compute/src/operations/proximityPlacementGroups.ts index dde78adc61f1..352a76103563 100644 --- a/sdk/compute/arm-compute/src/operations/proximityPlacementGroups.ts +++ b/sdk/compute/arm-compute/src/operations/proximityPlacementGroups.ts @@ -3,62 +3,161 @@ * 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/proximityPlacementGroupsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ProximityPlacementGroups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + ProximityPlacementGroup, + ProximityPlacementGroupsListBySubscriptionNextOptionalParams, + ProximityPlacementGroupsListBySubscriptionOptionalParams, + ProximityPlacementGroupsListByResourceGroupNextOptionalParams, + ProximityPlacementGroupsListByResourceGroupOptionalParams, + ProximityPlacementGroupsCreateOrUpdateOptionalParams, + ProximityPlacementGroupsCreateOrUpdateResponse, + ProximityPlacementGroupUpdate, + ProximityPlacementGroupsUpdateOptionalParams, + ProximityPlacementGroupsUpdateResponse, + ProximityPlacementGroupsDeleteOptionalParams, + ProximityPlacementGroupsGetOptionalParams, + ProximityPlacementGroupsGetResponse, + ProximityPlacementGroupsListBySubscriptionResponse, + ProximityPlacementGroupsListByResourceGroupResponse, + ProximityPlacementGroupsListBySubscriptionNextResponse, + ProximityPlacementGroupsListByResourceGroupNextResponse +} from "../models"; +/// /** Class representing a ProximityPlacementGroups. */ -export class ProximityPlacementGroups { +export class ProximityPlacementGroupsImpl implements ProximityPlacementGroups { private readonly client: ComputeManagementClientContext; /** - * Create a ProximityPlacementGroups. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ProximityPlacementGroups class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Create or update a proximity placement group. - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param parameters Parameters supplied to the Create Proximity Placement Group operation. - * @param [options] The optional parameters - * @returns Promise + * Lists all proximity placement groups in a subscription. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroup, options?: msRest.RequestOptionsBase): Promise; + public listBySubscription( + options?: ProximityPlacementGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ProximityPlacementGroupsListBySubscriptionOptionalParams + ): 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?: ProximityPlacementGroupsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + /** + * Lists all proximity placement groups in a resource group. * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param parameters Parameters supplied to the Create Proximity Placement Group operation. - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroup, callback: msRest.ServiceCallback): void; + public listByResourceGroup( + resourceGroupName: string, + options?: ProximityPlacementGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ProximityPlacementGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ProximityPlacementGroupsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + /** + * Create or update a proximity placement group. * @param resourceGroupName The name of the resource group. * @param proximityPlacementGroupName The name of the proximity placement group. * @param parameters Parameters supplied to the Create Proximity Placement Group operation. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroup, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroup, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate( + resourceGroupName: string, + proximityPlacementGroupName: string, + parameters: ProximityPlacementGroup, + options?: ProximityPlacementGroupsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - proximityPlacementGroupName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + { resourceGroupName, proximityPlacementGroupName, parameters, options }, + createOrUpdateOperationSpec + ); } /** @@ -66,419 +165,259 @@ export class ProximityPlacementGroups { * @param resourceGroupName The name of the resource group. * @param proximityPlacementGroupName The name of the proximity placement group. * @param parameters Parameters supplied to the Update Proximity Placement Group operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroupUpdate, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param parameters Parameters supplied to the Update Proximity Placement Group operation. - * @param callback The callback - */ - update(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroupUpdate, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param parameters Parameters supplied to the Update Proximity Placement Group operation. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroupUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, proximityPlacementGroupName: string, parameters: Models.ProximityPlacementGroupUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + proximityPlacementGroupName: string, + parameters: ProximityPlacementGroupUpdate, + options?: ProximityPlacementGroupsUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - proximityPlacementGroupName, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, proximityPlacementGroupName, parameters, options }, + updateOperationSpec + ); } /** * Delete a proximity placement group. * @param resourceGroupName The name of the resource group. * @param proximityPlacementGroupName The name of the proximity placement group. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, proximityPlacementGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, proximityPlacementGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, proximityPlacementGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, proximityPlacementGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + proximityPlacementGroupName: string, + options?: ProximityPlacementGroupsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - proximityPlacementGroupName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, proximityPlacementGroupName, options }, + deleteOperationSpec + ); } /** * Retrieves information about a proximity placement group . * @param resourceGroupName The name of the resource group. * @param proximityPlacementGroupName The name of the proximity placement group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, proximityPlacementGroupName: string, options?: Models.ProximityPlacementGroupsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param callback The callback - */ - get(resourceGroupName: string, proximityPlacementGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param proximityPlacementGroupName The name of the proximity placement group. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, proximityPlacementGroupName: string, options: Models.ProximityPlacementGroupsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, proximityPlacementGroupName: string, options?: Models.ProximityPlacementGroupsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + proximityPlacementGroupName: string, + options?: ProximityPlacementGroupsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - proximityPlacementGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, proximityPlacementGroupName, options }, + getOperationSpec + ); } /** * Lists all proximity placement groups in a subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscription( + options?: ProximityPlacementGroupsListBySubscriptionOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; + { options }, + listBySubscriptionOperationSpec + ); } /** * Lists all proximity placement groups in a resource group. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: ProximityPlacementGroupsListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** - * Lists all proximity placement groups in a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - listBySubscriptionNext(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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: ProximityPlacementGroupsListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } /** - * Lists all proximity placement groups in a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(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 + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ProximityPlacementGroupsListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.proximityPlacementGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ProximityPlacementGroup, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroup }, 201: { bodyMapper: Mappers.ProximityPlacementGroup - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.proximityPlacementGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.proximityPlacementGroupName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ProximityPlacementGroupUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroup - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.proximityPlacementGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + responses: { 200: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.proximityPlacementGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.proximityPlacementGroupName ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.proximityPlacementGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.includeColocationStatus, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroup - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.includeColocationStatus], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.proximityPlacementGroupName + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ProximityPlacementGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/resourceSkus.ts b/sdk/compute/arm-compute/src/operations/resourceSkus.ts index 7cf76612ac89..6cfeabbb4a73 100644 --- a/sdk/compute/arm-compute/src/operations/resourceSkus.ts +++ b/sdk/compute/arm-compute/src/operations/resourceSkus.ts @@ -3,23 +3,32 @@ * 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/resourceSkusMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ResourceSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + ResourceSku, + ResourceSkusListNextOptionalParams, + ResourceSkusListOptionalParams, + ResourceSkusListResponse, + ResourceSkusListNextResponse +} from "../models"; +/// /** Class representing a ResourceSkus. */ -export class ResourceSkus { +export class ResourceSkusImpl implements ResourceSkus { private readonly client: ComputeManagementClientContext; /** - * Create a ResourceSkus. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class ResourceSkus class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -27,104 +36,101 @@ export class ResourceSkus { /** * Gets the list of Microsoft.Compute SKUs available for your Subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: Models.ResourceSkusListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.ResourceSkusListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.ResourceSkusListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public list( + options?: ResourceSkusListOptionalParams + ): 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?: ResourceSkusListOptionalParams + ): 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?: ResourceSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** * Gets the list of Microsoft.Compute SKUs available for your Subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listNext(nextPageLink: string, options?: Models.ResourceSkusListNextOptionalParams): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + options?: ResourceSkusListOptionalParams + ): 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: Models.ResourceSkusListNextOptionalParams, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: Models.ResourceSkusListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + nextLink: string, + options?: ResourceSkusListNextOptionalParams + ): 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: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ResourceSkusResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.filter, Parameters.apiVersion1], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ResourceSkusResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.filter, Parameters.apiVersion1], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/restorePointCollections.ts b/sdk/compute/arm-compute/src/operations/restorePointCollections.ts index b0144dd12a53..52ecb974b4ad 100644 --- a/sdk/compute/arm-compute/src/operations/restorePointCollections.ts +++ b/sdk/compute/arm-compute/src/operations/restorePointCollections.ts @@ -3,91 +3,165 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/restorePointCollectionsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { RestorePointCollections } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + RestorePointCollection, + RestorePointCollectionsListNextOptionalParams, + RestorePointCollectionsListOptionalParams, + RestorePointCollectionsListAllNextOptionalParams, + RestorePointCollectionsListAllOptionalParams, + RestorePointCollectionsCreateOrUpdateOptionalParams, + RestorePointCollectionsCreateOrUpdateResponse, + RestorePointCollectionUpdate, + RestorePointCollectionsUpdateOptionalParams, + RestorePointCollectionsUpdateResponse, + RestorePointCollectionsDeleteOptionalParams, + RestorePointCollectionsGetOptionalParams, + RestorePointCollectionsGetResponse, + RestorePointCollectionsListResponse, + RestorePointCollectionsListAllResponse, + RestorePointCollectionsListNextResponse, + RestorePointCollectionsListAllNextResponse +} from "../models"; +/// /** Class representing a RestorePointCollections. */ -export class RestorePointCollections { +export class RestorePointCollectionsImpl implements RestorePointCollections { private readonly client: ComputeManagementClientContext; /** - * Create a RestorePointCollections. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class RestorePointCollections class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * The operation to create or update the restore point collection. Please refer to - * https://aka.ms/RestorePoints for more details. When updating a restore point collection, only - * tags may be modified. + * Gets the list of restore point collections in a resource group. * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param parameters Parameters supplied to the Create or Update restore point collection - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + public list( resourceGroupName: string, - restorePointCollectionName: string, - parameters: Models.RestorePointCollection, - options?: msRest.RequestOptionsBase - ): Promise; + options?: RestorePointCollectionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: RestorePointCollectionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: RestorePointCollectionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + /** - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param parameters Parameters supplied to the Create or Update restore point collection - * operation. - * @param callback The callback + * Gets the list of restore point collections in the subscription. Use nextLink property in the + * response to get the next page of restore point collections. Do this till nextLink is not null to + * fetch all the restore point collections. + * @param options The options parameters. */ - createOrUpdate( - resourceGroupName: string, - restorePointCollectionName: string, - parameters: Models.RestorePointCollection, - callback: msRest.ServiceCallback - ): void; + public listAll( + options?: RestorePointCollectionsListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAllPagingPage(options); + } + }; + } + + private async *listAllPagingPage( + options?: RestorePointCollectionsListAllOptionalParams + ): AsyncIterableIterator { + let result = await this._listAll(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listAllPagingAll( + options?: RestorePointCollectionsListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + /** + * The operation to create or update the restore point collection. Please refer to + * https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags + * may be modified. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection. - * @param parameters Parameters supplied to the Create or Update restore point collection - * operation. - * @param options The optional parameters - * @param callback The callback + * @param parameters Parameters supplied to the Create or Update restore point collection operation. + * @param options The options parameters. */ createOrUpdate( resourceGroupName: string, restorePointCollectionName: string, - parameters: Models.RestorePointCollection, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - createOrUpdate( - resourceGroupName: string, - restorePointCollectionName: string, - parameters: Models.RestorePointCollection, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + parameters: RestorePointCollection, + options?: RestorePointCollectionsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - restorePointCollectionName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback - ) as Promise; + { resourceGroupName, restorePointCollectionName, parameters, options }, + createOrUpdateOperationSpec + ); } /** @@ -95,58 +169,77 @@ export class RestorePointCollections { * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection. * @param parameters Parameters supplied to the Update restore point collection operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ update( resourceGroupName: string, restorePointCollectionName: string, - parameters: Models.RestorePointCollectionUpdate, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param parameters Parameters supplied to the Update restore point collection operation. - * @param callback The callback - */ - update( - resourceGroupName: string, - restorePointCollectionName: string, - parameters: Models.RestorePointCollectionUpdate, - callback: msRest.ServiceCallback - ): void; + parameters: RestorePointCollectionUpdate, + options?: RestorePointCollectionsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, restorePointCollectionName, parameters, options }, + updateOperationSpec + ); + } + /** + * The operation to delete the restore point collection. This operation will also delete all the + * contained restore points. * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param parameters Parameters supplied to the Update restore point collection operation. - * @param options The optional parameters - * @param callback The callback + * @param restorePointCollectionName The name of the Restore Point Collection. + * @param options The options parameters. */ - update( + async beginDelete( resourceGroupName: string, restorePointCollectionName: string, - parameters: Models.RestorePointCollectionUpdate, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - update( - resourceGroupName: string, - restorePointCollectionName: string, - parameters: Models.RestorePointCollectionUpdate, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - restorePointCollectionName, - parameters, - options - }, - updateOperationSpec, - callback - ) as Promise; + options?: RestorePointCollectionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, restorePointCollectionName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** @@ -154,293 +247,104 @@ export class RestorePointCollections { * contained restore points. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the Restore Point Collection. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod( + async beginDeleteAndWait( resourceGroupName: string, restorePointCollectionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + options?: RestorePointCollectionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( resourceGroupName, restorePointCollectionName, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** * The operation to get the restore point collection. * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ get( resourceGroupName: string, restorePointCollectionName: string, - options?: Models.RestorePointCollectionsGetOptionalParams - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param callback The callback - */ - get( - resourceGroupName: string, - restorePointCollectionName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param options The optional parameters - * @param callback The callback - */ - get( - resourceGroupName: string, - restorePointCollectionName: string, - options: Models.RestorePointCollectionsGetOptionalParams, - callback: msRest.ServiceCallback - ): void; - get( - resourceGroupName: string, - restorePointCollectionName: string, - options?: - | Models.RestorePointCollectionsGetOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: RestorePointCollectionsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - restorePointCollectionName, - options - }, - getOperationSpec, - callback - ) as Promise; + { resourceGroupName, restorePointCollectionName, options }, + getOperationSpec + ); } /** * Gets the list of restore point collections in a resource group. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - list( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - list( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( + private _list( resourceGroupName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: RestorePointCollectionsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listOperationSpec, - callback - ) as Promise; + { resourceGroupName, options }, + listOperationSpec + ); } /** * Gets the list of restore point collections in the subscription. Use nextLink property in the * response to get the next page of restore point collections. Do this till nextLink is not null to * fetch all the restore point collections. - * @param [options] The optional parameters - * @returns Promise - */ - listAll( - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param callback The callback - */ - listAll(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listAll( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAll( - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listAllOperationSpec, - callback - ) as Promise; + private _listAll( + options?: RestorePointCollectionsListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); } /** - * The operation to delete the restore point collection. This operation will also delete all the - * contained restore points. + * ListNext * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the Restore Point Collection. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - beginDeleteMethod( + private _listNext( resourceGroupName: string, - restorePointCollectionName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - restorePointCollectionName, - options - }, - beginDeleteMethodOperationSpec, - options - ); - } - - /** - * Gets the list of restore point collections in a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + nextLink: string, + options?: RestorePointCollectionsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); } /** - * Gets the list of restore point collections in the subscription. Use nextLink property in the - * response to get the next page of restore point collections. Do this till nextLink is not null to - * fetch all the restore point collections. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listAllNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listAllNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. */ - listAllNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAllNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listAllNext( + nextLink: string, + options?: RestorePointCollectionsListAllNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAllNextOperationSpec, - callback - ) as Promise; + { nextLink, options }, + listAllNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.restorePointCollectionName - ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RestorePointCollection, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.RestorePointCollection @@ -452,27 +356,22 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + requestBody: Parameters.parameters21, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.restorePointCollectionName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RestorePointCollectionUpdate, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.RestorePointCollection @@ -481,55 +380,67 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + requestBody: Parameters.parameters22, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.restorePointCollectionName ], - queryParameters: [Parameters.expand0, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.RestorePointCollection - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.restorePointCollectionName + ], + headerParameters: [Parameters.accept], serializer }; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const getOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.RestorePointCollectionListResult + bodyMapper: Mappers.RestorePointCollection }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand3], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.restorePointCollectionName + ], + headerParameters: [Parameters.accept], serializer }; - -const listAllOperationSpec: msRest.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.RestorePointCollectionListResult @@ -538,38 +449,35 @@ const listAllOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, - Parameters.restorePointCollectionName + Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.RestorePointCollectionListResult + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RestorePointCollectionListResult @@ -578,16 +486,19 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listAllNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listAllNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RestorePointCollectionListResult @@ -596,5 +507,12 @@ const listAllNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/restorePoints.ts b/sdk/compute/arm-compute/src/operations/restorePoints.ts index 1bca47d99481..d89aea035325 100644 --- a/sdk/compute/arm-compute/src/operations/restorePoints.ts +++ b/sdk/compute/arm-compute/src/operations/restorePoints.ts @@ -3,269 +3,330 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/restorePointsMappers"; +import { RestorePoints } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + RestorePoint, + RestorePointsCreateOptionalParams, + RestorePointsCreateResponse, + RestorePointsDeleteOptionalParams, + RestorePointsGetOptionalParams, + RestorePointsGetResponse +} from "../models"; /** Class representing a RestorePoints. */ -export class RestorePoints { +export class RestorePointsImpl implements RestorePoints { private readonly client: ComputeManagementClientContext; /** - * Create a RestorePoints. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class RestorePoints class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * The operation to create the restore point. Updating properties of an existing restore point is - * not allowed + * The operation to create the restore point. Updating properties of an existing restore point is not + * allowed * @param resourceGroupName The name of the resource group. * @param restorePointCollectionName The name of the restore point collection. * @param restorePointName The name of the restore point. * @param parameters Parameters supplied to the Create restore point operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - create( + async beginCreate( resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, - parameters: Models.RestorePoint, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreate( - resourceGroupName, - restorePointCollectionName, - restorePointName, - parameters, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.RestorePointsCreateResponse - >; + parameters: RestorePoint, + options?: RestorePointsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + RestorePointsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { + resourceGroupName, + restorePointCollectionName, + restorePointName, + parameters, + options + }, + createOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to delete the restore point. + * The operation to create the restore point. Updating properties of an existing restore point is not + * allowed * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the Restore Point Collection. + * @param restorePointCollectionName The name of the restore point collection. * @param restorePointName The name of the restore point. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create restore point operation. + * @param options The options parameters. */ - deleteMethod( + async beginCreateAndWait( resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod( + parameters: RestorePoint, + options?: RestorePointsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( resourceGroupName, restorePointCollectionName, restorePointName, + parameters, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * The operation to get the restore point. - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param restorePointName The name of the restore point. - * @param [options] The optional parameters - * @returns Promise - */ - get( - resourceGroupName: string, - restorePointCollectionName: string, - restorePointName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. - * @param restorePointName The name of the restore point. - * @param callback The callback - */ - get( - resourceGroupName: string, - restorePointCollectionName: string, - restorePointName: string, - callback: msRest.ServiceCallback - ): void; - /** + * The operation to delete the restore point. * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. + * @param restorePointCollectionName The name of the Restore Point Collection. * @param restorePointName The name of the restore point. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get( - resourceGroupName: string, - restorePointCollectionName: string, - restorePointName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( + async beginDelete( resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( + options?: RestorePointsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, restorePointCollectionName, restorePointName, options }, - getOperationSpec, - callback - ) as Promise; + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to create the restore point. Updating properties of an existing restore point is - * not allowed + * The operation to delete the restore point. * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the restore point collection. + * @param restorePointCollectionName The name of the Restore Point Collection. * @param restorePointName The name of the restore point. - * @param parameters Parameters supplied to the Create restore point operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreate( + async beginDeleteAndWait( resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, - parameters: Models.RestorePoint, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - restorePointCollectionName, - restorePointName, - parameters, - options - }, - beginCreateOperationSpec, + options?: RestorePointsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + restorePointCollectionName, + restorePointName, options ); + return poller.pollUntilDone(); } /** - * The operation to delete the restore point. + * The operation to get the restore point. * @param resourceGroupName The name of the resource group. - * @param restorePointCollectionName The name of the Restore Point Collection. + * @param restorePointCollectionName The name of the restore point collection. * @param restorePointName The name of the restore point. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + get( resourceGroupName: string, restorePointCollectionName: string, restorePointName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( + options?: RestorePointsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( { resourceGroupName, restorePointCollectionName, restorePointName, options }, - beginDeleteMethodOperationSpec, - options + getOperationSpec ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.restorePointCollectionName, - Parameters.restorePointName - ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.RestorePoint }, + 201: { + bodyMapper: Mappers.RestorePoint + }, + 202: { + bodyMapper: Mappers.RestorePoint + }, + 204: { + bodyMapper: Mappers.RestorePoint + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", + requestBody: Parameters.parameters23, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.restorePointCollectionName, Parameters.restorePointName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RestorePoint, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", + httpMethod: "DELETE", responses: { - 201: { - bodyMapper: Mappers.RestorePoint - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.subscriptionId, + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.restorePointCollectionName, Parameters.restorePointName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.RestorePoint + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.restorePointCollectionName, + Parameters.restorePointName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/sharedGalleries.ts b/sdk/compute/arm-compute/src/operations/sharedGalleries.ts index 9a5ea3090f4f..70d1a8a4dde2 100644 --- a/sdk/compute/arm-compute/src/operations/sharedGalleries.ts +++ b/sdk/compute/arm-compute/src/operations/sharedGalleries.ts @@ -3,23 +3,34 @@ * 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/sharedGalleriesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SharedGalleries } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + SharedGallery, + SharedGalleriesListNextOptionalParams, + SharedGalleriesListOptionalParams, + SharedGalleriesListResponse, + SharedGalleriesGetOptionalParams, + SharedGalleriesGetResponse, + SharedGalleriesListNextResponse +} from "../models"; +/// /** Class representing a SharedGalleries. */ -export class SharedGalleries { +export class SharedGalleriesImpl implements SharedGalleries { private readonly client: ComputeManagementClientContext; /** - * Create a SharedGalleries. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class SharedGalleries class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -28,148 +39,105 @@ export class SharedGalleries { /** * List shared galleries by subscription id or tenant id. * @param location Resource location. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list( + public list( location: string, - options?: Models.SharedGalleriesListOptionalParams - ): Promise; - /** - * @param location Resource location. - * @param callback The callback - */ - list(location: string, callback: msRest.ServiceCallback): void; - /** - * @param location Resource location. - * @param options The optional parameters - * @param callback The callback - */ - list( - location: string, - options: Models.SharedGalleriesListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( - location: string, - options?: - | Models.SharedGalleriesListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - location, - options + options?: SharedGalleriesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listOperationSpec, - callback - ) as Promise; + byPage: () => { + return this.listPagingPage(location, options); + } + }; } - /** - * Get a shared gallery by subscription id or tenant id. - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param [options] The optional parameters - * @returns Promise - */ - get( + private async *listPagingPage( location: string, - galleryUniqueName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: SharedGalleriesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: SharedGalleriesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + /** + * List shared galleries by subscription id or tenant id. * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param callback The callback + * @param options The options parameters. */ - get( + private _list( location: string, - galleryUniqueName: string, - callback: msRest.ServiceCallback - ): void; + options?: SharedGalleriesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + /** + * Get a shared gallery by subscription id or tenant id. * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ get( location: string, galleryUniqueName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - location: string, - galleryUniqueName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: SharedGalleriesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - galleryUniqueName, - options - }, - getOperationSpec, - callback - ) as Promise; + { location, galleryUniqueName, options }, + getOperationSpec + ); } /** - * List shared galleries by subscription id or tenant id. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: Models.SharedGalleriesListNextOptionalParams - ): 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 location Resource location. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext( - nextPageLink: string, - options: Models.SharedGalleriesListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.SharedGalleriesListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listNext( + location: string, + nextLink: string, + options?: SharedGalleriesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { location, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries", - urlParameters: [Parameters.subscriptionId, Parameters.location0], - queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryList @@ -178,16 +146,19 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const getOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}", - urlParameters: [Parameters.subscriptionId, Parameters.location0, Parameters.galleryUniqueName], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGallery @@ -196,16 +167,19 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.galleryUniqueName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryList @@ -214,5 +188,13 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/sharedGalleryImageVersions.ts b/sdk/compute/arm-compute/src/operations/sharedGalleryImageVersions.ts index ad0a6045ae77..16aa219c28eb 100644 --- a/sdk/compute/arm-compute/src/operations/sharedGalleryImageVersions.ts +++ b/sdk/compute/arm-compute/src/operations/sharedGalleryImageVersions.ts @@ -3,23 +3,35 @@ * 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/sharedGalleryImageVersionsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SharedGalleryImageVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + SharedGalleryImageVersion, + SharedGalleryImageVersionsListNextOptionalParams, + SharedGalleryImageVersionsListOptionalParams, + SharedGalleryImageVersionsListResponse, + SharedGalleryImageVersionsGetOptionalParams, + SharedGalleryImageVersionsGetResponse, + SharedGalleryImageVersionsListNextResponse +} from "../models"; +/// /** Class representing a SharedGalleryImageVersions. */ -export class SharedGalleryImageVersions { +export class SharedGalleryImageVersionsImpl + implements SharedGalleryImageVersions { private readonly client: ComputeManagementClientContext; /** - * Create a SharedGalleryImageVersions. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class SharedGalleryImageVersions class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -30,128 +42,120 @@ export class SharedGalleryImageVersions { * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param [options] The optional parameters - * @returns Promise + * Versions are to be listed. + * @param options The options parameters. */ - list( + public list( location: string, galleryUniqueName: string, galleryImageName: string, - options?: Models.SharedGalleryImageVersionsListOptionalParams - ): Promise; - /** - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param callback The callback - */ - list( - location: string, - galleryUniqueName: string, - galleryImageName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param options The optional parameters - * @param callback The callback - */ - list( - location: string, - galleryUniqueName: string, - galleryImageName: string, - options: Models.SharedGalleryImageVersionsListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( + options?: SharedGalleryImageVersionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + location, + galleryUniqueName, + galleryImageName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + location, + galleryUniqueName, + galleryImageName, + options + ); + } + }; + } + + private async *listPagingPage( location: string, galleryUniqueName: string, galleryImageName: string, - options?: - | Models.SharedGalleryImageVersionsListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { + options?: SharedGalleryImageVersionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + location, + galleryUniqueName, + galleryImageName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( location, galleryUniqueName, galleryImageName, + continuationToken, options - }, - listOperationSpec, - callback - ) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Get a shared gallery image version by subscription id or tenant id. - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param galleryImageVersionName The name of the gallery image version to be created. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param [options] The optional parameters - * @returns Promise - */ - get( + private async *listPagingAll( location: string, galleryUniqueName: string, galleryImageName: string, - galleryImageVersionName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: SharedGalleryImageVersionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + galleryUniqueName, + galleryImageName, + options + )) { + yield* page; + } + } + /** + * List shared gallery image versions by subscription id or tenant id. * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param galleryImageVersionName The name of the gallery image version to be created. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param callback The callback + * Versions are to be listed. + * @param options The options parameters. */ - get( + private _list( location: string, galleryUniqueName: string, galleryImageName: string, - galleryImageVersionName: string, - callback: msRest.ServiceCallback - ): void; + options?: SharedGalleryImageVersionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, galleryUniqueName, galleryImageName, options }, + listOperationSpec + ); + } + /** + * Get a shared gallery image version by subscription id or tenant id. * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param galleryImageVersionName The name of the gallery image version to be created. Needs to - * follow semantic version name pattern: The allowed characters are digit and period. Digits must - * be within the range of a 32-bit integer. Format: .. - * @param options The optional parameters - * @param callback The callback + * Versions are to be listed. + * @param galleryImageVersionName The name of the gallery image version to be created. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param options The options parameters. */ get( location: string, galleryUniqueName: string, galleryImageName: string, galleryImageVersionName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - location: string, - galleryUniqueName: string, - galleryImageName: string, - galleryImageVersionName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: SharedGalleryImageVersionsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { location, @@ -160,71 +164,39 @@ export class SharedGalleryImageVersions { galleryImageVersionName, options }, - getOperationSpec, - callback - ) as Promise; + getOperationSpec + ); } /** - * List shared gallery image versions by subscription id or tenant id. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: Models.SharedGalleryImageVersionsListNextOptionalParams - ): 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 location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image + * Versions are to be listed. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext( - nextPageLink: string, - options: Models.SharedGalleryImageVersionsListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.SharedGalleryImageVersionsListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listNext( + location: string, + galleryUniqueName: string, + galleryImageName: string, + nextLink: string, + options?: SharedGalleryImageVersionsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { location, galleryUniqueName, galleryImageName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.location0, - Parameters.galleryUniqueName, - Parameters.galleryImageName - ], - queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryImageVersionList @@ -233,22 +205,21 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.location0, - Parameters.galleryUniqueName, + Parameters.location, Parameters.galleryImageName, - Parameters.galleryImageVersionName + Parameters.galleryUniqueName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryImageVersion @@ -257,16 +228,21 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.galleryImageName, + Parameters.galleryImageVersionName, + Parameters.galleryUniqueName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryImageVersionList @@ -275,5 +251,15 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location, + Parameters.galleryImageName, + Parameters.galleryUniqueName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/sharedGalleryImages.ts b/sdk/compute/arm-compute/src/operations/sharedGalleryImages.ts index 3cf630668f12..2a7ccd32ec5a 100644 --- a/sdk/compute/arm-compute/src/operations/sharedGalleryImages.ts +++ b/sdk/compute/arm-compute/src/operations/sharedGalleryImages.ts @@ -3,23 +3,34 @@ * 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/sharedGalleryImagesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SharedGalleryImages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + SharedGalleryImage, + SharedGalleryImagesListNextOptionalParams, + SharedGalleryImagesListOptionalParams, + SharedGalleryImagesListResponse, + SharedGalleryImagesGetOptionalParams, + SharedGalleryImagesGetResponse, + SharedGalleryImagesListNextResponse +} from "../models"; +/// /** Class representing a SharedGalleryImages. */ -export class SharedGalleryImages { +export class SharedGalleryImagesImpl implements SharedGalleryImages { private readonly client: ComputeManagementClientContext; /** - * Create a SharedGalleryImages. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class SharedGalleryImages class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,172 +40,124 @@ export class SharedGalleryImages { * List shared gallery images by subscription id or tenant id. * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list( + public list( location: string, galleryUniqueName: string, - options?: Models.SharedGalleryImagesListOptionalParams - ): Promise; - /** - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param callback The callback - */ - list( - location: string, - galleryUniqueName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param options The optional parameters - * @param callback The callback - */ - list( - location: string, - galleryUniqueName: string, - options: Models.SharedGalleryImagesListOptionalParams, - callback: msRest.ServiceCallback - ): void; - list( + options?: SharedGalleryImagesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, galleryUniqueName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, galleryUniqueName, options); + } + }; + } + + private async *listPagingPage( location: string, galleryUniqueName: string, - options?: - | Models.SharedGalleryImagesListOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { + options?: SharedGalleryImagesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, galleryUniqueName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( location, galleryUniqueName, + continuationToken, options - }, - listOperationSpec, - callback - ) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Get a shared gallery image by subscription id or tenant id. - * @param location Resource location. - * @param galleryUniqueName The unique name of the Shared Gallery. - * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param [options] The optional parameters - * @returns Promise - */ - get( + private async *listPagingAll( location: string, galleryUniqueName: string, - galleryImageName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: SharedGalleryImagesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + galleryUniqueName, + options + )) { + yield* page; + } + } + /** + * List shared gallery images by subscription id or tenant id. * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. - * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param callback The callback + * @param options The options parameters. */ - get( + private _list( location: string, galleryUniqueName: string, - galleryImageName: string, - callback: msRest.ServiceCallback - ): void; + options?: SharedGalleryImagesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, galleryUniqueName, options }, + listOperationSpec + ); + } + /** + * Get a shared gallery image by subscription id or tenant id. * @param location Resource location. * @param galleryUniqueName The unique name of the Shared Gallery. * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image - * Versions are to be listed. - * @param options The optional parameters - * @param callback The callback + * Versions are to be listed. + * @param options The options parameters. */ get( location: string, galleryUniqueName: string, galleryImageName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( - location: string, - galleryUniqueName: string, - galleryImageName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: SharedGalleryImagesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - galleryUniqueName, - galleryImageName, - options - }, - getOperationSpec, - callback - ) as Promise; + { location, galleryUniqueName, galleryImageName, options }, + getOperationSpec + ); } /** - * List shared gallery images by subscription id or tenant id. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: Models.SharedGalleryImagesListNextOptionalParams - ): 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 location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext( - nextPageLink: string, - options: Models.SharedGalleryImagesListNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | Models.SharedGalleryImagesListNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listNext( + location: string, + galleryUniqueName: string, + nextLink: string, + options?: SharedGalleryImagesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { location, galleryUniqueName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images", - urlParameters: [Parameters.subscriptionId, Parameters.location0, Parameters.galleryUniqueName], - queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryImageList @@ -203,21 +166,20 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}", + queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.location0, - Parameters.galleryUniqueName, - Parameters.galleryImageName + Parameters.location, + Parameters.galleryUniqueName ], - queryParameters: [Parameters.apiVersion3], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryImage @@ -226,16 +188,20 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.galleryImageName, + Parameters.galleryUniqueName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SharedGalleryImageList @@ -244,5 +210,14 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion3, Parameters.sharedTo], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location, + Parameters.galleryUniqueName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/snapshots.ts b/sdk/compute/arm-compute/src/operations/snapshots.ts index cccd18645cf9..bacff33c9930 100644 --- a/sdk/compute/arm-compute/src/operations/snapshots.ts +++ b/sdk/compute/arm-compute/src/operations/snapshots.ts @@ -3,695 +3,867 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/snapshotsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Snapshots } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + Snapshot, + SnapshotsListByResourceGroupNextOptionalParams, + SnapshotsListByResourceGroupOptionalParams, + SnapshotsListNextOptionalParams, + SnapshotsListOptionalParams, + SnapshotsCreateOrUpdateOptionalParams, + SnapshotsCreateOrUpdateResponse, + SnapshotUpdate, + SnapshotsUpdateOptionalParams, + SnapshotsUpdateResponse, + SnapshotsGetOptionalParams, + SnapshotsGetResponse, + SnapshotsDeleteOptionalParams, + SnapshotsListByResourceGroupResponse, + SnapshotsListResponse, + GrantAccessData, + SnapshotsGrantAccessOptionalParams, + SnapshotsGrantAccessResponse, + SnapshotsRevokeAccessOptionalParams, + SnapshotsListByResourceGroupNextResponse, + SnapshotsListNextResponse +} from "../models"; +/// /** Class representing a Snapshots. */ -export class Snapshots { +export class SnapshotsImpl implements Snapshots { private readonly client: ComputeManagementClientContext; /** - * Create a Snapshots. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Snapshots class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Creates or updates a snapshot. + * Lists snapshots under a resource group. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param snapshot Snapshot object supplied in the body of the Put disk operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + public listByResourceGroup( resourceGroupName: string, - snapshotName: string, - snapshot: Models.Snapshot, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + options?: SnapshotsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: SnapshotsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: SnapshotsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - snapshotName, - snapshot, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SnapshotsCreateOrUpdateResponse - >; + )) { + yield* page; + } } /** - * Updates (patches) a snapshot. - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. - * @param [options] The optional parameters - * @returns Promise + * Lists snapshots under a subscription. + * @param options The options parameters. */ - update( - resourceGroupName: string, - snapshotName: string, - snapshot: Models.SnapshotUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate(resourceGroupName, snapshotName, snapshot, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + public list( + options?: SnapshotsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: SnapshotsListOptionalParams + ): 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?: SnapshotsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** - * Gets information about a snapshot. + * Creates or updates a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Put disk operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdate( resourceGroupName: string, snapshotName: string, - options?: msRest.RequestOptionsBase - ): Promise; + snapshot: Snapshot, + options?: SnapshotsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, snapshotName, snapshot, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Creates or updates a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param callback The callback + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Put disk operation. + * @param options The options parameters. */ - get( + async beginCreateOrUpdateAndWait( resourceGroupName: string, snapshotName: string, - callback: msRest.ServiceCallback - ): void; + snapshot: Snapshot, + options?: SnapshotsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + snapshotName, + snapshot, + options + ); + return poller.pollUntilDone(); + } + /** + * Updates (patches) a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param options The optional parameters - * @param callback The callback + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. + * @param options The options parameters. */ - get( - resourceGroupName: string, - snapshotName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - get( + async beginUpdate( resourceGroupName: string, snapshotName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - snapshotName, - options - }, - getOperationSpec, - callback - ) as Promise; + snapshot: SnapshotUpdate, + options?: SnapshotsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, snapshotName, snapshot, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a snapshot. + * Updates (patches) a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. + * @param options The options parameters. */ - deleteMethod( + async beginUpdateAndWait( resourceGroupName: string, snapshotName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeleteMethod(resourceGroupName, snapshotName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + snapshot: SnapshotUpdate, + options?: SnapshotsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + snapshotName, + snapshot, + options ); + return poller.pollUntilDone(); } /** - * Lists snapshots under a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup( - resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; - /** + * Gets information about a snapshot. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. */ - listByResourceGroup( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroup( + get( resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + snapshotName: string, + options?: SnapshotsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback - ) as Promise; + { resourceGroupName, snapshotName, options }, + getOperationSpec + ); } /** - * Lists snapshots under a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * Deletes a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. */ - list( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback - ) as Promise; + async beginDelete( + resourceGroupName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, snapshotName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Grants access to a snapshot. + * Deletes a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param grantAccessData Access data object supplied in the body of the get snapshot access - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. */ - grantAccess( + async beginDeleteAndWait( resourceGroupName: string, snapshotName: string, - grantAccessData: Models.GrantAccessData, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginGrantAccess( + options?: SnapshotsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( resourceGroupName, snapshotName, - grantAccessData, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.SnapshotsGrantAccessResponse - >; + ); + return poller.pollUntilDone(); } /** - * Revokes access to a snapshot. + * Lists snapshots under a resource group. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - revokeAccess( + private _listByResourceGroup( resourceGroupName: string, - snapshotName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRevokeAccess(resourceGroupName, snapshotName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: SnapshotsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec ); } /** - * Creates or updates a snapshot. - * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param snapshot Snapshot object supplied in the body of the Put disk operation. - * @param [options] The optional parameters - * @returns Promise + * Lists snapshots under a subscription. + * @param options The options parameters. */ - beginCreateOrUpdate( - resourceGroupName: string, - snapshotName: string, - snapshot: Models.Snapshot, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - snapshotName, - snapshot, - options - }, - beginCreateOrUpdateOperationSpec, - options - ); + private _list( + options?: SnapshotsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); } /** - * Updates (patches) a snapshot. + * Grants access to a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. + * @param options The options parameters. */ - beginUpdate( + async beginGrantAccess( resourceGroupName: string, snapshotName: string, - snapshot: Models.SnapshotUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - snapshotName, - snapshot, - options - }, - beginUpdateOperationSpec, - options + grantAccessData: GrantAccessData, + options?: SnapshotsGrantAccessOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsGrantAccessResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, snapshotName, grantAccessData, options }, + grantAccessOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a snapshot. + * Grants access to a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. + * @param options The options parameters. */ - beginDeleteMethod( + async beginGrantAccessAndWait( resourceGroupName: string, snapshotName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - snapshotName, - options - }, - beginDeleteMethodOperationSpec, + grantAccessData: GrantAccessData, + options?: SnapshotsGrantAccessOptionalParams + ): Promise { + const poller = await this.beginGrantAccess( + resourceGroupName, + snapshotName, + grantAccessData, options ); + return poller.pollUntilDone(); } /** - * Grants access to a snapshot. + * Revokes access to a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param grantAccessData Access data object supplied in the body of the get snapshot access - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. */ - beginGrantAccess( + async beginRevokeAccess( resourceGroupName: string, snapshotName: string, - grantAccessData: Models.GrantAccessData, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - snapshotName, - grantAccessData, - options - }, - beginGrantAccessOperationSpec, - options + options?: SnapshotsRevokeAccessOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, snapshotName, options }, + revokeAccessOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** * Revokes access to a snapshot. * @param resourceGroupName The name of the resource group. - * @param snapshotName The name of the snapshot that is being created. The name can't be changed - * after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The - * max name length is 80 characters. - * @param [options] The optional parameters - * @returns Promise + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. */ - beginRevokeAccess( + async beginRevokeAccessAndWait( resourceGroupName: string, snapshotName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - snapshotName, - options - }, - beginRevokeAccessOperationSpec, + options?: SnapshotsRevokeAccessOptionalParams + ): Promise { + const poller = await this.beginRevokeAccess( + resourceGroupName, + snapshotName, options ); + return poller.pollUntilDone(); } /** - * Lists snapshots under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext( - 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 + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByResourceGroupNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: SnapshotsListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } /** - * Lists snapshots under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @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?: SnapshotsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.snapshotName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Snapshot }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.Snapshot + }, + 202: { + bodyMapper: Mappers.Snapshot + }, + 204: { + bodyMapper: Mappers.Snapshot } }, + requestBody: Parameters.snapshot, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.snapshotName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.SnapshotList + bodyMapper: Mappers.Snapshot + }, + 201: { + bodyMapper: Mappers.Snapshot + }, + 202: { + bodyMapper: Mappers.Snapshot }, - default: { - bodyMapper: Mappers.CloudError + 204: { + bodyMapper: Mappers.Snapshot } }, + requestBody: Parameters.snapshot1, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.snapshotName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { - bodyMapper: Mappers.SnapshotList - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.Snapshot } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.snapshotName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const deleteOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.snapshotName], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "snapshot", - mapper: { - ...Mappers.Snapshot, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Snapshot - }, - 202: { - bodyMapper: Mappers.Snapshot - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.snapshotName + ], serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.snapshotName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "snapshot", - mapper: { - ...Mappers.SnapshotUpdate, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Snapshot - }, - 202: { - bodyMapper: Mappers.Snapshot - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.SnapshotList } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.snapshotName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.SnapshotList } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginGrantAccessOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const grantAccessOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.snapshotName], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "grantAccessData", - mapper: { - ...Mappers.GrantAccessData, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.AccessUri }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.AccessUri + }, + 202: { + bodyMapper: Mappers.AccessUri + }, + 204: { + bodyMapper: Mappers.AccessUri } }, + requestBody: Parameters.grantAccessData, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.snapshotName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginRevokeAccessOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const revokeAccessOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", - urlParameters: [Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.snapshotName], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.snapshotName + ], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SnapshotList - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion2], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SnapshotList - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion2], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/sshPublicKeys.ts b/sdk/compute/arm-compute/src/operations/sshPublicKeys.ts index e1abc960f854..62a95aeab513 100644 --- a/sdk/compute/arm-compute/src/operations/sshPublicKeys.ts +++ b/sdk/compute/arm-compute/src/operations/sshPublicKeys.ts @@ -3,116 +3,195 @@ * 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/sshPublicKeysMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SshPublicKeys } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + SshPublicKeyResource, + SshPublicKeysListBySubscriptionNextOptionalParams, + SshPublicKeysListBySubscriptionOptionalParams, + SshPublicKeysListByResourceGroupNextOptionalParams, + SshPublicKeysListByResourceGroupOptionalParams, + SshPublicKeysListBySubscriptionResponse, + SshPublicKeysListByResourceGroupResponse, + SshPublicKeysCreateOptionalParams, + SshPublicKeysCreateResponse, + SshPublicKeyUpdateResource, + SshPublicKeysUpdateOptionalParams, + SshPublicKeysUpdateResponse, + SshPublicKeysDeleteOptionalParams, + SshPublicKeysGetOptionalParams, + SshPublicKeysGetResponse, + SshPublicKeysGenerateKeyPairOptionalParams, + SshPublicKeysGenerateKeyPairResponse, + SshPublicKeysListBySubscriptionNextResponse, + SshPublicKeysListByResourceGroupNextResponse +} from "../models"; +/// /** Class representing a SshPublicKeys. */ -export class SshPublicKeys { +export class SshPublicKeysImpl implements SshPublicKeys { private readonly client: ComputeManagementClientContext; /** - * Create a SshPublicKeys. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class SshPublicKeys class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Lists all of the SSH public keys in the subscription. Use the nextLink property in the response - * to get the next page of SSH public keys. - * @param [options] The optional parameters - * @returns Promise + * Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to + * get the next page of SSH public keys. + * @param options The options parameters. */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public listBySubscription( + options?: SshPublicKeysListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listBySubscriptionOperationSpec, - callback) as Promise; + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: SshPublicKeysListBySubscriptionOptionalParams + ): 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?: SshPublicKeysListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } } /** - * Lists all of the SSH public keys in the specified resource group. Use the nextLink property in - * the response to get the next page of SSH public keys. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the + * response to get the next page of SSH public keys. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByResourceGroup( + resourceGroupName: string, + options?: SshPublicKeysListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: SshPublicKeysListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, + continuationToken, options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: SshPublicKeysListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Creates a new SSH public key resource. - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param parameters Parameters supplied to create the SSH public key. - * @param [options] The optional parameters - * @returns Promise + * Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to + * get the next page of SSH public keys. + * @param options The options parameters. */ - create(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyResource, options?: msRest.RequestOptionsBase): Promise; + private _listBySubscription( + options?: SshPublicKeysListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + /** + * Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the + * response to get the next page of SSH public keys. * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param parameters Parameters supplied to create the SSH public key. - * @param callback The callback + * @param options The options parameters. */ - create(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyResource, callback: msRest.ServiceCallback): void; + private _listByResourceGroup( + resourceGroupName: string, + options?: SshPublicKeysListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + /** + * Creates a new SSH public key resource. * @param resourceGroupName The name of the resource group. * @param sshPublicKeyName The name of the SSH public key. * @param parameters Parameters supplied to create the SSH public key. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - create(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create( + resourceGroupName: string, + sshPublicKeyName: string, + parameters: SshPublicKeyResource, + options?: SshPublicKeysCreateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - sshPublicKeyName, - parameters, - options - }, - createOperationSpec, - callback) as Promise; + { resourceGroupName, sshPublicKeyName, parameters, options }, + createOperationSpec + ); } /** @@ -120,428 +199,269 @@ export class SshPublicKeys { * @param resourceGroupName The name of the resource group. * @param sshPublicKeyName The name of the SSH public key. * @param parameters Parameters supplied to update the SSH public key. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyUpdateResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param parameters Parameters supplied to update the SSH public key. - * @param callback The callback + * @param options The options parameters. */ - update(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyUpdateResource, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param parameters Parameters supplied to update the SSH public key. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyUpdateResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, sshPublicKeyName: string, parameters: Models.SshPublicKeyUpdateResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + resourceGroupName: string, + sshPublicKeyName: string, + parameters: SshPublicKeyUpdateResource, + options?: SshPublicKeysUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - sshPublicKeyName, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; + { resourceGroupName, sshPublicKeyName, parameters, options }, + updateOperationSpec + ); } /** * Delete an SSH public key. * @param resourceGroupName The name of the resource group. * @param sshPublicKeyName The name of the SSH public key. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, sshPublicKeyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param callback The callback + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, sshPublicKeyName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, sshPublicKeyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, sshPublicKeyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + delete( + resourceGroupName: string, + sshPublicKeyName: string, + options?: SshPublicKeysDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - sshPublicKeyName, - options - }, - deleteMethodOperationSpec, - callback); + { resourceGroupName, sshPublicKeyName, options }, + deleteOperationSpec + ); } /** * Retrieves information about an SSH public key. * @param resourceGroupName The name of the resource group. * @param sshPublicKeyName The name of the SSH public key. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(resourceGroupName: string, sshPublicKeyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param callback The callback - */ - get(resourceGroupName: string, sshPublicKeyName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, sshPublicKeyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, sshPublicKeyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + sshPublicKeyName: string, + options?: SshPublicKeysGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - sshPublicKeyName, - options - }, - getOperationSpec, - callback) as Promise; + { resourceGroupName, sshPublicKeyName, options }, + getOperationSpec + ); } /** - * Generates and returns a public/private key pair and populates the SSH public key resource with - * the public key. The length of the key will be 3072 bits. This operation can only be performed - * once per SSH public key resource. - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param [options] The optional parameters - * @returns Promise - */ - generateKeyPair(resourceGroupName: string, sshPublicKeyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param sshPublicKeyName The name of the SSH public key. - * @param callback The callback - */ - generateKeyPair(resourceGroupName: string, sshPublicKeyName: string, callback: msRest.ServiceCallback): void; - /** + * Generates and returns a public/private key pair and populates the SSH public key resource with the + * public key. The length of the key will be 3072 bits. This operation can only be performed once per + * SSH public key resource. * @param resourceGroupName The name of the resource group. * @param sshPublicKeyName The name of the SSH public key. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - generateKeyPair(resourceGroupName: string, sshPublicKeyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - generateKeyPair(resourceGroupName: string, sshPublicKeyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + generateKeyPair( + resourceGroupName: string, + sshPublicKeyName: string, + options?: SshPublicKeysGenerateKeyPairOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - sshPublicKeyName, - options - }, - generateKeyPairOperationSpec, - callback) as Promise; + { resourceGroupName, sshPublicKeyName, options }, + generateKeyPairOperationSpec + ); } /** - * Lists all of the SSH public keys in the subscription. Use the nextLink property in the response - * to get the next page of SSH public keys. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - listBySubscriptionNext(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(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: SshPublicKeysListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } /** - * Lists all of the SSH public keys in the specified resource group. Use the nextLink property in - * the response to get the next page of SSH public keys. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(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 + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: SshPublicKeysListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listBySubscriptionOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.SshPublicKeysGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.SshPublicKeysGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.sshPublicKeyName, Parameters.subscriptionId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.SshPublicKeyResource, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.SshPublicKeyResource }, 201: { bodyMapper: Mappers.SshPublicKeyResource - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.sshPublicKeyName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.sshPublicKeyName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.SshPublicKeyUpdateResource, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.SshPublicKeyResource - }, - default: { - bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.sshPublicKeyName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const deleteMethodOperationSpec: msRest.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + responses: { 200: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.sshPublicKeyName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.subscriptionId, + Parameters.sshPublicKeyName ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.sshPublicKeyName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.SshPublicKeyResource - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const generateKeyPairOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.sshPublicKeyName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.sshPublicKeyName ], + headerParameters: [Parameters.accept], + serializer +}; +const generateKeyPairOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.SshPublicKeyGenerateKeyPairResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.sshPublicKeyName + ], + headerParameters: [Parameters.accept], serializer }; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SshPublicKeysGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SshPublicKeysGroupListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/usageOperations.ts b/sdk/compute/arm-compute/src/operations/usageOperations.ts index 14f7a9d6406e..de2355eec314 100644 --- a/sdk/compute/arm-compute/src/operations/usageOperations.ts +++ b/sdk/compute/arm-compute/src/operations/usageOperations.ts @@ -3,23 +3,32 @@ * 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/usageOperationsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { UsageOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + Usage, + UsageOperationsListNextOptionalParams, + UsageOperationsListOptionalParams, + UsageOperationsListResponse, + UsageOperationsListNextResponse +} from "../models"; +/// /** Class representing a UsageOperations. */ -export class UsageOperations { +export class UsageOperationsImpl implements UsageOperations { private readonly client: ComputeManagementClientContext; /** - * Create a UsageOperations. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class UsageOperations class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,107 +38,118 @@ export class UsageOperations { * Gets, for the specified location, the current compute resource usage information as well as the * limits for compute resources under the subscription. * @param location The location for which resource usage is queried. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(location: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location for which resource usage is queried. - * @param callback The callback - */ - list(location: string, callback: msRest.ServiceCallback): void; - /** - * @param location The location for which resource usage is queried. - * @param options The optional parameters - * @param callback The callback - */ - list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - location, - options + public list( + location: string, + options?: UsageOperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listOperationSpec, - callback) as Promise; + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: UsageOperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: UsageOperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } } /** * Gets, for the specified location, the current compute resource usage information as well as the * limits for compute resources under the subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * @param location The location for which resource usage is queried. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + location: string, + options?: UsageOperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, 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 location The location for which resource usage is queried. + * @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( + location: string, + nextLink: string, + options?: UsageOperationsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { location, 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}/providers/Microsoft.Compute/locations/{location}/usages", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages", - urlParameters: [ - Parameters.location1, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ListUsagesResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ListUsagesResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineExtensionImages.ts b/sdk/compute/arm-compute/src/operations/virtualMachineExtensionImages.ts index b53521d45e15..2f0c090e6472 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineExtensionImages.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineExtensionImages.ts @@ -3,23 +3,31 @@ * 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/virtualMachineExtensionImagesMappers"; +import { VirtualMachineExtensionImages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + VirtualMachineExtensionImagesGetOptionalParams, + VirtualMachineExtensionImagesGetResponse, + VirtualMachineExtensionImagesListTypesOptionalParams, + VirtualMachineExtensionImagesListTypesResponse, + VirtualMachineExtensionImagesListVersionsOptionalParams, + VirtualMachineExtensionImagesListVersionsResponse +} from "../models"; /** Class representing a VirtualMachineExtensionImages. */ -export class VirtualMachineExtensionImages { +export class VirtualMachineExtensionImagesImpl + implements VirtualMachineExtensionImages { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineExtensionImages. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineExtensionImages class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,158 +37,90 @@ export class VirtualMachineExtensionImages { * Gets a virtual machine extension image. * @param location The name of a supported Azure region. * @param publisherName - * @param type * @param version - * @param [options] The optional parameters - * @returns Promise + * @param typeParam + * @param options The options parameters. */ - get(location: string, publisherName: string, type: string, version: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName - * @param type - * @param version - * @param callback The callback - */ - get(location: string, publisherName: string, type: string, version: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName - * @param type - * @param version - * @param options The optional parameters - * @param callback The callback - */ - get(location: string, publisherName: string, type: string, version: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(location: string, publisherName: string, type: string, version: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + location: string, + publisherName: string, + version: string, + typeParam: string, + options?: VirtualMachineExtensionImagesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - type, - version, - options - }, - getOperationSpec, - callback) as Promise; + { location, publisherName, version, typeParam, options }, + getOperationSpec + ); } /** * Gets a list of virtual machine extension image types. * @param location The name of a supported Azure region. * @param publisherName - * @param [options] The optional parameters - * @returns Promise - */ - listTypes(location: string, publisherName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName - * @param callback The callback + * @param options The options parameters. */ - listTypes(location: string, publisherName: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName - * @param options The optional parameters - * @param callback The callback - */ - listTypes(location: string, publisherName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listTypes(location: string, publisherName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listTypes( + location: string, + publisherName: string, + options?: VirtualMachineExtensionImagesListTypesOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - options - }, - listTypesOperationSpec, - callback) as Promise; + { location, publisherName, options }, + listTypesOperationSpec + ); } /** * Gets a list of virtual machine extension image versions. * @param location The name of a supported Azure region. * @param publisherName - * @param type - * @param [options] The optional parameters - * @returns Promise - */ - listVersions(location: string, publisherName: string, type: string, options?: Models.VirtualMachineExtensionImagesListVersionsOptionalParams): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName - * @param type - * @param callback The callback + * @param typeParam + * @param options The options parameters. */ - listVersions(location: string, publisherName: string, type: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName - * @param type - * @param options The optional parameters - * @param callback The callback - */ - listVersions(location: string, publisherName: string, type: string, options: Models.VirtualMachineExtensionImagesListVersionsOptionalParams, callback: msRest.ServiceCallback): void; - listVersions(location: string, publisherName: string, type: string, options?: Models.VirtualMachineExtensionImagesListVersionsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listVersions( + location: string, + publisherName: string, + typeParam: string, + options?: VirtualMachineExtensionImagesListVersionsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - type, - options - }, - listVersionsOperationSpec, - callback) as Promise; + { location, publisherName, typeParam, options }, + listVersionsOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", - urlParameters: [ - Parameters.location0, - Parameters.publisherName, - Parameters.type, - Parameters.version, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.VirtualMachineExtensionImage - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listTypesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.location0, + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, Parameters.publisherName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.typeParam, + Parameters.version ], + headerParameters: [Parameters.accept], + serializer +}; +const listTypesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types", + httpMethod: "GET", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -191,36 +131,25 @@ const listTypesOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName + ], + headerParameters: [Parameters.accept], serializer }; - -const listVersionsOperationSpec: msRest.OperationSpec = { +const listVersionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions", - urlParameters: [ - Parameters.location0, - Parameters.publisherName, - Parameters.type, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.filter, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -231,10 +160,21 @@ const listVersionsOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.orderby + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName, + Parameters.typeParam + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts b/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts index a1d8b68fa3d8..b0ffd6ada59f 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineExtensions.ts @@ -3,24 +3,38 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineExtensionsMappers"; +import { VirtualMachineExtensions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineExtension, + VirtualMachineExtensionsCreateOrUpdateOptionalParams, + VirtualMachineExtensionsCreateOrUpdateResponse, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsUpdateOptionalParams, + VirtualMachineExtensionsUpdateResponse, + VirtualMachineExtensionsDeleteOptionalParams, + VirtualMachineExtensionsGetOptionalParams, + VirtualMachineExtensionsGetResponse, + VirtualMachineExtensionsListOptionalParams, + VirtualMachineExtensionsListResponse +} from "../models"; /** Class representing a VirtualMachineExtensions. */ -export class VirtualMachineExtensions { +export class VirtualMachineExtensionsImpl implements VirtualMachineExtensions { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineExtensions. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineExtensions class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -31,256 +45,353 @@ export class VirtualMachineExtensions { * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineExtension, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,vmName,vmExtensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } + async beginCreateOrUpdate( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtension, + options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineExtensionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * The operation to update the extension. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,vmName,vmExtensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + const lro = new CoreClientLro( + sendOperation, + { + resourceGroupName, + vmName, + vmExtensionName, + extensionParameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to delete the extension. + * The operation to create or update the extension. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. + * @param vmName The name of the virtual machine where the extension should be created or updated. * @param vmExtensionName The name of the virtual machine extension. - * @param [options] The optional parameters - * @returns Promise + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,vmName,vmExtensionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtension, + options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vmName, + vmExtensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); } /** - * The operation to get the extension. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param vmExtensionName The name of the virtual machine extension. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: Models.VirtualMachineExtensionsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param vmExtensionName The name of the virtual machine extension. - * @param callback The callback - */ - get(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to update the extension. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. + * @param vmName The name of the virtual machine where the extension should be updated. * @param vmExtensionName The name of the virtual machine extension. - * @param options The optional parameters - * @param callback The callback + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. */ - get(resourceGroupName: string, vmName: string, vmExtensionName: string, options: Models.VirtualMachineExtensionsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: Models.VirtualMachineExtensionsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginUpdate( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtensionUpdate, + options?: VirtualMachineExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineExtensionsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmName, vmExtensionName, + extensionParameters, options }, - getOperationSpec, - callback) as Promise; + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to get all extensions of a Virtual Machine. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, vmName: string, options?: Models.VirtualMachineExtensionsListOptionalParams): Promise; - /** + * The operation to update the extension. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param callback The callback + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. */ - list(resourceGroupName: string, vmName: string, callback: msRest.ServiceCallback): void; + async beginUpdateAndWait( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtensionUpdate, + options?: VirtualMachineExtensionsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmName, + vmExtensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); + } + /** + * The operation to delete the extension. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the extension. - * @param options The optional parameters - * @param callback The callback + * @param vmName The name of the virtual machine where the extension should be deleted. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. */ - list(resourceGroupName: string, vmName: string, options: Models.VirtualMachineExtensionsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, vmName: string, options?: Models.VirtualMachineExtensionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - listOperationSpec, - callback) as Promise; + async beginDelete( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + options?: VirtualMachineExtensionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, vmExtensionName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to create or update the extension. + * The operation to delete the extension. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmName The name of the virtual machine where the extension should be deleted. * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineExtension, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - vmExtensionName, - extensionParameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + options?: VirtualMachineExtensionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmName, + vmExtensionName, + options + ); + return poller.pollUntilDone(); } /** - * The operation to update the extension. + * The operation to get the extension. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmName The name of the virtual machine containing the extension. * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - vmExtensionName, - extensionParameters, - options - }, - beginUpdateOperationSpec, - options); + get( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + options?: VirtualMachineExtensionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmName, vmExtensionName, options }, + getOperationSpec + ); } /** - * The operation to delete the extension. + * The operation to get all extensions of a Virtual Machine. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the extension should be deleted. - * @param vmExtensionName The name of the virtual machine extension. - * @param [options] The optional parameters - * @returns Promise + * @param vmName The name of the virtual machine containing the extension. + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - vmExtensionName, - options - }, - beginDeleteMethodOperationSpec, - options); + list( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineExtensionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmName, options }, + listOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmName, - Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.VirtualMachineExtension }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachineExtension + }, + 202: { + bodyMapper: Mappers.VirtualMachineExtension + }, + 204: { + bodyMapper: Mappers.VirtualMachineExtension } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions", + requestBody: Parameters.extensionParameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 + Parameters.vmExtensionName ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineExtensionsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmName, - Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.VirtualMachineExtension, - required: true - } - }, +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.VirtualMachineExtension @@ -288,68 +399,77 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.VirtualMachineExtension }, - default: { - bodyMapper: Mappers.CloudError + 202: { + bodyMapper: Mappers.VirtualMachineExtension + }, + 204: { + bodyMapper: Mappers.VirtualMachineExtension } }, + requestBody: Parameters.extensionParameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName, + Parameters.vmExtensionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmExtensionName ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.VirtualMachineExtensionUpdate, - required: true - } - }, + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineExtension - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmExtensionName ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineExtensionsListResult } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineImages.ts b/sdk/compute/arm-compute/src/operations/virtualMachineImages.ts index 111aa91f7d8a..8fddd13801b0 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineImages.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineImages.ts @@ -3,23 +3,34 @@ * 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/virtualMachineImagesMappers"; +import { VirtualMachineImages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + VirtualMachineImagesGetOptionalParams, + VirtualMachineImagesGetResponse, + VirtualMachineImagesListOptionalParams, + VirtualMachineImagesListResponse, + VirtualMachineImagesListOffersOptionalParams, + VirtualMachineImagesListOffersResponse, + VirtualMachineImagesListPublishersOptionalParams, + VirtualMachineImagesListPublishersResponse, + VirtualMachineImagesListSkusOptionalParams, + VirtualMachineImagesListSkusResponse +} from "../models"; /** Class representing a VirtualMachineImages. */ -export class VirtualMachineImages { +export class VirtualMachineImagesImpl implements VirtualMachineImages { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineImages. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineImages class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -32,142 +43,74 @@ export class VirtualMachineImages { * @param offer A valid image publisher offer. * @param skus A valid image SKU. * @param version A valid image SKU version. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(location: string, publisherName: string, offer: string, skus: string, version: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param version A valid image SKU version. - * @param callback The callback - */ - get(location: string, publisherName: string, offer: string, skus: string, version: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param version A valid image SKU version. - * @param options The optional parameters - * @param callback The callback - */ - get(location: string, publisherName: string, offer: string, skus: string, version: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(location: string, publisherName: string, offer: string, skus: string, version: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + location: string, + publisherName: string, + offer: string, + skus: string, + version: string, + options?: VirtualMachineImagesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - offer, - skus, - version, - options - }, - getOperationSpec, - callback) as Promise; + { location, publisherName, offer, skus, version, options }, + getOperationSpec + ); } /** - * Gets a list of all virtual machine image versions for the specified location, publisher, offer, - * and SKU. + * Gets a list of all virtual machine image versions for the specified location, publisher, offer, and + * SKU. * @param location The name of a supported Azure region. * @param publisherName A valid image publisher. * @param offer A valid image publisher offer. * @param skus A valid image SKU. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(location: string, publisherName: string, offer: string, skus: string, options?: Models.VirtualMachineImagesListOptionalParams): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param callback The callback - */ - list(location: string, publisherName: string, offer: string, skus: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param options The optional parameters - * @param callback The callback - */ - list(location: string, publisherName: string, offer: string, skus: string, options: Models.VirtualMachineImagesListOptionalParams, callback: msRest.ServiceCallback): void; - list(location: string, publisherName: string, offer: string, skus: string, options?: Models.VirtualMachineImagesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + location: string, + publisherName: string, + offer: string, + skus: string, + options?: VirtualMachineImagesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - offer, - skus, - options - }, - listOperationSpec, - callback) as Promise; + { location, publisherName, offer, skus, options }, + listOperationSpec + ); } /** * Gets a list of virtual machine image offers for the specified location and publisher. * @param location The name of a supported Azure region. * @param publisherName A valid image publisher. - * @param [options] The optional parameters - * @returns Promise - */ - listOffers(location: string, publisherName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param callback The callback - */ - listOffers(location: string, publisherName: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listOffers(location: string, publisherName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOffers(location: string, publisherName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listOffers( + location: string, + publisherName: string, + options?: VirtualMachineImagesListOffersOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - options - }, - listOffersOperationSpec, - callback) as Promise; + { location, publisherName, options }, + listOffersOperationSpec + ); } /** * Gets a list of virtual machine image publishers for the specified Azure location. * @param location The name of a supported Azure region. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listPublishers(location: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param callback The callback - */ - listPublishers(location: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param options The optional parameters - * @param callback The callback - */ - listPublishers(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPublishers(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listPublishers( + location: string, + options?: VirtualMachineImagesListPublishersOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listPublishersOperationSpec, - callback) as Promise; + { location, options }, + listPublishersOperationSpec + ); } /** @@ -175,91 +118,52 @@ export class VirtualMachineImages { * @param location The name of a supported Azure region. * @param publisherName A valid image publisher. * @param offer A valid image publisher offer. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listSkus(location: string, publisherName: string, offer: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param callback The callback - */ - listSkus(location: string, publisherName: string, offer: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param options The optional parameters - * @param callback The callback - */ - listSkus(location: string, publisherName: string, offer: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSkus(location: string, publisherName: string, offer: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSkus( + location: string, + publisherName: string, + offer: string, + options?: VirtualMachineImagesListSkusOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - publisherName, - offer, - options - }, - listSkusOperationSpec, - callback) as Promise; + { location, publisherName, offer, options }, + listSkusOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", - urlParameters: [ - Parameters.location0, - Parameters.publisherName, - Parameters.offer, - Parameters.skus, - Parameters.version, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.VirtualMachineImage - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.location0, + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, Parameters.publisherName, + Parameters.version, Parameters.offer, - Parameters.skus, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.skus ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", + httpMethod: "GET", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -270,32 +174,32 @@ const listOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOffersOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers", - urlParameters: [ - Parameters.location0, - Parameters.publisherName, - Parameters.subscriptionId - ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion, + Parameters.expand, + Parameters.top, + Parameters.orderby ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName, + Parameters.offer, + Parameters.skus ], + headerParameters: [Parameters.accept], + serializer +}; +const listOffersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers", + httpMethod: "GET", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -306,31 +210,25 @@ const listOffersOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName + ], + headerParameters: [Parameters.accept], serializer }; - -const listPublishersOperationSpec: msRest.OperationSpec = { +const listPublishersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers", - urlParameters: [ - Parameters.location0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -341,33 +239,24 @@ const listPublishersOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], serializer }; - -const listSkusOperationSpec: msRest.OperationSpec = { +const listSkusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", - urlParameters: [ - Parameters.location0, - Parameters.publisherName, - Parameters.offer, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -378,10 +267,16 @@ const listSkusOperationSpec: msRest.OperationSpec = { } } } - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName, + Parameters.offer + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineImagesEdgeZone.ts b/sdk/compute/arm-compute/src/operations/virtualMachineImagesEdgeZone.ts index c1ea54bba4af..82ea168f59d5 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineImagesEdgeZone.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineImagesEdgeZone.ts @@ -3,23 +3,35 @@ * 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/virtualMachineImagesEdgeZoneMappers"; +import { VirtualMachineImagesEdgeZone } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + VirtualMachineImagesEdgeZoneGetOptionalParams, + VirtualMachineImagesEdgeZoneGetResponse, + VirtualMachineImagesEdgeZoneListOptionalParams, + VirtualMachineImagesEdgeZoneListResponse, + VirtualMachineImagesEdgeZoneListOffersOptionalParams, + VirtualMachineImagesEdgeZoneListOffersResponse, + VirtualMachineImagesEdgeZoneListPublishersOptionalParams, + VirtualMachineImagesEdgeZoneListPublishersResponse, + VirtualMachineImagesEdgeZoneListSkusOptionalParams, + VirtualMachineImagesEdgeZoneListSkusResponse +} from "../models"; /** Class representing a VirtualMachineImagesEdgeZone. */ -export class VirtualMachineImagesEdgeZone { +export class VirtualMachineImagesEdgeZoneImpl + implements VirtualMachineImagesEdgeZone { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineImagesEdgeZone. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineImagesEdgeZone class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -33,89 +45,45 @@ export class VirtualMachineImagesEdgeZone { * @param offer A valid image publisher offer. * @param skus A valid image SKU. * @param version A valid image SKU version. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, version: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param version A valid image SKU version. - * @param callback The callback - */ - get(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, version: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param version A valid image SKU version. - * @param options The optional parameters - * @param callback The callback - */ - get(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, version: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, version: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + location: string, + edgeZone: string, + publisherName: string, + offer: string, + skus: string, + version: string, + options?: VirtualMachineImagesEdgeZoneGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - edgeZone, - publisherName, - offer, - skus, - version, - options - }, - getOperationSpec, - callback) as Promise; + { location, edgeZone, publisherName, offer, skus, version, options }, + getOperationSpec + ); } /** - * Gets a list of all virtual machine image versions for the specified location, edge zone, - * publisher, offer, and SKU. + * Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, + * offer, and SKU. * @param location The name of a supported Azure region. * @param edgeZone The name of the edge zone. * @param publisherName A valid image publisher. * @param offer A valid image publisher offer. * @param skus A valid image SKU. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, options?: Models.VirtualMachineImagesEdgeZoneListOptionalParams): Promise; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param callback The callback - */ - list(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param skus A valid image SKU. - * @param options The optional parameters - * @param callback The callback - */ - list(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, options: Models.VirtualMachineImagesEdgeZoneListOptionalParams, callback: msRest.ServiceCallback): void; - list(location: string, edgeZone: string, publisherName: string, offer: string, skus: string, options?: Models.VirtualMachineImagesEdgeZoneListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list( + location: string, + edgeZone: string, + publisherName: string, + offer: string, + skus: string, + options?: VirtualMachineImagesEdgeZoneListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - edgeZone, - publisherName, - offer, - skus, - options - }, - listOperationSpec, - callback) as Promise; + { location, edgeZone, publisherName, offer, skus, options }, + listOperationSpec + ); } /** @@ -123,67 +91,35 @@ export class VirtualMachineImagesEdgeZone { * @param location The name of a supported Azure region. * @param edgeZone The name of the edge zone. * @param publisherName A valid image publisher. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listOffers(location: string, edgeZone: string, publisherName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param callback The callback - */ - listOffers(location: string, edgeZone: string, publisherName: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param options The optional parameters - * @param callback The callback - */ - listOffers(location: string, edgeZone: string, publisherName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOffers(location: string, edgeZone: string, publisherName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listOffers( + location: string, + edgeZone: string, + publisherName: string, + options?: VirtualMachineImagesEdgeZoneListOffersOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - edgeZone, - publisherName, - options - }, - listOffersOperationSpec, - callback) as Promise; + { location, edgeZone, publisherName, options }, + listOffersOperationSpec + ); } /** * Gets a list of virtual machine image publishers for the specified Azure location and edge zone. * @param location The name of a supported Azure region. * @param edgeZone The name of the edge zone. - * @param [options] The optional parameters - * @returns Promise - */ - listPublishers(location: string, edgeZone: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param callback The callback - */ - listPublishers(location: string, edgeZone: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listPublishers(location: string, edgeZone: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPublishers(location: string, edgeZone: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listPublishers( + location: string, + edgeZone: string, + options?: VirtualMachineImagesEdgeZoneListPublishersOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - edgeZone, - options - }, - listPublishersOperationSpec, - callback) as Promise; + { location, edgeZone, options }, + listPublishersOperationSpec + ); } /** @@ -193,61 +129,28 @@ export class VirtualMachineImagesEdgeZone { * @param edgeZone The name of the edge zone. * @param publisherName A valid image publisher. * @param offer A valid image publisher offer. - * @param [options] The optional parameters - * @returns Promise - */ - listSkus(location: string, edgeZone: string, publisherName: string, offer: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param callback The callback + * @param options The options parameters. */ - listSkus(location: string, edgeZone: string, publisherName: string, offer: string, callback: msRest.ServiceCallback): void; - /** - * @param location The name of a supported Azure region. - * @param edgeZone The name of the edge zone. - * @param publisherName A valid image publisher. - * @param offer A valid image publisher offer. - * @param options The optional parameters - * @param callback The callback - */ - listSkus(location: string, edgeZone: string, publisherName: string, offer: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSkus(location: string, edgeZone: string, publisherName: string, offer: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSkus( + location: string, + edgeZone: string, + publisherName: string, + offer: string, + options?: VirtualMachineImagesEdgeZoneListSkusOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - edgeZone, - publisherName, - offer, - options - }, - listSkusOperationSpec, - callback) as Promise; + { location, edgeZone, publisherName, offer, options }, + listSkusOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", - urlParameters: [ - Parameters.location0, - Parameters.edgeZone, - Parameters.publisherName, - Parameters.offer, - Parameters.skus, - Parameters.version, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.VirtualMachineImage @@ -256,33 +159,27 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.location0, - Parameters.edgeZone, + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, Parameters.publisherName, + Parameters.version, Parameters.offer, Parameters.skus, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.top, - Parameters.orderby, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.edgeZone ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", + httpMethod: "GET", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -298,28 +195,31 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOffersOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers", - urlParameters: [ - Parameters.location0, - Parameters.edgeZone, - Parameters.publisherName, - Parameters.subscriptionId - ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion, + Parameters.expand, + Parameters.top, + Parameters.orderby ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName, + Parameters.offer, + Parameters.skus, + Parameters.edgeZone ], + headerParameters: [Parameters.accept], + serializer +}; +const listOffersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers", + httpMethod: "GET", responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -335,27 +235,24 @@ const listOffersOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName, + Parameters.edgeZone + ], + headerParameters: [Parameters.accept], serializer }; - -const listPublishersOperationSpec: msRest.OperationSpec = { +const listPublishersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers", - urlParameters: [ - Parameters.location0, - Parameters.edgeZone, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -371,29 +268,23 @@ const listPublishersOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.edgeZone + ], + headerParameters: [Parameters.accept], serializer }; - -const listSkusOperationSpec: msRest.OperationSpec = { +const listSkusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", - urlParameters: [ - Parameters.location0, - Parameters.edgeZone, - Parameters.publisherName, - Parameters.offer, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: { - serializedName: "parsedResponse", type: { name: "Sequence", element: { @@ -409,5 +300,15 @@ const listSkusOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.publisherName, + Parameters.offer, + Parameters.edgeZone + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts b/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts index db89b8bf21b2..6d85c3ef587d 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineRunCommands.ts @@ -3,24 +3,51 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineRunCommandsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachineRunCommands } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + RunCommandDocumentBase, + VirtualMachineRunCommandsListNextOptionalParams, + VirtualMachineRunCommandsListOptionalParams, + VirtualMachineRunCommand, + VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams, + VirtualMachineRunCommandsListByVirtualMachineOptionalParams, + VirtualMachineRunCommandsListResponse, + VirtualMachineRunCommandsGetOptionalParams, + VirtualMachineRunCommandsGetResponse, + VirtualMachineRunCommandsCreateOrUpdateOptionalParams, + VirtualMachineRunCommandsCreateOrUpdateResponse, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsUpdateOptionalParams, + VirtualMachineRunCommandsUpdateResponse, + VirtualMachineRunCommandsDeleteOptionalParams, + VirtualMachineRunCommandsGetByVirtualMachineOptionalParams, + VirtualMachineRunCommandsGetByVirtualMachineResponse, + VirtualMachineRunCommandsListByVirtualMachineResponse, + VirtualMachineRunCommandsListNextResponse, + VirtualMachineRunCommandsListByVirtualMachineNextResponse +} from "../models"; +/// /** Class representing a VirtualMachineRunCommands. */ -export class VirtualMachineRunCommands { +export class VirtualMachineRunCommandsImpl + implements VirtualMachineRunCommands { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineRunCommands. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineRunCommands class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,532 +56,688 @@ export class VirtualMachineRunCommands { /** * Lists all available run commands for a subscription in a location. * @param location The location upon which run commands is queried. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(location: string, options?: msRest.RequestOptionsBase): Promise; + public list( + location: string, + options?: VirtualMachineRunCommandsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: VirtualMachineRunCommandsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + location: string, + options?: VirtualMachineRunCommandsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + /** - * @param location The location upon which run commands is queried. - * @param callback The callback + * The operation to get all run commands of a Virtual Machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param options The options parameters. */ - list(location: string, callback: msRest.ServiceCallback): void; + public listByVirtualMachine( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineRunCommandsListByVirtualMachineOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByVirtualMachinePagingAll( + resourceGroupName, + vmName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByVirtualMachinePagingPage( + resourceGroupName, + vmName, + options + ); + } + }; + } + + private async *listByVirtualMachinePagingPage( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineRunCommandsListByVirtualMachineOptionalParams + ): AsyncIterableIterator { + let result = await this._listByVirtualMachine( + resourceGroupName, + vmName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByVirtualMachineNext( + resourceGroupName, + vmName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByVirtualMachinePagingAll( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineRunCommandsListByVirtualMachineOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByVirtualMachinePagingPage( + resourceGroupName, + vmName, + options + )) { + yield* page; + } + } + /** + * Lists all available run commands for a subscription in a location. * @param location The location upon which run commands is queried. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _list( + location: string, + options?: VirtualMachineRunCommandsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listOperationSpec, - callback) as Promise; + { location, options }, + listOperationSpec + ); } /** * Gets specific run command for a subscription in a location. * @param location The location upon which run commands is queried. * @param commandId The command id. - * @param [options] The optional parameters - * @returns Promise - */ - get(location: string, commandId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location upon which run commands is queried. - * @param commandId The command id. - * @param callback The callback - */ - get(location: string, commandId: string, callback: msRest.ServiceCallback): void; - /** - * @param location The location upon which run commands is queried. - * @param commandId The command id. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(location: string, commandId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(location: string, commandId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + location: string, + commandId: string, + options?: VirtualMachineRunCommandsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - commandId, - options - }, - getOperationSpec, - callback) as Promise; + { location, commandId, options }, + getOperationSpec + ); } /** * The operation to create or update the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the run command should be created or - * updated. + * @param vmName The name of the virtual machine where the run command should be created or updated. * @param runCommandName The name of the virtual machine run command. * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,vmName,runCommandName,runCommand,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineRunCommandsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, runCommandName, runCommand, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to update the run command. + * The operation to create or update the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the run command should be updated. + * @param vmName The name of the virtual machine where the run command should be created or updated. * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. */ - update(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,vmName,runCommandName,runCommand,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vmName, + runCommandName, + runCommand, + options + ); + return poller.pollUntilDone(); } /** - * The operation to delete the run command. + * The operation to update the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the run command should be deleted. + * @param vmName The name of the virtual machine where the run command should be updated. * @param runCommandName The name of the virtual machine run command. - * @param [options] The optional parameters - * @returns Promise + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, vmName: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,vmName,runCommandName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdate( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineRunCommandsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineRunCommandsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, runCommandName, runCommand, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to get the run command. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the run command. - * @param runCommandName The name of the virtual machine run command. - * @param [options] The optional parameters - * @returns Promise - */ - getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options?: Models.VirtualMachineRunCommandsGetByVirtualMachineOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the run command. - * @param runCommandName The name of the virtual machine run command. - * @param callback The callback - */ - getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to update the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the run command. + * @param vmName The name of the virtual machine where the run command should be updated. * @param runCommandName The name of the virtual machine run command. - * @param options The optional parameters - * @param callback The callback + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. */ - getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options: Models.VirtualMachineRunCommandsGetByVirtualMachineOptionalParams, callback: msRest.ServiceCallback): void; - getByVirtualMachine(resourceGroupName: string, vmName: string, runCommandName: string, options?: Models.VirtualMachineRunCommandsGetByVirtualMachineOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - runCommandName, - options - }, - getByVirtualMachineOperationSpec, - callback) as Promise; + async beginUpdateAndWait( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineRunCommandsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmName, + runCommandName, + runCommand, + options + ); + return poller.pollUntilDone(); } /** - * The operation to get all run commands of a Virtual Machine. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the run command. - * @param [options] The optional parameters - * @returns Promise - */ - listByVirtualMachine(resourceGroupName: string, vmName: string, options?: Models.VirtualMachineRunCommandsListByVirtualMachineOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the run command. - * @param callback The callback - */ - listByVirtualMachine(resourceGroupName: string, vmName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to delete the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine containing the run command. - * @param options The optional parameters - * @param callback The callback + * @param vmName The name of the virtual machine where the run command should be deleted. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. */ - listByVirtualMachine(resourceGroupName: string, vmName: string, options: Models.VirtualMachineRunCommandsListByVirtualMachineOptionalParams, callback: msRest.ServiceCallback): void; - listByVirtualMachine(resourceGroupName: string, vmName: string, options?: Models.VirtualMachineRunCommandsListByVirtualMachineOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - listByVirtualMachineOperationSpec, - callback) as Promise; + async beginDelete( + resourceGroupName: string, + vmName: string, + runCommandName: string, + options?: VirtualMachineRunCommandsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, runCommandName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to create or update the run command. + * The operation to delete the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the run command should be created or - * updated. + * @param vmName The name of the virtual machine where the run command should be deleted. * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - runCommandName, - runCommand, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + vmName: string, + runCommandName: string, + options?: VirtualMachineRunCommandsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmName, + runCommandName, + options + ); + return poller.pollUntilDone(); } /** - * The operation to update the run command. + * The operation to get the run command. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the run command should be updated. + * @param vmName The name of the virtual machine containing the run command. * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, vmName: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - runCommandName, - runCommand, - options - }, - beginUpdateOperationSpec, - options); + getByVirtualMachine( + resourceGroupName: string, + vmName: string, + runCommandName: string, + options?: VirtualMachineRunCommandsGetByVirtualMachineOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmName, runCommandName, options }, + getByVirtualMachineOperationSpec + ); } /** - * The operation to delete the run command. + * The operation to get all run commands of a Virtual Machine. * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine where the run command should be deleted. - * @param runCommandName The name of the virtual machine run command. - * @param [options] The optional parameters - * @returns Promise + * @param vmName The name of the virtual machine containing the run command. + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - runCommandName, - options - }, - beginDeleteMethodOperationSpec, - options); + private _listByVirtualMachine( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineRunCommandsListByVirtualMachineOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmName, options }, + listByVirtualMachineOperationSpec + ); } /** - * Lists all available run commands for a subscription in a location. - * @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 location The location upon which run commands is queried. + * @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( + location: string, + nextLink: string, + options?: VirtualMachineRunCommandsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { location, nextLink, options }, + listNextOperationSpec + ); } /** - * The operation to get all run commands of a Virtual Machine. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByVirtualMachineNext(nextPageLink: string, options?: Models.VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByVirtualMachineNext(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 + * ListByVirtualMachineNext + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param nextLink The nextLink from the previous successful call to the ListByVirtualMachine method. + * @param options The options parameters. */ - listByVirtualMachineNext(nextPageLink: string, options: Models.VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams, callback: msRest.ServiceCallback): void; - listByVirtualMachineNext(nextPageLink: string, options?: Models.VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByVirtualMachineNext( + resourceGroupName: string, + vmName: string, + nextLink: string, + options?: VirtualMachineRunCommandsListByVirtualMachineNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByVirtualMachineNextOperationSpec, - callback) as Promise; + { resourceGroupName, vmName, nextLink, options }, + listByVirtualMachineNextOperationSpec + ); } } - // 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}/providers/Microsoft.Compute/locations/{location}/runCommands", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", - urlParameters: [ - Parameters.location1, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.RunCommandListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept1], serializer }; - -const getOperationSpec: msRest.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", + responses: { + 200: { + bodyMapper: Mappers.RunCommandDocument + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, Parameters.location1, - Parameters.commandId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.commandId ], + headerParameters: [Parameters.accept1], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.RunCommandDocument + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 201: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 202: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 204: { + bodyMapper: Mappers.VirtualMachineRunCommand }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getByVirtualMachineOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + requestBody: Parameters.runCommand, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.runCommandName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.runCommandName ], + headerParameters: [Parameters.contentType, Parameters.accept1], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.VirtualMachineRunCommand }, + 201: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 202: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 204: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listByVirtualMachineOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands", + requestBody: Parameters.runCommand1, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.runCommandName ], + headerParameters: [Parameters.contentType, Parameters.accept1], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.VirtualMachineRunCommandsListResult - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.runCommandName, - Parameters.subscriptionId + Parameters.runCommandName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "runCommand", - mapper: { - ...Mappers.VirtualMachineRunCommand, - required: true - } - }, + headerParameters: [Parameters.accept1], + serializer +}; +const getByVirtualMachineOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineRunCommand }, - 201: { - bodyMapper: Mappers.VirtualMachineRunCommand - }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmName, - Parameters.runCommandName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.runCommandName ], - requestBody: { - parameterPath: "runCommand", - mapper: { - ...Mappers.VirtualMachineRunCommandUpdate, - required: true - } - }, + headerParameters: [Parameters.accept1], + serializer +}; +const listByVirtualMachineOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachineRunCommand + bodyMapper: Mappers.VirtualMachineRunCommandsListResult }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmName, - Parameters.runCommandName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept1], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RunCommandListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location1 + ], + headerParameters: [Parameters.accept1], serializer }; - -const listByVirtualMachineNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByVirtualMachineNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineRunCommandsListResult @@ -563,5 +746,14 @@ const listByVirtualMachineNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vmName + ], + headerParameters: [Parameters.accept1], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts index 77d868e009f9..4300c316315d 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetExtensions.ts @@ -3,151 +3,269 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineScaleSetExtensionsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachineScaleSetExtensions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionsListNextOptionalParams, + VirtualMachineScaleSetExtensionsListOptionalParams, + VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetExtensionsUpdateOptionalParams, + VirtualMachineScaleSetExtensionsUpdateResponse, + VirtualMachineScaleSetExtensionsDeleteOptionalParams, + VirtualMachineScaleSetExtensionsGetOptionalParams, + VirtualMachineScaleSetExtensionsGetResponse, + VirtualMachineScaleSetExtensionsListResponse, + VirtualMachineScaleSetExtensionsListNextResponse +} from "../models"; +/// /** Class representing a VirtualMachineScaleSetExtensions. */ -export class VirtualMachineScaleSetExtensions { +export class VirtualMachineScaleSetExtensionsImpl + implements VirtualMachineScaleSetExtensions { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineScaleSetExtensions. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineScaleSetExtensions class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * The operation to create or update an extension. + * Gets a list of all extensions in a VM scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or - * updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Parameters supplied to the Create VM scale set Extension operation. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the VM scale set containing the extension. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetExtension, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,vmScaleSetName,vmssExtensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public list( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetExtensionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vmScaleSetName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, vmScaleSetName, options); + } + }; } - /** - * The operation to update an extension. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be updated. - * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Parameters supplied to the Update VM scale set Extension operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,vmScaleSetName,vmssExtensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + private async *listPagingPage( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetExtensionsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, vmScaleSetName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vmScaleSetName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * The operation to delete the extension. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. - * @param vmssExtensionName The name of the VM scale set extension. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,vmScaleSetName,vmssExtensionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + private async *listPagingAll( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetExtensionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vmScaleSetName, + options + )) { + yield* page; + } } /** - * The operation to get the extension. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set containing the extension. - * @param vmssExtensionName The name of the VM scale set extension. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: Models.VirtualMachineScaleSetExtensionsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set containing the extension. - * @param vmssExtensionName The name of the VM scale set extension. - * @param callback The callback - */ - get(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to create or update an extension. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set containing the extension. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. * @param vmssExtensionName The name of the VM scale set extension. - * @param options The optional parameters - * @param callback The callback + * @param extensionParameters Parameters supplied to the Create VM scale set Extension operation. + * @param options The options parameters. */ - get(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: Models.VirtualMachineScaleSetExtensionsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: Models.VirtualMachineScaleSetExtensionsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtension, + options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse + >, + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, vmssExtensionName, + extensionParameters, options }, - getOperationSpec, - callback) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets a list of all extensions in a VM scale set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set containing the extension. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set containing the extension. - * @param callback The callback - */ - list(resourceGroupName: string, vmScaleSetName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to create or update an extension. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set containing the extension. - * @param options The optional parameters - * @param callback The callback + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param vmssExtensionName The name of the VM scale set extension. + * @param extensionParameters Parameters supplied to the Create VM scale set Extension operation. + * @param options The options parameters. */ - list(resourceGroupName: string, vmScaleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - listOperationSpec, - callback) as Promise; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtension, + options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vmScaleSetName, + vmssExtensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); } /** - * The operation to create or update an extension. + * The operation to update an extension. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or - * updated. + * @param vmScaleSetName The name of the VM scale set where the extension should be updated. * @param vmssExtensionName The name of the VM scale set extension. - * @param extensionParameters Parameters supplied to the Create VM scale set Extension operation. - * @param [options] The optional parameters - * @returns Promise + * @param extensionParameters Parameters supplied to the Update VM scale set Extension operation. + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetExtension, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtensionUpdate, + options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetExtensionsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, @@ -155,8 +273,9 @@ export class VirtualMachineScaleSetExtensions { extensionParameters, options }, - beginCreateOrUpdateOperationSpec, - options); + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** @@ -165,20 +284,23 @@ export class VirtualMachineScaleSetExtensions { * @param vmScaleSetName The name of the VM scale set where the extension should be updated. * @param vmssExtensionName The name of the VM scale set extension. * @param extensionParameters Parameters supplied to the Update VM scale set Extension operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - extensionParameters, - options - }, - beginUpdateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtensionUpdate, + options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmScaleSetName, + vmssExtensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); } /** @@ -186,126 +308,176 @@ export class VirtualMachineScaleSetExtensions { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. * @param vmssExtensionName The name of the VM scale set extension. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - vmssExtensionName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, vmssExtensionName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets a list of all extensions in a VM scale set. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. + * @param vmssExtensionName The name of the VM scale set extension. + * @param options The options parameters. */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + async beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmScaleSetName, + vmssExtensionName, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * The operation to get the extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set containing the extension. + * @param vmssExtensionName The name of the VM scale set extension. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + get( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + options?: VirtualMachineScaleSetExtensionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, vmssExtensionName, options }, + getOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * Gets a list of all extensions in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set containing the extension. + * @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 _list( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetExtensionsListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, vmScaleSetName, options }, + listOperationSpec + ); } -} + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set containing the extension. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vmScaleSetName: string, + nextLink: string, + options?: VirtualMachineScaleSetExtensionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, nextLink, options }, + listNextOperationSpec + ); + } +} // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.vmssExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetExtension }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachineScaleSetExtension + }, + 202: { + bodyMapper: Mappers.VirtualMachineScaleSetExtension + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSetExtension } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions", + requestBody: Parameters.extensionParameters2, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmssExtensionName ], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetExtensionListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.vmssExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.VirtualMachineScaleSetExtension, - required: true - } - }, +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetExtension @@ -313,95 +485,96 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.VirtualMachineScaleSetExtension }, - default: { - bodyMapper: Mappers.CloudError + 202: { + bodyMapper: Mappers.VirtualMachineScaleSetExtension + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSetExtension } }, + requestBody: Parameters.extensionParameters3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName, + Parameters.vmssExtensionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.vmssExtensionName, - Parameters.subscriptionId + Parameters.vmssExtensionName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.VirtualMachineScaleSetExtensionUpdate, - required: true - } - }, + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetExtension - }, - 201: { - bodyMapper: Mappers.VirtualMachineScaleSetExtension - }, - default: { - bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.vmssExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmssExtensionName ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineScaleSetExtensionListResult } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetExtensionListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts index e4113e992fac..22a04d7a6ad3 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetRollingUpgrades.ts @@ -3,24 +3,33 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineScaleSetRollingUpgradesMappers"; +import { VirtualMachineScaleSetRollingUpgrades } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineScaleSetRollingUpgradesCancelOptionalParams, + VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams, + VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams, + VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams, + VirtualMachineScaleSetRollingUpgradesGetLatestResponse +} from "../models"; /** Class representing a VirtualMachineScaleSetRollingUpgrades. */ -export class VirtualMachineScaleSetRollingUpgrades { +export class VirtualMachineScaleSetRollingUpgradesImpl + implements VirtualMachineScaleSetRollingUpgrades { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineScaleSetRollingUpgrades. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineScaleSetRollingUpgrades class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -30,228 +39,319 @@ export class VirtualMachineScaleSetRollingUpgrades { * Cancels the current virtual machine scale set rolling upgrade. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - cancel(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCancel(resourceGroupName,vmScaleSetName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCancel( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + cancelOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available - * Platform Image OS version. Instances which are already running the latest available OS version - * are not affected. + * Cancels the current virtual machine scale set rolling upgrade. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStartOSUpgrade(resourceGroupName,vmScaleSetName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCancelAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams + ): Promise { + const poller = await this.beginCancel( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); } /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to - * the latest available extension version. Instances which are already running the latest extension - * versions are not affected. + * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available + * Platform Image OS version. Instances which are already running the latest available OS version are + * not affected. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - startExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStartExtensionUpgrade(resourceGroupName,vmScaleSetName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginStartOSUpgrade( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + startOSUpgradeOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets the status of the latest virtual machine scale set rolling upgrade. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise - */ - getLatest(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param callback The callback - */ - getLatest(resourceGroupName: string, vmScaleSetName: string, callback: msRest.ServiceCallback): void; - /** + * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available + * Platform Image OS version. Instances which are already running the latest available OS version are + * not affected. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - getLatest(resourceGroupName: string, vmScaleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getLatest(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - getLatestOperationSpec, - callback) as Promise; + async beginStartOSUpgradeAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams + ): Promise { + const poller = await this.beginStartOSUpgrade( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); } /** - * Cancels the current virtual machine scale set rolling upgrade. + * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the + * latest available extension version. Instances which are already running the latest extension + * versions are not affected. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginCancelOperationSpec, - options); + async beginStartExtensionUpgrade( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + startExtensionUpgradeOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available - * Platform Image OS version. Instances which are already running the latest available OS version - * are not affected. + * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the + * latest available extension version. Instances which are already running the latest extension + * versions are not affected. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginStartOSUpgradeOperationSpec, - options); + async beginStartExtensionUpgradeAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams + ): Promise { + const poller = await this.beginStartExtensionUpgrade( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); } /** - * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to - * the latest available extension version. Instances which are already running the latest extension - * versions are not affected. + * Gets the status of the latest virtual machine scale set rolling upgrade. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginStartExtensionUpgradeOperationSpec, - options); + getLatest( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, options }, + getLatestOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getLatestOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest", +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.RollingUpgradeStatusInfo - }, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginCancelOperationSpec: msRest.OperationSpec = { +const startOSUpgradeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginStartOSUpgradeOperationSpec: msRest.OperationSpec = { +const startExtensionUpgradeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.vmScaleSetName ], + serializer +}; +const getLatestOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.RollingUpgradeStatusInfo } }, - serializer -}; - -const beginStartExtensionUpgradeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts index 7c7e580be969..cb9f251cd860 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMExtensions.ts @@ -3,24 +3,39 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineScaleSetVMExtensionsMappers"; +import { VirtualMachineScaleSetVMExtensions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsUpdateOptionalParams, + VirtualMachineScaleSetVMExtensionsUpdateResponse, + VirtualMachineScaleSetVMExtensionsDeleteOptionalParams, + VirtualMachineScaleSetVMExtensionsGetOptionalParams, + VirtualMachineScaleSetVMExtensionsGetResponse, + VirtualMachineScaleSetVMExtensionsListOptionalParams, + VirtualMachineScaleSetVMExtensionsListResponse +} from "../models"; /** Class representing a VirtualMachineScaleSetVMExtensions. */ -export class VirtualMachineScaleSetVMExtensions { +export class VirtualMachineScaleSetVMExtensionsImpl + implements VirtualMachineScaleSetVMExtensions { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineScaleSetVMExtensions. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineScaleSetVMExtensions class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -32,312 +47,451 @@ export class VirtualMachineScaleSetVMExtensions { * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetVMExtension, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,vmScaleSetName,instanceId,vmExtensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } + async beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtension, + options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse + >, + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * The operation to update the VMSS VM extension. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetVMExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,vmScaleSetName,instanceId,vmExtensionName,extensionParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + const lro = new CoreClientLro( + sendOperation, + { + resourceGroupName, + vmScaleSetName, + instanceId, + vmExtensionName, + extensionParameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to delete the VMSS VM extension. + * The operation to create or update the VMSS VM extension. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param vmExtensionName The name of the virtual machine extension. - * @param [options] The optional parameters - * @returns Promise + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,vmScaleSetName,instanceId,vmExtensionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtension, + options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vmScaleSetName, + instanceId, + vmExtensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); } /** - * The operation to get the VMSS VM extension. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: Models.VirtualMachineScaleSetVMExtensionsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param callback The callback - */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to update the VMSS VM extension. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param vmExtensionName The name of the virtual machine extension. - * @param options The optional parameters - * @param callback The callback + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options: Models.VirtualMachineScaleSetVMExtensionsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: Models.VirtualMachineScaleSetVMExtensionsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, + options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMExtensionsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, + extensionParameters, options }, - getOperationSpec, - callback) as Promise; + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to get all extensions of an instance in Virtual Machine Scaleset. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMExtensionsListOptionalParams): Promise; - /** + * The operation to update the VMSS VM extension. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param callback The callback + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. */ - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; + async beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, + options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmScaleSetName, + instanceId, + vmExtensionName, + extensionParameters, + options + ); + return poller.pollUntilDone(); + } + /** + * The operation to delete the VMSS VM extension. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. */ - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: Models.VirtualMachineScaleSetVMExtensionsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMExtensionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, instanceId, + vmExtensionName, options }, - listOperationSpec, - callback) as Promise; + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to create or update the VMSS VM extension. + * The operation to delete the VMSS VM extension. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetVMExtension, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - extensionParameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmScaleSetName, + instanceId, + vmExtensionName, + options + ); + return poller.pollUntilDone(); } /** - * The operation to update the VMSS VM extension. + * The operation to get the VMSS VM extension. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param vmExtensionName The name of the virtual machine extension. - * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension - * operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, extensionParameters: Models.VirtualMachineScaleSetVMExtensionUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + get( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + options?: VirtualMachineScaleSetVMExtensionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, - extensionParameters, options }, - beginUpdateOperationSpec, - options); + getOperationSpec + ); } /** - * The operation to delete the VMSS VM extension. + * The operation to get all extensions of an instance in Virtual Machine Scaleset. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param vmExtensionName The name of the virtual machine extension. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, vmExtensionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - vmExtensionName, - options - }, - beginDeleteMethodOperationSpec, - options); + list( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMExtensionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, instanceId, options }, + listOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetVMExtension }, + 201: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension + }, + 202: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions", + requestBody: Parameters.extensionParameters4, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmExtensionName, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.instanceId ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.VirtualMachineScaleSetVMExtensionsListResult + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension + }, + 201: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension + }, + 202: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtension }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + requestBody: Parameters.extensionParameters5, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, + Parameters.subscriptionId, Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmScaleSetName, + Parameters.instanceId ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.VirtualMachineScaleSetVMExtension, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetVMExtension - }, - 201: { - bodyMapper: Mappers.VirtualMachineScaleSetVMExtension - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, + Parameters.subscriptionId, Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmScaleSetName, + Parameters.instanceId ], - requestBody: { - parameterPath: "extensionParameters", - mapper: { - ...Mappers.VirtualMachineScaleSetVMExtensionUpdate, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetVMExtension @@ -346,32 +500,38 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, + Parameters.subscriptionId, Parameters.vmExtensionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.vmScaleSetName, + Parameters.instanceId ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.VirtualMachineScaleSetVMExtensionsListResult + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts index 36e6c052757f..a566711b32d5 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMRunCommands.ts @@ -3,195 +3,405 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineScaleSetVMRunCommandsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachineScaleSetVMRunCommands } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineRunCommand, + VirtualMachineScaleSetVMRunCommandsListNextOptionalParams, + VirtualMachineScaleSetVMRunCommandsListOptionalParams, + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse, + VirtualMachineRunCommandUpdate, + VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams, + VirtualMachineScaleSetVMRunCommandsUpdateResponse, + VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams, + VirtualMachineScaleSetVMRunCommandsGetOptionalParams, + VirtualMachineScaleSetVMRunCommandsGetResponse, + VirtualMachineScaleSetVMRunCommandsListResponse, + VirtualMachineScaleSetVMRunCommandsListNextResponse +} from "../models"; +/// /** Class representing a VirtualMachineScaleSetVMRunCommands. */ -export class VirtualMachineScaleSetVMRunCommands { +export class VirtualMachineScaleSetVMRunCommandsImpl + implements VirtualMachineScaleSetVMRunCommands { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineScaleSetVMRunCommands. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineScaleSetVMRunCommands class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * The operation to create or update the VMSS VM run command. + * The operation to get all run commands of an instance in Virtual Machine Scaleset. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,vmScaleSetName,instanceId,runCommandName,runCommand,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + public list( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + } + }; } - /** - * The operation to update the VMSS VM run command. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,vmScaleSetName,instanceId,runCommandName,runCommand,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + private async *listPagingPage( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vmScaleSetName, + instanceId, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * The operation to delete the VMSS VM run command. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param runCommandName The name of the virtual machine run command. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,vmScaleSetName,instanceId,runCommandName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + private async *listPagingAll( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vmScaleSetName, + instanceId, + options + )) { + yield* page; + } } /** - * The operation to get the VMSS VM run command. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param runCommandName The name of the virtual machine run command. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: Models.VirtualMachineScaleSetVMRunCommandsGetOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param runCommandName The name of the virtual machine run command. - * @param callback The callback - */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, callback: msRest.ServiceCallback): void; - /** + * The operation to create or update the VMSS VM run command. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param runCommandName The name of the virtual machine run command. - * @param options The optional parameters - * @param callback The callback + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options: Models.VirtualMachineScaleSetVMRunCommandsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: Models.VirtualMachineScaleSetVMRunCommandsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse + >, + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, instanceId, runCommandName, + runCommand, options }, - getOperationSpec, - callback) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to get all run commands of an instance in Virtual Machine Scaleset. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMRunCommandsListOptionalParams): Promise; - /** + * The operation to create or update the VMSS VM run command. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param callback The callback + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. */ - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + runCommand, + options + ); + return poller.pollUntilDone(); + } + /** + * The operation to update the VMSS VM run command. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. */ - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: Models.VirtualMachineScaleSetVMRunCommandsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMRunCommandsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMRunCommandsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, instanceId, + runCommandName, + runCommand, options }, - listOperationSpec, - callback) as Promise; + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to create or update the VMSS VM run command. + * The operation to update the VMSS VM run command. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. */ - beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommand, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - runCommandName, - runCommand, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + runCommand, + options + ); + return poller.pollUntilDone(); } /** - * The operation to update the VMSS VM run command. + * The operation to delete the VMSS VM run command. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param runCommandName The name of the virtual machine run command. - * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, runCommand: Models.VirtualMachineRunCommandUpdate, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, { resourceGroupName, vmScaleSetName, instanceId, runCommandName, - runCommand, options }, - beginUpdateOperationSpec, - options); + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** @@ -200,11 +410,41 @@ export class VirtualMachineScaleSetVMRunCommands { * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param runCommandName The name of the virtual machine run command. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmScaleSetName, + instanceId, + runCommandName, + options + ); + return poller.pollUntilDone(); + } + + /** + * The operation to get the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, runCommandName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + get( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + options?: VirtualMachineScaleSetVMRunCommandsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, @@ -212,156 +452,152 @@ export class VirtualMachineScaleSetVMRunCommands { runCommandName, options }, - beginDeleteMethodOperationSpec, - options); + getOperationSpec + ); } /** * The operation to get all run commands of an instance in Virtual Machine Scaleset. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: Models.VirtualMachineScaleSetVMRunCommandsListNextOptionalParams): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, instanceId, 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 resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: Models.VirtualMachineScaleSetVMRunCommandsListNextOptionalParams, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: Models.VirtualMachineScaleSetVMRunCommandsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + nextLink: string, + options?: VirtualMachineScaleSetVMRunCommandsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, vmScaleSetName, instanceId, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.runCommandName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.VirtualMachineRunCommand }, + 201: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 202: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 204: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands", + requestBody: Parameters.runCommand, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.runCommandName ], + headerParameters: [Parameters.contentType, Parameters.accept1], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.VirtualMachineRunCommandsListResult + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 201: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 202: { + bodyMapper: Mappers.VirtualMachineRunCommand + }, + 204: { + bodyMapper: Mappers.VirtualMachineRunCommand }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + requestBody: Parameters.runCommand1, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, Parameters.instanceId, - Parameters.runCommandName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.runCommandName ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "runCommand", - mapper: { - ...Mappers.VirtualMachineRunCommand, - required: true - } - }, + headerParameters: [Parameters.contentType, Parameters.accept1], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.VirtualMachineRunCommand - }, - 201: { - bodyMapper: Mappers.VirtualMachineRunCommand - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, Parameters.instanceId, - Parameters.runCommandName, - Parameters.subscriptionId + Parameters.runCommandName ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "runCommand", - mapper: { - ...Mappers.VirtualMachineRunCommandUpdate, - required: true - } - }, + headerParameters: [Parameters.accept1], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineRunCommand @@ -370,50 +606,44 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, Parameters.instanceId, - Parameters.runCommandName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.runCommandName ], + headerParameters: [Parameters.accept1], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.VirtualMachineRunCommandsListResult + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName, + Parameters.instanceId + ], + headerParameters: [Parameters.accept1], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineRunCommandsListResult @@ -422,5 +652,15 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vmScaleSetName, + Parameters.instanceId + ], + headerParameters: [Parameters.accept1], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts index 9a6664c30959..db5aef652a4f 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSetVMs.ts @@ -3,565 +3,1134 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineScaleSetVMsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachineScaleSetVMs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMsListNextOptionalParams, + VirtualMachineScaleSetVMsListOptionalParams, + VirtualMachineScaleSetVMsReimageOptionalParams, + VirtualMachineScaleSetVMsReimageAllOptionalParams, + VirtualMachineScaleSetVMsDeallocateOptionalParams, + VirtualMachineScaleSetVMsUpdateOptionalParams, + VirtualMachineScaleSetVMsUpdateResponse, + VirtualMachineScaleSetVMsDeleteOptionalParams, + VirtualMachineScaleSetVMsGetOptionalParams, + VirtualMachineScaleSetVMsGetResponse, + VirtualMachineScaleSetVMsGetInstanceViewOptionalParams, + VirtualMachineScaleSetVMsGetInstanceViewResponse, + VirtualMachineScaleSetVMsListResponse, + VirtualMachineScaleSetVMsPowerOffOptionalParams, + VirtualMachineScaleSetVMsRestartOptionalParams, + VirtualMachineScaleSetVMsStartOptionalParams, + VirtualMachineScaleSetVMsRedeployOptionalParams, + VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams, + VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataResponse, + VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams, + VirtualMachineScaleSetVMsSimulateEvictionOptionalParams, + RunCommandInput, + VirtualMachineScaleSetVMsRunCommandOptionalParams, + VirtualMachineScaleSetVMsRunCommandResponse, + VirtualMachineScaleSetVMsListNextResponse +} from "../models"; +/// /** Class representing a VirtualMachineScaleSetVMs. */ -export class VirtualMachineScaleSetVMs { +export class VirtualMachineScaleSetVMsImpl + implements VirtualMachineScaleSetVMs { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineScaleSetVMs. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineScaleSetVMs class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. + * Gets a list of all virtual machines in a VM scale sets. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param virtualMachineScaleSetName The name of the VM scale set. + * @param options The options parameters. */ - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsReimageOptionalParams): Promise { - return this.beginReimage(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + public list( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: VirtualMachineScaleSetVMsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + virtualMachineScaleSetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + virtualMachineScaleSetName, + options + ); + } + }; } - /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. - * This operation is only supported for managed disks. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginReimageAll(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + private async *listPagingPage( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: VirtualMachineScaleSetVMsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + virtualMachineScaleSetName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + virtualMachineScaleSetName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and - * releases the compute resources it uses. You are not billed for the compute resources of this - * virtual machine once it is deallocated. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeallocate(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + private async *listPagingAll( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: VirtualMachineScaleSetVMsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + virtualMachineScaleSetName, + options + )) { + yield* page; + } } /** - * Updates a virtual machine of a VM scale set. + * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or - * updated. + * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: Models.VirtualMachineScaleSetVM, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,vmScaleSetName,instanceId,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginReimage( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + reimageOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a virtual machine from a VM scale set. + * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsDeleteMethodOptionalParams): Promise { - return this.beginDeleteMethod(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginReimageAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageOptionalParams + ): Promise { + const poller = await this.beginReimage( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Gets a virtual machine from a VM scale set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsGetOptionalParams): Promise; - /** + * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This + * operation is only supported for managed disks. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: Models.VirtualMachineScaleSetVMsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - getOperationSpec, - callback) as Promise; + async beginReimageAll( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageAllOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + reimageAllOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets the status of a virtual machine from a VM scale set. + * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This + * operation is only supported for managed disks. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - getInstanceView(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param callback The callback - */ - getInstanceView(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; + async beginReimageAllAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageAllOptionalParams + ): Promise { + const poller = await this.beginReimageAll( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); + } + /** + * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and + * releases the compute resources it uses. You are not billed for the compute resources of this virtual + * machine once it is deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - getInstanceView(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getInstanceView(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - getInstanceViewOperationSpec, - callback) as Promise; - } + async beginDeallocate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeallocateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Gets a list of all virtual machines in a VM scale sets. - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, virtualMachineScaleSetName: string, options?: Models.VirtualMachineScaleSetVMsListOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the VM scale set. - * @param callback The callback - */ - list(resourceGroupName: string, virtualMachineScaleSetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the VM scale set. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, virtualMachineScaleSetName: string, options: Models.VirtualMachineScaleSetVMsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, virtualMachineScaleSetName: string, options?: Models.VirtualMachineScaleSetVMsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - virtualMachineScaleSetName, - options - }, - listOperationSpec, - callback) as Promise; + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + deallocateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and - * you are getting charged for the resources. Instead, use deallocate to release resources and - * avoid charges. + * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and + * releases the compute resources it uses. You are not billed for the compute resources of this virtual + * machine once it is deallocated. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsPowerOffOptionalParams): Promise { - return this.beginPowerOff(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDeallocateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeallocateOptionalParams + ): Promise { + const poller = await this.beginDeallocate( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Restarts a virtual machine in a VM scale set. + * Updates a virtual machine of a VM scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @param options The options parameters. */ - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginRestart(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: VirtualMachineScaleSetVM, + options?: VirtualMachineScaleSetVMsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, parameters, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Starts a virtual machine in a VM scale set. + * Updates a virtual machine of a VM scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @param options The options parameters. */ - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginStart(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: VirtualMachineScaleSetVM, + options?: VirtualMachineScaleSetVMsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmScaleSetName, + instanceId, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and - * powers it back on. + * Deletes a virtual machine from a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginRedeploy(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale - * set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - retrieveBootDiagnosticsData(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams): Promise; - /** + * Deletes a virtual machine from a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - retrieveBootDiagnosticsData(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; + async beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); + } + /** + * Gets a virtual machine from a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - retrieveBootDiagnosticsData(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: Models.VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams, callback: msRest.ServiceCallback): void; - retrieveBootDiagnosticsData(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - retrieveBootDiagnosticsDataOperationSpec, - callback) as Promise; + { resourceGroupName, vmScaleSetName, instanceId, options }, + getOperationSpec + ); } /** - * Performs maintenance on a virtual machine in a VM scale set. + * Gets the status of a virtual machine from a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginPerformMaintenance(resourceGroupName,vmScaleSetName,instanceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + getInstanceView( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsGetInstanceViewOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, instanceId, options }, + getInstanceViewOperationSpec + ); } /** - * The operation to simulate the eviction of spot virtual machine in a VM scale set. + * Gets a list of all virtual machines in a VM scale sets. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param virtualMachineScaleSetName The name of the VM scale set. + * @param options The options parameters. */ - simulateEviction(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise; + private _list( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: VirtualMachineScaleSetVMsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, virtualMachineScaleSetName, options }, + listOperationSpec + ); + } + /** + * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you + * are getting charged for the resources. Instead, use deallocate to release resources and avoid + * charges. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - simulateEviction(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: msRest.ServiceCallback): void; + async beginPowerOff( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPowerOffOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + powerOffOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you + * are getting charged for the resources. Instead, use deallocate to release resources and avoid + * charges. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - simulateEviction(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - simulateEviction(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - simulateEvictionOperationSpec, - callback); + async beginPowerOffAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPowerOffOptionalParams + ): Promise { + const poller = await this.beginPowerOff( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Run command on a virtual machine in a VM scale set. + * Restarts a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param parameters Parameters supplied to the Run command operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - runCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: Models.RunCommandInput, options?: msRest.RequestOptionsBase): Promise { - return this.beginRunCommand(resourceGroupName,vmScaleSetName,instanceId,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginRestart( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRestartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + restartOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. + * Restarts a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsBeginReimageOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginReimageOperationSpec, - options); + async beginRestartAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. - * This operation is only supported for managed disks. + * Starts a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginReimageAllOperationSpec, - options); + async beginStart( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsStartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + startOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and - * releases the compute resources it uses. You are not billed for the compute resources of this - * virtual machine once it is deallocated. + * Starts a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginDeallocateOperationSpec, - options); + async beginStartAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Updates a virtual machine of a VM scale set. + * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers + * it back on. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set where the extension should be create or - * updated. + * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: Models.VirtualMachineScaleSetVM, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - parameters, - options - }, - beginUpdateOperationSpec, - options); + async beginRedeploy( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRedeployOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + redeployOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a virtual machine from a VM scale set. + * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers + * it back on. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsBeginDeleteMethodOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginRedeployAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRedeployOptionalParams + ): Promise { + const poller = await this.beginRedeploy( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and - * you are getting charged for the resources. Instead, use deallocate to release resources and - * avoid charges. + * The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: Models.VirtualMachineScaleSetVMsBeginPowerOffOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginPowerOffOperationSpec, - options); + retrieveBootDiagnosticsData( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, instanceId, options }, + retrieveBootDiagnosticsDataOperationSpec + ); } /** - * Restarts a virtual machine in a VM scale set. + * Performs maintenance on a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginRestartOperationSpec, - options); + async beginPerformMaintenance( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, options }, + performMaintenanceOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Starts a virtual machine in a VM scale set. + * Performs maintenance on a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginStartOperationSpec, - options); + async beginPerformMaintenanceAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams + ): Promise { + const poller = await this.beginPerformMaintenance( + resourceGroupName, + vmScaleSetName, + instanceId, + options + ); + return poller.pollUntilDone(); } /** - * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and - * powers it back on. + * The operation to simulate the eviction of spot virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginRedeployOperationSpec, - options); + simulateEviction( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsSimulateEvictionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, instanceId, options }, + simulateEvictionOperationSpec + ); } /** - * Performs maintenance on a virtual machine in a VM scale set. + * Run command on a virtual machine in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Run command operation. + * @param options The options parameters. */ - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - options - }, - beginPerformMaintenanceOperationSpec, - options); + async beginRunCommand( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: RunCommandInput, + options?: VirtualMachineScaleSetVMsRunCommandOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMsRunCommandResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, instanceId, parameters, options }, + runCommandOperationSpec, + "location" + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** @@ -570,513 +1139,373 @@ export class VirtualMachineScaleSetVMs { * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param parameters Parameters supplied to the Run command operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: Models.RunCommandInput, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - instanceId, - parameters, - options - }, - beginRunCommandOperationSpec, - options); + async beginRunCommandAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: RunCommandInput, + options?: VirtualMachineScaleSetVMsRunCommandOptionalParams + ): Promise { + const poller = await this.beginRunCommand( + resourceGroupName, + vmScaleSetName, + instanceId, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Gets a list of all virtual machines in a VM scale sets. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: Models.VirtualMachineScaleSetVMsListNextOptionalParams): 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 resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the VM scale set. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: Models.VirtualMachineScaleSetVMsListNextOptionalParams, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: Models.VirtualMachineScaleSetVMsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + resourceGroupName: string, + virtualMachineScaleSetName: string, + nextLink: string, + options?: VirtualMachineScaleSetVMsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, virtualMachineScaleSetName, nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand1, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetVM - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getInstanceViewOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView", +const reimageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmScaleSetVMReimageInput, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId + Parameters.instanceId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetVMInstanceView - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines", +const reimageAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.virtualMachineScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.filter, - Parameters.select, - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.subscriptionId, + Parameters.vmScaleSetName, + Parameters.instanceId ], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetVMListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const retrieveBootDiagnosticsDataOperationSpec: msRest.OperationSpec = { +const deallocateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.sasUriExpirationTimeInMinutes, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.instanceId ], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.RetrieveBootDiagnosticsDataResult + bodyMapper: Mappers.VirtualMachineScaleSetVM }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachineScaleSetVM + }, + 202: { + bodyMapper: Mappers.VirtualMachineScaleSetVM + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSetVM } }, - serializer -}; - -const simulateEvictionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", + requestBody: Parameters.parameters24, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId + Parameters.instanceId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginReimageOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion, Parameters.forceDeletion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.instanceId ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: [ - "options", - "vmScaleSetVMReimageInput" - ], - mapper: Mappers.VirtualMachineScaleSetVMReimageParameters - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginReimageAllOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineScaleSetVM } }, - serializer -}; - -const beginDeallocateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate", + queryParameters: [Parameters.apiVersion, Parameters.expand1], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.instanceId ], + headerParameters: [Parameters.accept], + serializer +}; +const getInstanceViewOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineScaleSetVMInstanceView } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.instanceId ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualMachineScaleSetVM, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachineScaleSetVM - }, - 202: { - bodyMapper: Mappers.VirtualMachineScaleSetVM - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachineScaleSetVMListResult } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], queryParameters: [ - Parameters.forceDeletion, - Parameters.apiVersion0 + Parameters.apiVersion, + Parameters.expand, + Parameters.filter, + Parameters.select ], - headerParameters: [ - Parameters.acceptLanguage + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.virtualMachineScaleSetName ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; - -const beginPowerOffOperationSpec: msRest.OperationSpec = { +const powerOffOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion, Parameters.skipShutdown], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.skipShutdown, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.instanceId ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginRestartOperationSpec: msRest.OperationSpec = { +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId + Parameters.instanceId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginStartOperationSpec: msRest.OperationSpec = { +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.instanceId ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginRedeployOperationSpec: msRest.OperationSpec = { +const redeployOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.instanceId ], + serializer +}; +const retrieveBootDiagnosticsDataOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData", + httpMethod: "POST", responses: { - 200: {}, - 202: {}, + 200: { + bodyMapper: Mappers.RetrieveBootDiagnosticsDataResult + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [ + Parameters.apiVersion, + Parameters.sasUriExpirationTimeInMinutes + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], serializer }; - -const beginPerformMaintenanceOperationSpec: msRest.OperationSpec = { +const performMaintenanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId + Parameters.instanceId ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, serializer }; - -const beginRunCommandOperationSpec: msRest.OperationSpec = { +const simulateEvictionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand", + responses: { 204: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vmScaleSetName, - Parameters.instanceId, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 + Parameters.instanceId ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RunCommandInput, - required: true - } - }, + serializer +}; +const runCommandOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.RunCommandResult }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.RunCommandResult + }, + 202: { + bodyMapper: Mappers.RunCommandResult + }, + 204: { + bodyMapper: Mappers.RunCommandResult } }, + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName, + Parameters.instanceId + ], + headerParameters: [Parameters.contentType, Parameters.accept1], + mediaType: "json", serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - queryParameters: [ - Parameters.filter, - Parameters.select, - Parameters.expand0, - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetVMListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter, + Parameters.select + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.virtualMachineScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts index b1c14ece4fd4..806b5114973c 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineScaleSets.ts @@ -3,24 +3,80 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachineScaleSetsMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachineScaleSets } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; - +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachineScaleSet, + VirtualMachineScaleSetsListByLocationNextOptionalParams, + VirtualMachineScaleSetsListByLocationOptionalParams, + VirtualMachineScaleSetsListNextOptionalParams, + VirtualMachineScaleSetsListOptionalParams, + VirtualMachineScaleSetsListAllNextOptionalParams, + VirtualMachineScaleSetsListAllOptionalParams, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetsListSkusNextOptionalParams, + VirtualMachineScaleSetsListSkusOptionalParams, + UpgradeOperationHistoricalStatusInfo, + VirtualMachineScaleSetsGetOSUpgradeHistoryNextOptionalParams, + VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams, + VirtualMachineScaleSetsListByLocationResponse, + VirtualMachineScaleSetsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetsCreateOrUpdateResponse, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetsUpdateOptionalParams, + VirtualMachineScaleSetsUpdateResponse, + VirtualMachineScaleSetsDeleteOptionalParams, + VirtualMachineScaleSetsGetOptionalParams, + VirtualMachineScaleSetsGetResponse, + VirtualMachineScaleSetsDeallocateOptionalParams, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetsDeleteInstancesOptionalParams, + VirtualMachineScaleSetsGetInstanceViewOptionalParams, + VirtualMachineScaleSetsGetInstanceViewResponse, + VirtualMachineScaleSetsListResponse, + VirtualMachineScaleSetsListAllResponse, + VirtualMachineScaleSetsListSkusResponse, + VirtualMachineScaleSetsGetOSUpgradeHistoryResponse, + VirtualMachineScaleSetsPowerOffOptionalParams, + VirtualMachineScaleSetsRestartOptionalParams, + VirtualMachineScaleSetsStartOptionalParams, + VirtualMachineScaleSetsRedeployOptionalParams, + VirtualMachineScaleSetsPerformMaintenanceOptionalParams, + VirtualMachineScaleSetsUpdateInstancesOptionalParams, + VirtualMachineScaleSetsReimageOptionalParams, + VirtualMachineScaleSetsReimageAllOptionalParams, + VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams, + VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse, + VMScaleSetConvertToSinglePlacementGroupInput, + VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams, + OrchestrationServiceStateInput, + VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams, + VirtualMachineScaleSetsListByLocationNextResponse, + VirtualMachineScaleSetsListNextResponse, + VirtualMachineScaleSetsListAllNextResponse, + VirtualMachineScaleSetsListSkusNextResponse, + VirtualMachineScaleSetsGetOSUpgradeHistoryNextResponse +} from "../models"; + +/// /** Class representing a VirtualMachineScaleSets. */ -export class VirtualMachineScaleSets { +export class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineScaleSets. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineScaleSets class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,46 +85,303 @@ export class VirtualMachineScaleSets { /** * Gets all the VM scale sets under the specified subscription for the specified location. * @param location The location for which VM scale sets under the subscription are queried. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByLocation( + public listByLocation( + location: string, + options?: VirtualMachineScaleSetsListByLocationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocationPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByLocationPagingPage(location, options); + } + }; + } + + private async *listByLocationPagingPage( + location: string, + options?: VirtualMachineScaleSetsListByLocationOptionalParams + ): AsyncIterableIterator { + let result = await this._listByLocation(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByLocationNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByLocationPagingAll( location: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachineScaleSetsListByLocationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocationPagingPage(location, options)) { + yield* page; + } + } + /** - * @param location The location for which VM scale sets under the subscription are queried. - * @param callback The callback + * Gets a list of all VM scale sets under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. */ - listByLocation( - location: string, - callback: msRest.ServiceCallback - ): void; + public list( + resourceGroupName: string, + options?: VirtualMachineScaleSetsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: VirtualMachineScaleSetsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: VirtualMachineScaleSetsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. + * Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink + * is null to fetch all the VM Scale Sets. + * @param options The options parameters. + */ + public listAll( + options?: VirtualMachineScaleSetsListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAllPagingPage(options); + } + }; + } + + private async *listAllPagingPage( + options?: VirtualMachineScaleSetsListAllOptionalParams + ): AsyncIterableIterator { + let result = await this._listAll(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listAllPagingAll( + options?: VirtualMachineScaleSetsListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances + * allowed for each SKU. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + public listSkus( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsListSkusOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listSkusPagingAll( + resourceGroupName, + vmScaleSetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listSkusPagingPage( + resourceGroupName, + vmScaleSetName, + options + ); + } + }; + } + + private async *listSkusPagingPage( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsListSkusOptionalParams + ): AsyncIterableIterator { + let result = await this._listSkus( + resourceGroupName, + vmScaleSetName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listSkusNext( + resourceGroupName, + vmScaleSetName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listSkusPagingAll( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsListSkusOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listSkusPagingPage( + resourceGroupName, + vmScaleSetName, + options + )) { + yield* page; + } + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + public listOSUpgradeHistory( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.getOSUpgradeHistoryPagingAll( + resourceGroupName, + vmScaleSetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.getOSUpgradeHistoryPagingPage( + resourceGroupName, + vmScaleSetName, + options + ); + } + }; + } + + private async *getOSUpgradeHistoryPagingPage( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams + ): AsyncIterableIterator { + let result = await this._getOSUpgradeHistory( + resourceGroupName, + vmScaleSetName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._getOSUpgradeHistoryNext( + resourceGroupName, + vmScaleSetName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *getOSUpgradeHistoryPagingAll( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams + ): AsyncIterableIterator { + for await (const page of this.getOSUpgradeHistoryPagingPage( + resourceGroupName, + vmScaleSetName, + options + )) { + yield* page; + } + } + /** + * Gets all the VM scale sets under the specified subscription for the specified location. * @param location The location for which VM scale sets under the subscription are queried. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByLocation( + private _listByLocation( location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByLocation( - location: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachineScaleSetsListByLocationOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listByLocationOperationSpec, - callback - ) as Promise; + { location, options }, + listByLocationOperationSpec + ); } /** @@ -76,117 +389,267 @@ export class VirtualMachineScaleSets { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set to create or update. * @param parameters The scale set object. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, vmScaleSetName: string, - parameters: Models.VirtualMachineScaleSet, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( - resourceGroupName, - vmScaleSetName, - parameters, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.VirtualMachineScaleSetsCreateOrUpdateResponse - >; + parameters: VirtualMachineScaleSet, + options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, parameters, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Update a VM scale set. + * Create or update a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set to create or update. * @param parameters The scale set object. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update( + async beginCreateOrUpdateAndWait( resourceGroupName: string, vmScaleSetName: string, - parameters: Models.VirtualMachineScaleSetUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate( + parameters: VirtualMachineScaleSet, + options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, vmScaleSetName, parameters, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.VirtualMachineScaleSetsUpdateResponse - >; + ); + return poller.pollUntilDone(); } /** - * Deletes a VM scale set. + * Update a VM scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the VM scale set to create or update. + * @param parameters The scale set object. + * @param options The options parameters. */ - deleteMethod( + async beginUpdate( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsDeleteMethodOptionalParams - ): Promise { - return this.beginDeleteMethod(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + parameters: VirtualMachineScaleSetUpdate, + options?: VirtualMachineScaleSetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, parameters, options }, + updateOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Display information about a virtual machine scale set. + * Update a VM scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the VM scale set to create or update. + * @param parameters The scale set object. + * @param options The options parameters. */ - get( + async beginUpdateAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsGetOptionalParams - ): Promise; + parameters: VirtualMachineScaleSetUpdate, + options?: VirtualMachineScaleSetsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmScaleSetName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** + * Deletes a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param callback The callback + * @param options The options parameters. */ - get( + async beginDelete( resourceGroupName: string, vmScaleSetName: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachineScaleSetsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Deletes a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get( + async beginDeleteAndWait( resourceGroupName: string, vmScaleSetName: string, - options: Models.VirtualMachineScaleSetsGetOptionalParams, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachineScaleSetsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Display information about a virtual machine scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ get( resourceGroupName: string, vmScaleSetName: string, - options?: - | Models.VirtualMachineScaleSetsGetOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachineScaleSetsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - getOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmScaleSetName, options }, + getOperationSpec + ); } /** @@ -195,1172 +658,1098 @@ export class VirtualMachineScaleSets { * machine scale set deallocates. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deallocate( + async beginDeallocate( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsDeallocateOptionalParams - ): Promise { - return this.beginDeallocate(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachineScaleSetsDeallocateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + deallocateOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes virtual machines in a VM scale set. + * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and + * releases the compute resources. You are not billed for the compute resources that this virtual + * machine scale set deallocates. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteInstances( + async beginDeallocateAndWait( resourceGroupName: string, vmScaleSetName: string, - vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, - options?: Models.VirtualMachineScaleSetsDeleteInstancesOptionalParams - ): Promise { - return this.beginDeleteInstances( + options?: VirtualMachineScaleSetsDeallocateOptionalParams + ): Promise { + const poller = await this.beginDeallocate( resourceGroupName, vmScaleSetName, - vmInstanceIDs, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * Gets the status of a VM scale set instance. + * Deletes virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. */ - getInstanceView( + async beginDeleteInstances( resourceGroupName: string, vmScaleSetName: string, - options?: msRest.RequestOptionsBase - ): Promise; + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, + deleteInstancesOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Deletes virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param callback The callback + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. */ - getInstanceView( + async beginDeleteInstancesAndWait( resourceGroupName: string, vmScaleSetName: string, - callback: msRest.ServiceCallback - ): void; + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams + ): Promise { + const poller = await this.beginDeleteInstances( + resourceGroupName, + vmScaleSetName, + vmInstanceIDs, + options + ); + return poller.pollUntilDone(); + } + /** + * Gets the status of a VM scale set instance. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ getInstanceView( resourceGroupName: string, vmScaleSetName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getInstanceView( - resourceGroupName: string, - vmScaleSetName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachineScaleSetsGetInstanceViewOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - getInstanceViewOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmScaleSetName, options }, + getInstanceViewOperationSpec + ); } /** * Gets a list of all VM scale sets under a resource group. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list( + private _list( resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachineScaleSetsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback + * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. + * Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink + * is null to fetch all the VM Scale Sets. + * @param options The options parameters. */ - list( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + private _listAll( + options?: VirtualMachineScaleSetsListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + /** + * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances + * allowed for each SKU. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. */ - list( + private _listSkus( resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - resourceGroupName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + vmScaleSetName: string, + options?: VirtualMachineScaleSetsListSkusOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmScaleSetName, options }, + listSkusOperationSpec + ); } /** - * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource - * group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till - * nextLink is null to fetch all the VM Scale Sets. - * @param [options] The optional parameters - * @returns Promise - */ - listAll( - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param callback The callback - */ - listAll(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * Gets list of OS upgrades on a VM scale set instance. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. */ - listAll( - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAll( - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _getOSUpgradeHistory( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - options - }, - listAllOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmScaleSetName, options }, + getOSUpgradeHistoryOperationSpec + ); } /** - * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM - * instances allowed for each SKU. + * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still + * attached and you are getting charged for the resources. Instead, use deallocate to release resources + * and avoid charges. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listSkus( + async beginPowerOff( resourceGroupName: string, vmScaleSetName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachineScaleSetsPowerOffOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + powerOffOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still + * attached and you are getting charged for the resources. Instead, use deallocate to release resources + * and avoid charges. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param callback The callback + * @param options The options parameters. */ - listSkus( + async beginPowerOffAndWait( resourceGroupName: string, vmScaleSetName: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachineScaleSetsPowerOffOptionalParams + ): Promise { + const poller = await this.beginPowerOff( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); + } + /** + * Restarts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listSkus( - resourceGroupName: string, - vmScaleSetName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listSkus( + async beginRestart( resourceGroupName: string, vmScaleSetName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - listSkusOperationSpec, - callback - ) as Promise; + options?: VirtualMachineScaleSetsRestartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + restartOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Gets list of OS upgrades on a VM scale set instance. + * Restarts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - getOSUpgradeHistory( + async beginRestartAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param callback The callback - */ - getOSUpgradeHistory( - resourceGroupName: string, - vmScaleSetName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param options The optional parameters - * @param callback The callback - */ - getOSUpgradeHistory( - resourceGroupName: string, - vmScaleSetName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getOSUpgradeHistory( - resourceGroupName: string, - vmScaleSetName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - getOSUpgradeHistoryOperationSpec, - callback - ) as Promise; + options?: VirtualMachineScaleSetsRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( + resourceGroupName, + vmScaleSetName, + options + ); + return poller.pollUntilDone(); } /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still - * attached and you are getting charged for the resources. Instead, use deallocate to release - * resources and avoid charges. + * Starts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - powerOff( + async beginStart( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsPowerOffOptionalParams - ): Promise { - return this.beginPowerOff(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachineScaleSetsStartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + startOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Restarts one or more virtual machines in a VM scale set. + * Starts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - restart( + async beginStartAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsRestartOptionalParams - ): Promise { - return this.beginRestart(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachineScaleSetsStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + vmScaleSetName, + options ); + return poller.pollUntilDone(); } /** - * Starts one or more virtual machines in a VM scale set. + * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and + * powers them back on. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - start( + async beginRedeploy( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsStartOptionalParams - ): Promise { - return this.beginStart(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachineScaleSetsRedeployOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + redeployOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, - * and powers them back on. + * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and + * powers them back on. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - redeploy( + async beginRedeployAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsRedeployOptionalParams - ): Promise { - return this.beginRedeploy(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachineScaleSetsRedeployOptionalParams + ): Promise { + const poller = await this.beginRedeploy( + resourceGroupName, + vmScaleSetName, + options ); + return poller.pollUntilDone(); } /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances - * which are not eligible for perform maintenance will be failed. Please refer to best practices - * for more details: + * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which + * are not eligible for perform maintenance will be failed. Please refer to best practices for more + * details: * https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - performMaintenance( + async beginPerformMaintenance( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsPerformMaintenanceOptionalParams - ): Promise { - return this.beginPerformMaintenance( - resourceGroupName, - vmScaleSetName, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + performMaintenanceOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which + * are not eligible for perform maintenance will be failed. Please refer to best practices for more + * details: + * https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - updateInstances( + async beginPerformMaintenanceAndWait( resourceGroupName: string, vmScaleSetName: string, - vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdateInstances( + options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams + ): Promise { + const poller = await this.beginPerformMaintenance( resourceGroupName, vmScaleSetName, - vmInstanceIDs, options - ).then((lroPoller) => lroPoller.pollUntilFinished()); + ); + return poller.pollUntilDone(); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which - * don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual - * machine is reset to initial state. + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. */ - reimage( + async beginUpdateInstances( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsReimageOptionalParams - ): Promise { - return this.beginReimage(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, + updateInstancesOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This - * operation is only supported for managed disks. + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. */ - reimageAll( + async beginUpdateInstancesAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsReimageAllOptionalParams - ): Promise { - return this.beginReimageAll(resourceGroupName, vmScaleSetName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams + ): Promise { + const poller = await this.beginUpdateInstances( + resourceGroupName, + vmScaleSetName, + vmInstanceIDs, + options ); + return poller.pollUntilDone(); } /** - * Manual platform update domain walk to update virtual machines in a service fabric virtual - * machine scale set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param platformUpdateDomain The platform update domain for which a manual recovery walk is - * requested - * @param [options] The optional parameters - * @returns - * Promise - */ - forceRecoveryServiceFabricPlatformUpdateDomainWalk( - resourceGroupName: string, - vmScaleSetName: string, - platformUpdateDomain: number, - options?: msRest.RequestOptionsBase - ): Promise< - Models.VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse - >; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param platformUpdateDomain The platform update domain for which a manual recovery walk is - * requested - * @param callback The callback - */ - forceRecoveryServiceFabricPlatformUpdateDomainWalk( - resourceGroupName: string, - vmScaleSetName: string, - platformUpdateDomain: number, - callback: msRest.ServiceCallback - ): void; - /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't + * have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is + * reset to initial state. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param platformUpdateDomain The platform update domain for which a manual recovery walk is - * requested - * @param options The optional parameters - * @param callback The callback - */ - forceRecoveryServiceFabricPlatformUpdateDomainWalk( - resourceGroupName: string, - vmScaleSetName: string, - platformUpdateDomain: number, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - forceRecoveryServiceFabricPlatformUpdateDomainWalk( - resourceGroupName: string, - vmScaleSetName: string, - platformUpdateDomain: number, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise< - Models.VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse - > { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - platformUpdateDomain, - options - }, - forceRecoveryServiceFabricPlatformUpdateDomainWalkOperationSpec, - callback - ) as Promise< - Models.VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse - >; - } - - /** - * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param parameters The input object for ConvertToSinglePlacementGroup API. - * @param [options] The optional parameters - * @returns Promise - */ - convertToSinglePlacementGroup( - resourceGroupName: string, - vmScaleSetName: string, - parameters: Models.VMScaleSetConvertToSinglePlacementGroupInput, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param parameters The input object for ConvertToSinglePlacementGroup API. - * @param callback The callback - */ - convertToSinglePlacementGroup( - resourceGroupName: string, - vmScaleSetName: string, - parameters: Models.VMScaleSetConvertToSinglePlacementGroupInput, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param parameters The input object for ConvertToSinglePlacementGroup API. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - convertToSinglePlacementGroup( - resourceGroupName: string, - vmScaleSetName: string, - parameters: Models.VMScaleSetConvertToSinglePlacementGroupInput, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - convertToSinglePlacementGroup( + async beginReimage( resourceGroupName: string, vmScaleSetName: string, - parameters: Models.VMScaleSetConvertToSinglePlacementGroupInput, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmScaleSetName, - parameters, - options - }, - convertToSinglePlacementGroupOperationSpec, - callback + options?: VirtualMachineScaleSetsReimageOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + reimageOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Changes ServiceState property for a given service + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't + * have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is + * reset to initial state. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param parameters The input object for SetOrchestrationServiceState API. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. */ - setOrchestrationServiceState( + async beginReimageAndWait( resourceGroupName: string, vmScaleSetName: string, - parameters: Models.OrchestrationServiceStateInput, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginSetOrchestrationServiceState( + options?: VirtualMachineScaleSetsReimageOptionalParams + ): Promise { + const poller = await this.beginReimage( resourceGroupName, vmScaleSetName, - parameters, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()); - } - - /** - * Create or update a VM scale set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters The scale set object. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate( - resourceGroupName: string, - vmScaleSetName: string, - parameters: Models.VirtualMachineScaleSet, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, options ); + return poller.pollUntilDone(); } /** - * Update a VM scale set. + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This + * operation is only supported for managed disks. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set to create or update. - * @param parameters The scale set object. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. */ - beginUpdate( + async beginReimageAll( resourceGroupName: string, vmScaleSetName: string, - parameters: Models.VirtualMachineScaleSetUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - parameters, - options - }, - beginUpdateOperationSpec, - options + options?: VirtualMachineScaleSetsReimageAllOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, options }, + reimageAllOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Deletes a VM scale set. + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This + * operation is only supported for managed disks. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod( + async beginReimageAllAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginDeleteMethodOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginDeleteMethodOperationSpec, + options?: VirtualMachineScaleSetsReimageAllOptionalParams + ): Promise { + const poller = await this.beginReimageAll( + resourceGroupName, + vmScaleSetName, options ); + return poller.pollUntilDone(); } /** - * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and - * releases the compute resources. You are not billed for the compute resources that this virtual - * machine scale set deallocates. + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine + * scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested + * @param options The options parameters. */ - beginDeallocate( + forceRecoveryServiceFabricPlatformUpdateDomainWalk( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginDeallocateOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginDeallocateOperationSpec, - options + platformUpdateDomain: number, + options?: VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams + ): Promise< + VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, platformUpdateDomain, options }, + forceRecoveryServiceFabricPlatformUpdateDomainWalkOperationSpec ); } /** - * Deletes virtual machines in a VM scale set. + * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the virtual machine scale set to create or update. + * @param parameters The input object for ConvertToSinglePlacementGroup API. + * @param options The options parameters. */ - beginDeleteInstances( + convertToSinglePlacementGroup( resourceGroupName: string, vmScaleSetName: string, - vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, - options?: Models.VirtualMachineScaleSetsBeginDeleteInstancesOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - vmInstanceIDs, - options - }, - beginDeleteInstancesOperationSpec, - options + parameters: VMScaleSetConvertToSinglePlacementGroupInput, + options?: VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, parameters, options }, + convertToSinglePlacementGroupOperationSpec ); } /** - * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still - * attached and you are getting charged for the resources. Instead, use deallocate to release - * resources and avoid charges. + * Changes ServiceState property for a given service * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the virtual machine scale set to create or update. + * @param parameters The input object for SetOrchestrationServiceState API. + * @param options The options parameters. */ - beginPowerOff( + async beginSetOrchestrationServiceState( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginPowerOffOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginPowerOffOperationSpec, - options + parameters: OrchestrationServiceStateInput, + options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmScaleSetName, parameters, options }, + setOrchestrationServiceStateOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Restarts one or more virtual machines in a VM scale set. + * Changes ServiceState property for a given service * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param vmScaleSetName The name of the virtual machine scale set to create or update. + * @param parameters The input object for SetOrchestrationServiceState API. + * @param options The options parameters. */ - beginRestart( + async beginSetOrchestrationServiceStateAndWait( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginRestartOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginRestartOperationSpec, + parameters: OrchestrationServiceStateInput, + options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams + ): Promise { + const poller = await this.beginSetOrchestrationServiceState( + resourceGroupName, + vmScaleSetName, + parameters, options ); + return poller.pollUntilDone(); } /** - * Starts one or more virtual machines in a VM scale set. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * ListByLocationNext + * @param location The location for which VM scale sets under the subscription are queried. + * @param nextLink The nextLink from the previous successful call to the ListByLocation method. + * @param options The options parameters. */ - beginStart( - resourceGroupName: string, - vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginStartOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginStartOperationSpec, - options + private _listByLocationNext( + location: string, + nextLink: string, + options?: VirtualMachineScaleSetsListByLocationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listByLocationNextOperationSpec ); } /** - * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, - * and powers them back on. + * ListNext * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - beginRedeploy( + private _listNext( resourceGroupName: string, - vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginRedeployOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginRedeployOperationSpec, - options + nextLink: string, + options?: VirtualMachineScaleSetsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listNextOperationSpec ); } /** - * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances - * which are not eligible for perform maintenance will be failed. Please refer to best practices - * for more details: - * https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. */ - beginPerformMaintenance( - resourceGroupName: string, - vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginPerformMaintenanceOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginPerformMaintenanceOperationSpec, - options + private _listAllNext( + nextLink: string, + options?: VirtualMachineScaleSetsListAllNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listAllNextOperationSpec ); } /** - * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * ListSkusNext * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the ListSkus method. + * @param options The options parameters. */ - beginUpdateInstances( + private _listSkusNext( resourceGroupName: string, vmScaleSetName: string, - vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - vmInstanceIDs, - options - }, - beginUpdateInstancesOperationSpec, - options + nextLink: string, + options?: VirtualMachineScaleSetsListSkusNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, nextLink, options }, + listSkusNextOperationSpec ); } /** - * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which - * don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual - * machine is reset to initial state. + * GetOSUpgradeHistoryNext * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise + * @param nextLink The nextLink from the previous successful call to the GetOSUpgradeHistory method. + * @param options The options parameters. */ - beginReimage( + private _getOSUpgradeHistoryNext( resourceGroupName: string, vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginReimageOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginReimageOperationSpec, - options + nextLink: string, + options?: VirtualMachineScaleSetsGetOSUpgradeHistoryNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmScaleSetName, nextLink, options }, + getOSUpgradeHistoryNextOperationSpec ); } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - /** - * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This - * operation is only supported for managed disks. - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the VM scale set. - * @param [options] The optional parameters - * @returns Promise - */ - beginReimageAll( - resourceGroupName: string, - vmScaleSetName: string, - options?: Models.VirtualMachineScaleSetsBeginReimageAllOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - options - }, - beginReimageAllOperationSpec, - options - ); - } - - /** - * Changes ServiceState property for a given service - * @param resourceGroupName The name of the resource group. - * @param vmScaleSetName The name of the virtual machine scale set to create or update. - * @param parameters The input object for SetOrchestrationServiceState API. - * @param [options] The optional parameters - * @returns Promise - */ - beginSetOrchestrationServiceState( - resourceGroupName: string, - vmScaleSetName: string, - parameters: Models.OrchestrationServiceStateInput, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmScaleSetName, - parameters, - options - }, - beginSetOrchestrationServiceStateOperationSpec, - options - ); - } - - /** - * Gets all the VM scale sets under the specified subscription for the specified location. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByLocationNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByLocationNext( - 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 - */ - listByLocationNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByLocationNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByLocationNextOperationSpec, - callback - ) as Promise; - } - - /** - * Gets a list of all VM scale sets under a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; - } - - /** - * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource - * group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till - * nextLink is null to fetch all the VM Scale Sets. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listAllNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listAllNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listAllNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAllNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAllNextOperationSpec, - callback - ) as Promise; - } - - /** - * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM - * instances allowed for each SKU. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listSkusNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listSkusNext( - 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 - */ - listSkusNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listSkusNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listSkusNextOperationSpec, - callback - ) as Promise; - } - - /** - * Gets list of OS upgrades on a VM scale set instance. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - getOSUpgradeHistoryNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - getOSUpgradeHistoryNext( - 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 - */ - getOSUpgradeHistoryNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - getOSUpgradeHistoryNext( - nextPageLink: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - getOSUpgradeHistoryNextOperationSpec, - callback - ) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByLocationOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const listByLocationOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets", - urlParameters: [Parameters.location1, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListResult @@ -1369,555 +1758,423 @@ const listByLocationOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.apiVersion0, Parameters.expand0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSet }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachineScaleSet + }, + 202: { + bodyMapper: Mappers.VirtualMachineScaleSet + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSet } }, - serializer -}; - -const getInstanceViewOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", + requestBody: Parameters.parameters15, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetInstanceView - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets", - urlParameters: [Parameters.resourceGroupName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.VirtualMachineScaleSetListResult + bodyMapper: Mappers.VirtualMachineScaleSet }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listAllOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetListWithLinkResult + 201: { + bodyMapper: Mappers.VirtualMachineScaleSet }, - default: { - bodyMapper: Mappers.CloudError + 202: { + bodyMapper: Mappers.VirtualMachineScaleSet + }, + 204: { + bodyMapper: Mappers.VirtualMachineScaleSet } }, + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listSkusOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const deleteOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion, Parameters.forceDeletion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachineScaleSetListSkusResult - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachineScaleSet } }, + queryParameters: [Parameters.apiVersion, Parameters.expand2], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; - -const getOSUpgradeHistoryOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const deallocateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineScaleSetListOSUpgradeHistory - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const forceRecoveryServiceFabricPlatformUpdateDomainWalkOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const deleteInstancesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs1, + queryParameters: [Parameters.apiVersion, Parameters.forceDeletion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0, Parameters.platformUpdateDomain], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const getInstanceViewOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.RecoveryWalkResponse - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachineScaleSetInstanceView } }, - serializer -}; - -const convertToSinglePlacementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VMScaleSetConvertToSinglePlacementGroupInput, - required: true - } - }, - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept], serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const listOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualMachineScaleSet, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachineScaleSet - }, - 201: { - bodyMapper: Mappers.VirtualMachineScaleSet - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachineScaleSetListResult } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, Parameters.subscriptionId ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualMachineScaleSetUpdate, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const listAllOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachineScaleSet - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachineScaleSetListWithLinkResult } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const listSkusOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId - ], - queryParameters: [Parameters.forceDeletion, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineScaleSetListSkusResult } }, - serializer -}; - -const beginDeallocateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, + headerParameters: [Parameters.accept], + serializer +}; +const getOSUpgradeHistoryOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineScaleSetListOSUpgradeHistory } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginDeleteInstancesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const powerOffOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion, Parameters.skipShutdown], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.forceDeletion, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "vmInstanceIDs", - mapper: { - ...Mappers.VirtualMachineScaleSetVMInstanceRequiredIDs, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginPowerOffOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const restartOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.skipShutdown, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginRestartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const startOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginStartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const redeployOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginRedeployOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const performMaintenanceOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginPerformMaintenanceOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const updateInstancesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs1, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginUpdateInstancesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const reimageOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmScaleSetReimageInput, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "vmInstanceIDs", - mapper: { - ...Mappers.VirtualMachineScaleSetVMInstanceRequiredIDs, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginReimageOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const reimageAllOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.vmInstanceIDs, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmScaleSetReimageInput"], - mapper: Mappers.VirtualMachineScaleSetReimageParameters - }, + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const forceRecoveryServiceFabricPlatformUpdateDomainWalkOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", + httpMethod: "POST", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.RecoveryWalkResponse } }, + queryParameters: [Parameters.apiVersion, Parameters.platformUpdateDomain], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginReimageAllOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const convertToSinglePlacementGroupOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", + httpMethod: "POST", + responses: { 200: {} }, + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "vmInstanceIDs"], - mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const beginSetOrchestrationServiceStateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const setOrchestrationServiceStateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, - Parameters.vmScaleSetName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.vmScaleSetName ], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.OrchestrationServiceStateInput, - required: true - } - }, - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; - -const listByLocationNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByLocationNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListResult @@ -1926,77 +2183,86 @@ const listByLocationNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listAllNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listAllNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListWithLinkResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listSkusNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listSkusNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListSkusResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; - -const getOSUpgradeHistoryNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const getOSUpgradeHistoryNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListOSUpgradeHistory - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vmScaleSetName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachineSizes.ts b/sdk/compute/arm-compute/src/operations/virtualMachineSizes.ts index 73616c70c339..a83a1e0cfa7c 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachineSizes.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachineSizes.ts @@ -3,23 +3,30 @@ * 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/virtualMachineSizesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachineSizes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; +import { + VirtualMachineSize, + VirtualMachineSizesListOptionalParams, + VirtualMachineSizesListResponse +} from "../models"; +/// /** Class representing a VirtualMachineSizes. */ -export class VirtualMachineSizes { +export class VirtualMachineSizesImpl implements VirtualMachineSizes { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachineSizes. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachineSizes class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,64 +36,77 @@ export class VirtualMachineSizes { * This API is deprecated. Use [Resources * Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) * @param location The location upon which virtual-machine-sizes is queried. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list( + public list( location: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param location The location upon which virtual-machine-sizes is queried. - * @param callback The callback - */ - list( + options?: VirtualMachineSizesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, options); + } + }; + } + + private async *listPagingPage( + location: string, + options?: VirtualMachineSizesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, options); + yield result.value || []; + } + + private async *listPagingAll( location: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachineSizesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + /** + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) * @param location The location upon which virtual-machine-sizes is queried. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - list( + private _list( location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( - location: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachineSizesListOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listOperationSpec, - callback - ) as Promise; + { location, options }, + listOperationSpec + ); } } - // 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}/providers/Microsoft.Compute/locations/{location}/vmSizes", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes", - urlParameters: [Parameters.location1, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.VirtualMachineSizeListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operations/virtualMachines.ts b/sdk/compute/arm-compute/src/operations/virtualMachines.ts index 95c56556c7f2..872986339f07 100644 --- a/sdk/compute/arm-compute/src/operations/virtualMachines.ts +++ b/sdk/compute/arm-compute/src/operations/virtualMachines.ts @@ -3,24 +3,80 @@ * 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 msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/virtualMachinesMappers"; +import "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { VirtualMachines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; - +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { LroEngine } from "../lro"; +import { CoreClientLro, shouldDeserializeLro } from "../coreClientLro"; +import { + VirtualMachine, + VirtualMachinesListByLocationNextOptionalParams, + VirtualMachinesListByLocationOptionalParams, + VirtualMachinesListNextOptionalParams, + VirtualMachinesListOptionalParams, + VirtualMachinesListAllNextOptionalParams, + VirtualMachinesListAllOptionalParams, + VirtualMachineSize, + VirtualMachinesListAvailableSizesOptionalParams, + VirtualMachinesListByLocationResponse, + VirtualMachineCaptureParameters, + VirtualMachinesCaptureOptionalParams, + VirtualMachinesCaptureResponse, + VirtualMachinesCreateOrUpdateOptionalParams, + VirtualMachinesCreateOrUpdateResponse, + VirtualMachineUpdate, + VirtualMachinesUpdateOptionalParams, + VirtualMachinesUpdateResponse, + VirtualMachinesDeleteOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesGetResponse, + VirtualMachinesInstanceViewOptionalParams, + VirtualMachinesInstanceViewResponse, + VirtualMachinesConvertToManagedDisksOptionalParams, + VirtualMachinesDeallocateOptionalParams, + VirtualMachinesGeneralizeOptionalParams, + VirtualMachinesListResponse, + VirtualMachinesListAllResponse, + VirtualMachinesListAvailableSizesResponse, + VirtualMachinesPowerOffOptionalParams, + VirtualMachinesReapplyOptionalParams, + VirtualMachinesRestartOptionalParams, + VirtualMachinesStartOptionalParams, + VirtualMachinesRedeployOptionalParams, + VirtualMachinesReimageOptionalParams, + VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams, + VirtualMachinesRetrieveBootDiagnosticsDataResponse, + VirtualMachinesPerformMaintenanceOptionalParams, + VirtualMachinesSimulateEvictionOptionalParams, + VirtualMachinesAssessPatchesOptionalParams, + VirtualMachinesAssessPatchesResponse, + VirtualMachineInstallPatchesParameters, + VirtualMachinesInstallPatchesOptionalParams, + VirtualMachinesInstallPatchesResponse, + RunCommandInput, + VirtualMachinesRunCommandOptionalParams, + VirtualMachinesRunCommandResponse, + VirtualMachinesListByLocationNextResponse, + VirtualMachinesListNextResponse, + VirtualMachinesListAllNextResponse +} from "../models"; + +/// /** Class representing a VirtualMachines. */ -export class VirtualMachines { +export class VirtualMachinesImpl implements VirtualMachines { private readonly client: ComputeManagementClientContext; /** - * Create a VirtualMachines. - * @param {ComputeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class VirtualMachines class. + * @param client Reference to the service client */ constructor(client: ComputeManagementClientContext) { this.client = client; @@ -29,229 +85,593 @@ export class VirtualMachines { /** * Gets all the virtual machines under the specified subscription for the specified location. * @param location The location for which virtual machines under the subscription are queried. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByLocation( + public listByLocation( + location: string, + options?: VirtualMachinesListByLocationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocationPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByLocationPagingPage(location, options); + } + }; + } + + private async *listByLocationPagingPage( + location: string, + options?: VirtualMachinesListByLocationOptionalParams + ): AsyncIterableIterator { + let result = await this._listByLocation(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByLocationNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByLocationPagingAll( location: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachinesListByLocationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocationPagingPage(location, options)) { + yield* page; + } + } + /** - * @param location The location for which virtual machines under the subscription are queried. - * @param callback The callback + * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the + * response to get the next page of virtual machines. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. */ - listByLocation( - location: string, - callback: msRest.ServiceCallback - ): void; + public list( + resourceGroupName: string, + options?: VirtualMachinesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + options?: VirtualMachinesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + options?: VirtualMachinesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(resourceGroupName, options)) { + yield* page; + } + } + + /** + * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual machines. + * @param options The options parameters. + */ + public listAll( + options?: VirtualMachinesListAllOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAllPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAllPagingPage(options); + } + }; + } + + private async *listAllPagingPage( + options?: VirtualMachinesListAllOptionalParams + ): AsyncIterableIterator { + let result = await this._listAll(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listAllNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listAllPagingAll( + options?: VirtualMachinesListAllOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAllPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all available virtual machine sizes to which the specified virtual machine can be resized. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + public listAvailableSizes( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesListAvailableSizesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAvailableSizesPagingAll( + resourceGroupName, + vmName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAvailableSizesPagingPage( + resourceGroupName, + vmName, + options + ); + } + }; + } + + private async *listAvailableSizesPagingPage( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesListAvailableSizesOptionalParams + ): AsyncIterableIterator { + let result = await this._listAvailableSizes( + resourceGroupName, + vmName, + options + ); + yield result.value || []; + } + + private async *listAvailableSizesPagingAll( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesListAvailableSizesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAvailableSizesPagingPage( + resourceGroupName, + vmName, + options + )) { + yield* page; + } + } + /** + * Gets all the virtual machines under the specified subscription for the specified location. * @param location The location for which virtual machines under the subscription are queried. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByLocation( - location: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByLocation( + private _listByLocation( location: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachinesListByLocationOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - listByLocationOperationSpec, - callback - ) as Promise; + { location, options }, + listByLocationOperationSpec + ); } /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used - * to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to + * create similar VMs. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - capture( + async beginCapture( resourceGroupName: string, vmName: string, - parameters: Models.VirtualMachineCaptureParameters, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCapture(resourceGroupName, vmName, parameters, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + parameters: VirtualMachineCaptureParameters, + options?: VirtualMachinesCaptureOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesCaptureResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, parameters, options }, + captureOperationSpec, + "location" + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to create or update a virtual machine. Please note some properties can be set only - * during virtual machine creation. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to + * create similar VMs. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param parameters Parameters supplied to the Create Virtual Machine operation. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Capture Virtual Machine operation. + * @param options The options parameters. */ - createOrUpdate( + async beginCaptureAndWait( resourceGroupName: string, vmName: string, - parameters: Models.VirtualMachine, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginCreateOrUpdate( + parameters: VirtualMachineCaptureParameters, + options?: VirtualMachinesCaptureOptionalParams + ): Promise { + const poller = await this.beginCapture( resourceGroupName, vmName, parameters, options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.VirtualMachinesCreateOrUpdateResponse - >; + ); + return poller.pollUntilDone(); } /** - * The operation to update a virtual machine. + * The operation to create or update a virtual machine. Please note some properties can be set only + * during virtual machine creation. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param parameters Parameters supplied to the Update Virtual Machine operation. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create Virtual Machine operation. + * @param options The options parameters. */ - update( + async beginCreateOrUpdate( resourceGroupName: string, vmName: string, - parameters: Models.VirtualMachineUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginUpdate(resourceGroupName, vmName, parameters, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; + parameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, parameters, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to delete a virtual machine. + * The operation to create or update a virtual machine. Please note some properties can be set only + * during virtual machine creation. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Create Virtual Machine operation. + * @param options The options parameters. */ - deleteMethod( + async beginCreateOrUpdateAndWait( resourceGroupName: string, vmName: string, - options?: Models.VirtualMachinesDeleteMethodOptionalParams - ): Promise { - return this.beginDeleteMethod(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + parameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + vmName, + parameters, + options ); + return poller.pollUntilDone(); } /** - * Retrieves information about the model view or the instance view of a virtual machine. + * The operation to update a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @param options The options parameters. */ - get( + async beginUpdate( resourceGroupName: string, vmName: string, - options?: Models.VirtualMachinesGetOptionalParams - ): Promise; + parameters: VirtualMachineUpdate, + options?: VirtualMachinesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, parameters, options }, + updateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * The operation to update a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param callback The callback + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @param options The options parameters. */ - get( + async beginUpdateAndWait( resourceGroupName: string, vmName: string, - callback: msRest.ServiceCallback - ): void; + parameters: VirtualMachineUpdate, + options?: VirtualMachinesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + vmName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** + * The operation to delete a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get( - resourceGroupName: string, - vmName: string, - options: Models.VirtualMachinesGetOptionalParams, - callback: msRest.ServiceCallback - ): void; - get( + async beginDelete( resourceGroupName: string, vmName: string, - options?: - | Models.VirtualMachinesGetOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - getOperationSpec, - callback - ) as Promise; + options?: VirtualMachinesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Retrieves information about the run-time state of a virtual machine. + * The operation to delete a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - instanceView( + async beginDeleteAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachinesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, vmName, options); + return poller.pollUntilDone(); + } + /** + * Retrieves information about the model view or the instance view of a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - instanceView( + get( resourceGroupName: string, vmName: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachinesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmName, options }, + getOperationSpec + ); + } + /** + * Retrieves information about the run-time state of a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ instanceView( resourceGroupName: string, vmName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - instanceView( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachinesInstanceViewOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - instanceViewOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmName, options }, + instanceViewOperationSpec + ); } /** @@ -259,870 +679,1011 @@ export class VirtualMachines { * stop-deallocated before invoking this operation. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - convertToManagedDisks( + async beginConvertToManagedDisks( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginConvertToManagedDisks(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachinesConvertToManagedDisksOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + convertToManagedDisksOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the - * compute resources that this virtual machine uses. + * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be + * stop-deallocated before invoking this operation. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deallocate( + async beginConvertToManagedDisksAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginDeallocate(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachinesConvertToManagedDisksOptionalParams + ): Promise { + const poller = await this.beginConvertToManagedDisks( + resourceGroupName, + vmName, + options ); + return poller.pollUntilDone(); } /** - * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the - * virtual machine before performing this operation.
    For Windows, please refer to [Create a - * managed image of a generalized VM in - * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For - * Linux, please refer to [How to create an image of a virtual machine or - * VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + * Shuts down the virtual machine and releases the compute resources. You are not billed for the + * compute resources that this virtual machine uses. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - generalize( + async beginDeallocate( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachinesDeallocateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + deallocateOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Shuts down the virtual machine and releases the compute resources. You are not billed for the + * compute resources that this virtual machine uses. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - generalize( + async beginDeallocateAndWait( resourceGroupName: string, vmName: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachinesDeallocateOptionalParams + ): Promise { + const poller = await this.beginDeallocate( + resourceGroupName, + vmName, + options + ); + return poller.pollUntilDone(); + } + /** + * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual + * machine before performing this operation.
    For Windows, please refer to [Create a managed image + * of a generalized VM in + * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For + * Linux, please refer to [How to create an image of a virtual machine or + * VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ generalize( resourceGroupName: string, vmName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - generalize( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachinesGeneralizeOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - generalizeOperationSpec, - callback + { resourceGroupName, vmName, options }, + generalizeOperationSpec ); } /** - * Lists all of the virtual machines in the specified resource group. Use the nextLink property in - * the response to get the next page of virtual machines. + * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the + * response to get the next page of virtual machines. * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list( + private _list( resourceGroupName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachinesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listOperationSpec + ); + } + /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback + * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual machines. + * @param options The options parameters. */ - list( - resourceGroupName: string, - callback: msRest.ServiceCallback - ): void; + private _listAll( + options?: VirtualMachinesListAllOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listAllOperationSpec); + } + /** + * Lists all available virtual machine sizes to which the specified virtual machine can be resized. * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback + * @param vmName The name of the virtual machine. + * @param options The options parameters. */ - list( - resourceGroupName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - list( + private _listAvailableSizes( resourceGroupName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + vmName: string, + options?: VirtualMachinesListAvailableSizesOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmName, options }, + listAvailableSizesOperationSpec + ); } /** - * Lists all of the virtual machines in the specified subscription. Use the nextLink property in - * the response to get the next page of virtual machines. - * @param [options] The optional parameters - * @returns Promise - */ - listAll( - options?: Models.VirtualMachinesListAllOptionalParams - ): Promise; - /** - * @param callback The callback - */ - listAll(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the + * same provisioned resources. You are still charged for this virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. */ - listAll( - options: Models.VirtualMachinesListAllOptionalParams, - callback: msRest.ServiceCallback - ): void; - listAll( - options?: - | Models.VirtualMachinesListAllOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - options - }, - listAllOperationSpec, - callback - ) as Promise; + async beginPowerOff( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesPowerOffOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + powerOffOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Lists all available virtual machine sizes to which the specified virtual machine can be resized. + * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the + * same provisioned resources. You are still charged for this virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listAvailableSizes( + async beginPowerOffAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise; + options?: VirtualMachinesPowerOffOptionalParams + ): Promise { + const poller = await this.beginPowerOff(resourceGroupName, vmName, options); + return poller.pollUntilDone(); + } + /** + * The operation to reapply a virtual machine's state. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - listAvailableSizes( + async beginReapply( resourceGroupName: string, vmName: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachinesReapplyOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + reapplyOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * The operation to reapply a virtual machine's state. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listAvailableSizes( - resourceGroupName: string, - vmName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listAvailableSizes( + async beginReapplyAndWait( resourceGroupName: string, vmName: string, - options?: - | msRest.RequestOptionsBase - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - listAvailableSizesOperationSpec, - callback - ) as Promise; + options?: VirtualMachinesReapplyOptionalParams + ): Promise { + const poller = await this.beginReapply(resourceGroupName, vmName, options); + return poller.pollUntilDone(); } /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with - * the same provisioned resources. You are still charged for this virtual machine. + * The operation to restart a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - powerOff( + async beginRestart( resourceGroupName: string, vmName: string, - options?: Models.VirtualMachinesPowerOffOptionalParams - ): Promise { - return this.beginPowerOff(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachinesRestartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + restartOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to reapply a virtual machine's state. + * The operation to restart a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - reapply( + async beginRestartAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginReapply(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + options?: VirtualMachinesRestartOptionalParams + ): Promise { + const poller = await this.beginRestart(resourceGroupName, vmName, options); + return poller.pollUntilDone(); } /** - * The operation to restart a virtual machine. + * The operation to start a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - restart( + async beginStart( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRestart(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachinesStartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + startOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** * The operation to start a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - start( + async beginStartAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginStart(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + options?: VirtualMachinesStartOptionalParams + ): Promise { + const poller = await this.beginStart(resourceGroupName, vmName, options); + return poller.pollUntilDone(); } /** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - redeploy( + async beginRedeploy( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRedeploy(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachinesRedeployOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + redeployOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + * Shuts down the virtual machine, moves it to a new node, and powers it back on. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - reimage( + async beginRedeployAndWait( resourceGroupName: string, vmName: string, - options?: Models.VirtualMachinesReimageOptionalParams - ): Promise { - return this.beginReimage(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ); + options?: VirtualMachinesRedeployOptionalParams + ): Promise { + const poller = await this.beginRedeploy(resourceGroupName, vmName, options); + return poller.pollUntilDone(); } /** - * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. + * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - retrieveBootDiagnosticsData( + async beginReimage( resourceGroupName: string, vmName: string, - options?: Models.VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams - ): Promise; + options?: VirtualMachinesReimageOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + reimageOperationSpec + ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); + } + /** + * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param callback The callback + * @param options The options parameters. */ - retrieveBootDiagnosticsData( + async beginReimageAndWait( resourceGroupName: string, vmName: string, - callback: msRest.ServiceCallback - ): void; + options?: VirtualMachinesReimageOptionalParams + ): Promise { + const poller = await this.beginReimage(resourceGroupName, vmName, options); + return poller.pollUntilDone(); + } + /** + * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ retrieveBootDiagnosticsData( resourceGroupName: string, vmName: string, - options: Models.VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams, - callback: msRest.ServiceCallback - ): void; - retrieveBootDiagnosticsData( - resourceGroupName: string, - vmName: string, - options?: - | Models.VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + options?: VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - retrieveBootDiagnosticsDataOperationSpec, - callback - ) as Promise; + { resourceGroupName, vmName, options }, + retrieveBootDiagnosticsDataOperationSpec + ); } /** * The operation to perform maintenance on a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - performMaintenance( + async beginPerformMaintenance( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginPerformMaintenance(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() + options?: VirtualMachinesPerformMaintenanceOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + performMaintenanceOperationSpec ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to simulate the eviction of spot virtual machine. + * The operation to perform maintenance on a virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - simulateEviction( + async beginPerformMaintenanceAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param callback The callback - */ - simulateEviction( - resourceGroupName: string, - vmName: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param options The optional parameters - * @param callback The callback - */ - simulateEviction( - resourceGroupName: string, - vmName: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - simulateEviction( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - vmName, - options - }, - simulateEvictionOperationSpec, - callback - ); - } - - /** - * Assess patches on the VM. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - assessPatches( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginAssessPatches(resourceGroupName, vmName, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; - } - - /** - * Installs patches on the VM. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param [options] The optional parameters - * @returns Promise - */ - installPatches( - resourceGroupName: string, - vmName: string, - installPatchesInput: Models.VirtualMachineInstallPatchesParameters, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginInstallPatches( + options?: VirtualMachinesPerformMaintenanceOptionalParams + ): Promise { + const poller = await this.beginPerformMaintenance( resourceGroupName, vmName, - installPatchesInput, - options - ).then((lroPoller) => lroPoller.pollUntilFinished()) as Promise< - Models.VirtualMachinesInstallPatchesResponse - >; - } - - /** - * Run command on the VM. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Parameters supplied to the Run command operation. - * @param [options] The optional parameters - * @returns Promise - */ - runCommand( - resourceGroupName: string, - vmName: string, - parameters: Models.RunCommandInput, - options?: msRest.RequestOptionsBase - ): Promise { - return this.beginRunCommand(resourceGroupName, vmName, parameters, options).then((lroPoller) => - lroPoller.pollUntilFinished() - ) as Promise; - } - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used - * to create similar VMs. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Parameters supplied to the Capture Virtual Machine operation. - * @param [options] The optional parameters - * @returns Promise - */ - beginCapture( - resourceGroupName: string, - vmName: string, - parameters: Models.VirtualMachineCaptureParameters, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - parameters, - options - }, - beginCaptureOperationSpec, - options - ); - } - - /** - * The operation to create or update a virtual machine. Please note some properties can be set only - * during virtual machine creation. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Parameters supplied to the Create Virtual Machine operation. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate( - resourceGroupName: string, - vmName: string, - parameters: Models.VirtualMachine, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options - ); - } - - /** - * The operation to update a virtual machine. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param parameters Parameters supplied to the Update Virtual Machine operation. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate( - resourceGroupName: string, - vmName: string, - parameters: Models.VirtualMachineUpdate, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - parameters, - options - }, - beginUpdateOperationSpec, - options - ); - } - - /** - * The operation to delete a virtual machine. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod( - resourceGroupName: string, - vmName: string, - options?: Models.VirtualMachinesBeginDeleteMethodOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginDeleteMethodOperationSpec, - options - ); - } - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be - * stop-deallocated before invoking this operation. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - beginConvertToManagedDisks( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginConvertToManagedDisksOperationSpec, - options - ); - } - - /** - * Shuts down the virtual machine and releases the compute resources. You are not billed for the - * compute resources that this virtual machine uses. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeallocate( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginDeallocateOperationSpec, - options - ); - } - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with - * the same provisioned resources. You are still charged for this virtual machine. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - beginPowerOff( - resourceGroupName: string, - vmName: string, - options?: Models.VirtualMachinesBeginPowerOffOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginPowerOffOperationSpec, options ); + return poller.pollUntilDone(); } /** - * The operation to reapply a virtual machine's state. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise - */ - beginReapply( - resourceGroupName: string, - vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginReapplyOperationSpec, - options - ); - } - - /** - * The operation to restart a virtual machine. + * The operation to simulate the eviction of spot virtual machine. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRestart( + simulateEviction( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginRestartOperationSpec, - options + options?: VirtualMachinesSimulateEvictionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vmName, options }, + simulateEvictionOperationSpec ); } /** - * The operation to start a virtual machine. + * Assess patches on the VM. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginStart( + async beginAssessPatches( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginStartOperationSpec, - options + options?: VirtualMachinesAssessPatchesOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesAssessPatchesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, options }, + assessPatchesOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * Shuts down the virtual machine, moves it to a new node, and powers it back on. + * Assess patches on the VM. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRedeploy( + async beginAssessPatchesAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginRedeployOperationSpec, + options?: VirtualMachinesAssessPatchesOptionalParams + ): Promise { + const poller = await this.beginAssessPatches( + resourceGroupName, + vmName, options ); + return poller.pollUntilDone(); } /** - * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + * Installs patches on the VM. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. */ - beginReimage( + async beginInstallPatches( resourceGroupName: string, vmName: string, - options?: Models.VirtualMachinesBeginReimageOptionalParams - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginReimageOperationSpec, - options + installPatchesInput: VirtualMachineInstallPatchesParameters, + options?: VirtualMachinesInstallPatchesOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesInstallPatchesResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, installPatchesInput, options }, + installPatchesOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** - * The operation to perform maintenance on a virtual machine. + * Installs patches on the VM. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. */ - beginPerformMaintenance( + async beginInstallPatchesAndWait( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginPerformMaintenanceOperationSpec, + installPatchesInput: VirtualMachineInstallPatchesParameters, + options?: VirtualMachinesInstallPatchesOptionalParams + ): Promise { + const poller = await this.beginInstallPatches( + resourceGroupName, + vmName, + installPatchesInput, options ); + return poller.pollUntilDone(); } /** - * Assess patches on the VM. + * Run command on the VM. * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param [options] The optional parameters - * @returns Promise + * @param parameters Parameters supplied to the Run command operation. + * @param options The options parameters. */ - beginAssessPatches( + async beginRunCommand( resourceGroupName: string, vmName: string, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - options - }, - beginAssessPatchesOperationSpec, - options - ); - } - - /** - * Installs patches on the VM. - * @param resourceGroupName The name of the resource group. - * @param vmName The name of the virtual machine. - * @param installPatchesInput Input for InstallPatches as directly received by the API - * @param [options] The optional parameters - * @returns Promise - */ - beginInstallPatches( - resourceGroupName: string, - vmName: string, - installPatchesInput: Models.VirtualMachineInstallPatchesParameters, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - installPatchesInput, - options - }, - beginInstallPatchesOperationSpec, - options + parameters: RunCommandInput, + options?: VirtualMachinesRunCommandOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesRunCommandResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new CoreClientLro( + sendOperation, + { resourceGroupName, vmName, parameters, options }, + runCommandOperationSpec, + "location" ); + return new LroEngine(lro, { intervalInMs: options?.updateIntervalInMs }); } /** @@ -1130,695 +1691,621 @@ export class VirtualMachines { * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRunCommand( + async beginRunCommandAndWait( resourceGroupName: string, vmName: string, - parameters: Models.RunCommandInput, - options?: msRest.RequestOptionsBase - ): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - vmName, - parameters, - options - }, - beginRunCommandOperationSpec, + parameters: RunCommandInput, + options?: VirtualMachinesRunCommandOptionalParams + ): Promise { + const poller = await this.beginRunCommand( + resourceGroupName, + vmName, + parameters, options ); + return poller.pollUntilDone(); } /** - * Gets all the virtual machines under the specified subscription for the specified location. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByLocationNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByLocationNext( - 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 + * ListByLocationNext + * @param location The location for which virtual machines under the subscription are queried. + * @param nextLink The nextLink from the previous successful call to the ListByLocation method. + * @param options The options parameters. */ - listByLocationNext( - nextPageLink: string, - options: msRest.RequestOptionsBase, - callback: msRest.ServiceCallback - ): void; - listByLocationNext( - nextPageLink: string, - options?: msRest.RequestOptionsBase | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listByLocationNext( + location: string, + nextLink: string, + options?: VirtualMachinesListByLocationNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByLocationNextOperationSpec, - callback - ) as Promise; + { location, nextLink, options }, + listByLocationNextOperationSpec + ); } /** - * Lists all of the virtual machines in the specified resource group. Use the nextLink property in - * the response to get the next page of virtual machines. - * @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 resourceGroupName The name of the resource group. + * @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( + resourceGroupName: string, + nextLink: string, + options?: VirtualMachinesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback - ) as Promise; + { resourceGroupName, nextLink, options }, + listNextOperationSpec + ); } /** - * Lists all of the virtual machines in the specified subscription. Use the nextLink property in - * the response to get the next page of virtual machines. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listAllNext( - nextPageLink: string, - options?: Models.VirtualMachinesListAllNextOptionalParams - ): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listAllNext( - nextPageLink: string, - callback: msRest.ServiceCallback - ): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListAllNext + * @param nextLink The nextLink from the previous successful call to the ListAll method. + * @param options The options parameters. */ - listAllNext( - nextPageLink: string, - options: Models.VirtualMachinesListAllNextOptionalParams, - callback: msRest.ServiceCallback - ): void; - listAllNext( - nextPageLink: string, - options?: - | Models.VirtualMachinesListAllNextOptionalParams - | msRest.ServiceCallback, - callback?: msRest.ServiceCallback - ): Promise { + private _listAllNext( + nextLink: string, + options?: VirtualMachinesListAllNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAllNextOperationSpec, - callback - ) as Promise; + { nextLink, options }, + listAllNextOperationSpec + ); } } +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByLocationOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", - urlParameters: [Parameters.location1, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.expand1, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const instanceViewOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: { - bodyMapper: Mappers.VirtualMachineInstanceView - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const generalizeOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const listByLocationOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", httpMethod: "GET", - path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines", - urlParameters: [Parameters.resourceGroupName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; - -const listAllOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", - urlParameters: [Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0, Parameters.statusOnly], - headerParameters: [Parameters.acceptLanguage], +const captureOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.VirtualMachineListResult + bodyMapper: Mappers.VirtualMachineCaptureResult }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachineCaptureResult + }, + 202: { + bodyMapper: Mappers.VirtualMachineCaptureResult + }, + 204: { + bodyMapper: Mappers.VirtualMachineCaptureResult } }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listAvailableSizesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.VirtualMachineSizeListResult + bodyMapper: Mappers.VirtualMachine }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachine + }, + 202: { + bodyMapper: Mappers.VirtualMachine + }, + 204: { + bodyMapper: Mappers.VirtualMachine } }, + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const retrieveBootDiagnosticsDataOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const updateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.sasUriExpirationTimeInMinutes, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.RetrieveBootDiagnosticsDataResult + bodyMapper: Mappers.VirtualMachine }, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.VirtualMachine + }, + 202: { + bodyMapper: Mappers.VirtualMachine + }, + 204: { + bodyMapper: Mappers.VirtualMachine } }, + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const simulateEvictionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const deleteOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion, Parameters.forceDeletion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginCaptureOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const getOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualMachineCaptureParameters, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachineCaptureResult - }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachine } }, + queryParameters: [Parameters.apiVersion, Parameters.expand1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const instanceViewOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualMachine, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.VirtualMachine - }, - 201: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.VirtualMachineInstanceView } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const convertToManagedDisksOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.VirtualMachineUpdate, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.VirtualMachine - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const deallocateOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.forceDeletion, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginConvertToManagedDisksOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const generalizeOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize", + httpMethod: "POST", + responses: { 200: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginDeallocateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const listOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineListResult } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const beginPowerOffOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const listAllOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.skipShutdown, Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineListResult } }, + queryParameters: [Parameters.apiVersion, Parameters.statusOnly], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const beginReapplyOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const listAvailableSizesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 200: { + bodyMapper: Mappers.VirtualMachineSizeListResult } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginRestartOperationSpec: msRest.OperationSpec = { +const powerOffOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion, Parameters.skipShutdown], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + serializer +}; +const reapplyOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginStartOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const restartOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginRedeployOperationSpec: msRest.OperationSpec = { +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start", httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + serializer +}; +const redeployOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginReimageOperationSpec: msRest.OperationSpec = { +const reimageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const retrieveBootDiagnosticsDataOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: ["options", "parameters"], - mapper: Mappers.VirtualMachineReimageParameters - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData", + httpMethod: "POST", responses: { - 200: {}, - 202: {}, + 200: { + bodyMapper: Mappers.RetrieveBootDiagnosticsDataResult + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [ + Parameters.apiVersion, + Parameters.sasUriExpirationTimeInMinutes + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginPerformMaintenanceOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const performMaintenanceOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - responses: { - 200: {}, - 202: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], serializer }; - -const beginAssessPatchesOperationSpec: msRest.OperationSpec = { +const simulateEvictionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", httpMethod: "POST", + responses: { 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + serializer +}; +const assessPatchesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.VirtualMachineAssessPatchesResult }, - 202: {}, + 201: { + bodyMapper: Mappers.VirtualMachineAssessPatchesResult + }, + 202: { + bodyMapper: Mappers.VirtualMachineAssessPatchesResult + }, + 204: { + bodyMapper: Mappers.VirtualMachineAssessPatchesResult + }, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept], serializer }; - -const beginInstallPatchesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const installPatchesOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "installPatchesInput", - mapper: { - ...Mappers.VirtualMachineInstallPatchesParameters, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.VirtualMachineInstallPatchesResult }, - 202: {}, + 201: { + bodyMapper: Mappers.VirtualMachineInstallPatchesResult + }, + 202: { + bodyMapper: Mappers.VirtualMachineInstallPatchesResult + }, + 204: { + bodyMapper: Mappers.VirtualMachineInstallPatchesResult + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.installPatchesInput, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginRunCommandOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const runCommandOperationSpec: coreClient.OperationSpec = { path: - "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", - urlParameters: [Parameters.resourceGroupName, Parameters.vmName, Parameters.subscriptionId], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RunCommandInput, - required: true - } - }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.RunCommandResult }, - 202: {}, - default: { - bodyMapper: Mappers.CloudError + 201: { + bodyMapper: Mappers.RunCommandResult + }, + 202: { + bodyMapper: Mappers.RunCommandResult + }, + 204: { + bodyMapper: Mappers.RunCommandResult } }, + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.vmName + ], + headerParameters: [Parameters.contentType, Parameters.accept1], + mediaType: "json", serializer }; - -const listByLocationNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByLocationNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location1 + ], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; - -const listAllNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listAllNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [Parameters.nextPageLink], - queryParameters: [Parameters.apiVersion0, Parameters.statusOnly], - headerParameters: [Parameters.acceptLanguage], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.VirtualMachineListResult - }, - default: { - bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.statusOnly], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/availabilitySets.ts b/sdk/compute/arm-compute/src/operationsInterfaces/availabilitySets.ts new file mode 100644 index 000000000000..deb1c027acb7 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/availabilitySets.ts @@ -0,0 +1,106 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AvailabilitySet, + AvailabilitySetsListBySubscriptionOptionalParams, + AvailabilitySetsListOptionalParams, + VirtualMachineSize, + AvailabilitySetsListAvailableSizesOptionalParams, + AvailabilitySetsCreateOrUpdateOptionalParams, + AvailabilitySetsCreateOrUpdateResponse, + AvailabilitySetUpdate, + AvailabilitySetsUpdateOptionalParams, + AvailabilitySetsUpdateResponse, + AvailabilitySetsDeleteOptionalParams, + AvailabilitySetsGetOptionalParams, + AvailabilitySetsGetResponse +} from "../models"; + +/// +/** Interface representing a AvailabilitySets. */ +export interface AvailabilitySets { + /** + * Lists all availability sets in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: AvailabilitySetsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all availability sets in a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: AvailabilitySetsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all available virtual machine sizes that can be used to create a new virtual machine in an + * existing availability set. + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param options The options parameters. + */ + listAvailableSizes( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsListAvailableSizesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update an availability set. + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param parameters Parameters supplied to the Create Availability Set operation. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + availabilitySetName: string, + parameters: AvailabilitySet, + options?: AvailabilitySetsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update an availability set. + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param parameters Parameters supplied to the Update Availability Set operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + availabilitySetName: string, + parameters: AvailabilitySetUpdate, + options?: AvailabilitySetsUpdateOptionalParams + ): Promise; + /** + * Delete an availability set. + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsDeleteOptionalParams + ): Promise; + /** + * Retrieves information about an availability set. + * @param resourceGroupName The name of the resource group. + * @param availabilitySetName The name of the availability set. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + availabilitySetName: string, + options?: AvailabilitySetsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceOperatingSystems.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceOperatingSystems.ts new file mode 100644 index 000000000000..b7bc75e22ed1 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceOperatingSystems.ts @@ -0,0 +1,71 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + OSVersion, + CloudServiceOperatingSystemsListOSVersionsOptionalParams, + OSFamily, + CloudServiceOperatingSystemsListOSFamiliesOptionalParams, + CloudServiceOperatingSystemsGetOSVersionOptionalParams, + CloudServiceOperatingSystemsGetOSVersionResponse, + CloudServiceOperatingSystemsGetOSFamilyOptionalParams, + CloudServiceOperatingSystemsGetOSFamilyResponse +} from "../models"; + +/// +/** Interface representing a CloudServiceOperatingSystems. */ +export interface CloudServiceOperatingSystems { + /** + * Gets a list of all guest operating system versions available to be specified in the XML service + * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next + * page of OS versions. Do this till nextLink is null to fetch all the OS versions. + * @param location Name of the location that the OS versions pertain to. + * @param options The options parameters. + */ + listOSVersions( + location: string, + options?: CloudServiceOperatingSystemsListOSVersionsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of all guest operating system families available to be specified in the XML service + * configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next + * page of OS Families. Do this till nextLink is null to fetch all the OS Families. + * @param location Name of the location that the OS families pertain to. + * @param options The options parameters. + */ + listOSFamilies( + location: string, + options?: CloudServiceOperatingSystemsListOSFamiliesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets properties of a guest operating system version that can be specified in the XML service + * configuration (.cscfg) for a cloud service. + * @param location Name of the location that the OS version pertains to. + * @param osVersionName Name of the OS version. + * @param options The options parameters. + */ + getOSVersion( + location: string, + osVersionName: string, + options?: CloudServiceOperatingSystemsGetOSVersionOptionalParams + ): Promise; + /** + * Gets properties of a guest operating system family that can be specified in the XML service + * configuration (.cscfg) for a cloud service. + * @param location Name of the location that the OS family pertains to. + * @param osFamilyName Name of the OS family. + * @param options The options parameters. + */ + getOSFamily( + location: string, + osFamilyName: string, + options?: CloudServiceOperatingSystemsGetOSFamilyOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts new file mode 100644 index 000000000000..53d4aec8b19e --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoleInstances.ts @@ -0,0 +1,193 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RoleInstance, + CloudServiceRoleInstancesListOptionalParams, + CloudServiceRoleInstancesDeleteOptionalParams, + CloudServiceRoleInstancesGetOptionalParams, + CloudServiceRoleInstancesGetResponse, + CloudServiceRoleInstancesGetInstanceViewOptionalParams, + CloudServiceRoleInstancesGetInstanceViewResponse, + CloudServiceRoleInstancesRestartOptionalParams, + CloudServiceRoleInstancesReimageOptionalParams, + CloudServiceRoleInstancesRebuildOptionalParams, + CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams, + CloudServiceRoleInstancesGetRemoteDesktopFileResponse +} from "../models"; + +/// +/** Interface representing a CloudServiceRoleInstances. */ +export interface CloudServiceRoleInstances { + /** + * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get + * the next page of role instances. Do this till nextLink is null to fetch all the role instances. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + list( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes a role instance from a cloud service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginDelete( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a role instance from a cloud service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginDeleteAndWait( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesDeleteOptionalParams + ): Promise; + /** + * Gets a role instance from a cloud service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + get( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesGetOptionalParams + ): Promise; + /** + * Retrieves information about the run-time state of a role instance in a cloud service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + getInstanceView( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesGetInstanceViewOptionalParams + ): Promise; + /** + * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud + * service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginRestart( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesRestartOptionalParams + ): Promise, void>>; + /** + * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud + * service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginRestartAndWait( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesRestartOptionalParams + ): Promise; + /** + * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginReimage( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesReimageOptionalParams + ): Promise, void>>; + /** + * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginReimageAndWait( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesReimageOptionalParams + ): Promise; + /** + * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles and initializes the storage resources that are used by them. If you do not + * want to initialize storage resources, you can use Reimage Role Instance. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginRebuild( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesRebuildOptionalParams + ): Promise, void>>; + /** + * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web + * roles or worker roles and initializes the storage resources that are used by them. If you do not + * want to initialize storage resources, you can use Reimage Role Instance. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + beginRebuildAndWait( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesRebuildOptionalParams + ): Promise; + /** + * Gets a remote desktop file for a role instance in a cloud service. + * @param roleInstanceName Name of the role instance. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + getRemoteDesktopFile( + roleInstanceName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRoleInstancesGetRemoteDesktopFileOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts new file mode 100644 index 000000000000..eb2c44f5f435 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServiceRoles.ts @@ -0,0 +1,46 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + CloudServiceRole, + CloudServiceRolesListOptionalParams, + CloudServiceRolesGetOptionalParams, + CloudServiceRolesGetResponse +} from "../models"; + +/// +/** Interface representing a CloudServiceRoles. */ +export interface CloudServiceRoles { + /** + * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next + * page of roles. Do this till nextLink is null to fetch all the roles. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + list( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRolesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a role from a cloud service. + * @param roleName Name of the role. + * @param resourceGroupName + * @param cloudServiceName + * @param options The options parameters. + */ + get( + roleName: string, + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServiceRolesGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.ts new file mode 100644 index 000000000000..7b99820deb0b --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServices.ts @@ -0,0 +1,295 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + CloudService, + CloudServicesListAllOptionalParams, + CloudServicesListOptionalParams, + CloudServicesCreateOrUpdateOptionalParams, + CloudServicesCreateOrUpdateResponse, + CloudServicesUpdateOptionalParams, + CloudServicesUpdateResponse, + CloudServicesDeleteOptionalParams, + CloudServicesGetOptionalParams, + CloudServicesGetResponse, + CloudServicesGetInstanceViewOptionalParams, + CloudServicesGetInstanceViewResponse, + CloudServicesStartOptionalParams, + CloudServicesPowerOffOptionalParams, + CloudServicesRestartOptionalParams, + CloudServicesReimageOptionalParams, + CloudServicesRebuildOptionalParams, + CloudServicesDeleteInstancesOptionalParams +} from "../models"; + +/// +/** Interface representing a CloudServices. */ +export interface CloudServices { + /** + * Gets a list of all cloud services in the subscription, regardless of the associated resource group. + * Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink + * is null to fetch all the Cloud Services. + * @param options The options parameters. + */ + listAll( + options?: CloudServicesListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of all cloud services under a resource group. Use nextLink property in the response to + * get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. + * @param resourceGroupName Name of the resource group. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: CloudServicesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a cloud service. Please note some properties can be set only during cloud service + * creation. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CloudServicesCreateOrUpdateResponse + > + >; + /** + * Create or update a cloud service. Please note some properties can be set only during cloud service + * creation. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CloudServicesUpdateResponse + > + >; + /** + * Update a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesUpdateOptionalParams + ): Promise; + /** + * Deletes a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesDeleteOptionalParams + ): Promise; + /** + * Display information about a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesGetOptionalParams + ): Promise; + /** + * Gets the status of a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + getInstanceView( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesGetInstanceViewOptionalParams + ): Promise; + /** + * Starts the cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesStartOptionalParams + ): Promise, void>>; + /** + * Starts the cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesStartOptionalParams + ): Promise; + /** + * Power off the cloud service. Note that resources are still attached and you are getting charged for + * the resources. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginPowerOff( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesPowerOffOptionalParams + ): Promise, void>>; + /** + * Power off the cloud service. Note that resources are still attached and you are getting charged for + * the resources. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginPowerOffAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesPowerOffOptionalParams + ): Promise; + /** + * Restarts one or more role instances in a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesRestartOptionalParams + ): Promise, void>>; + /** + * Restarts one or more role instances in a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesRestartOptionalParams + ): Promise; + /** + * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker + * roles. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginReimage( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesReimageOptionalParams + ): Promise, void>>; + /** + * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker + * roles. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginReimageAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesReimageOptionalParams + ): Promise; + /** + * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and + * initializes the storage resources that are used by them. If you do not want to initialize storage + * resources, you can use Reimage Role Instances. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginRebuild( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesRebuildOptionalParams + ): Promise, void>>; + /** + * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and + * initializes the storage resources that are used by them. If you do not want to initialize storage + * resources, you can use Reimage Role Instances. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginRebuildAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesRebuildOptionalParams + ): Promise; + /** + * Deletes role instances in a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginDeleteInstances( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesDeleteInstancesOptionalParams + ): Promise, void>>; + /** + * Deletes role instances in a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + beginDeleteInstancesAndWait( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesDeleteInstancesOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.ts b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.ts new file mode 100644 index 000000000000..1cb5e2f2d34c --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/cloudServicesUpdateDomain.ts @@ -0,0 +1,80 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + UpdateDomain, + CloudServicesUpdateDomainListUpdateDomainsOptionalParams, + CloudServicesUpdateDomainWalkUpdateDomainOptionalParams, + CloudServicesUpdateDomainGetUpdateDomainOptionalParams, + CloudServicesUpdateDomainGetUpdateDomainResponse +} from "../models"; + +/// +/** Interface representing a CloudServicesUpdateDomain. */ +export interface CloudServicesUpdateDomain { + /** + * Gets a list of all update domains in a cloud service. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param options The options parameters. + */ + listUpdateDomains( + resourceGroupName: string, + cloudServiceName: string, + options?: CloudServicesUpdateDomainListUpdateDomainsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Updates the role instances in the specified update domain. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param updateDomain Specifies an integer value that identifies the update domain. Update domains are + * identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of + * 1, and so on. + * @param options The options parameters. + */ + beginWalkUpdateDomain( + resourceGroupName: string, + cloudServiceName: string, + updateDomain: number, + options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams + ): Promise, void>>; + /** + * Updates the role instances in the specified update domain. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param updateDomain Specifies an integer value that identifies the update domain. Update domains are + * identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of + * 1, and so on. + * @param options The options parameters. + */ + beginWalkUpdateDomainAndWait( + resourceGroupName: string, + cloudServiceName: string, + updateDomain: number, + options?: CloudServicesUpdateDomainWalkUpdateDomainOptionalParams + ): Promise; + /** + * Gets the specified update domain of a cloud service. Use nextLink property in the response to get + * the next page of update domains. Do this till nextLink is null to fetch all the update domains. + * @param resourceGroupName Name of the resource group. + * @param cloudServiceName Name of the cloud service. + * @param updateDomain Specifies an integer value that identifies the update domain. Update domains are + * identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of + * 1, and so on. + * @param options The options parameters. + */ + getUpdateDomain( + resourceGroupName: string, + cloudServiceName: string, + updateDomain: number, + options?: CloudServicesUpdateDomainGetUpdateDomainOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHostGroups.ts b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHostGroups.ts new file mode 100644 index 000000000000..7955ec460e25 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHostGroups.ts @@ -0,0 +1,95 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DedicatedHostGroup, + DedicatedHostGroupsListByResourceGroupOptionalParams, + DedicatedHostGroupsListBySubscriptionOptionalParams, + DedicatedHostGroupsCreateOrUpdateOptionalParams, + DedicatedHostGroupsCreateOrUpdateResponse, + DedicatedHostGroupUpdate, + DedicatedHostGroupsUpdateOptionalParams, + DedicatedHostGroupsUpdateResponse, + DedicatedHostGroupsDeleteOptionalParams, + DedicatedHostGroupsGetOptionalParams, + DedicatedHostGroupsGetResponse +} from "../models"; + +/// +/** Interface representing a DedicatedHostGroups. */ +export interface DedicatedHostGroups { + /** + * Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in + * the response to get the next page of dedicated host groups. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: DedicatedHostGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the dedicated host groups in the subscription. Use the nextLink property in the + * response to get the next page of dedicated host groups. + * @param options The options parameters. + */ + listBySubscription( + options?: DedicatedHostGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups + * please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param parameters Parameters supplied to the Create Dedicated Host Group. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + hostGroupName: string, + parameters: DedicatedHostGroup, + options?: DedicatedHostGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update an dedicated host group. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param parameters Parameters supplied to the Update Dedicated Host Group operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + hostGroupName: string, + parameters: DedicatedHostGroupUpdate, + options?: DedicatedHostGroupsUpdateOptionalParams + ): Promise; + /** + * Delete a dedicated host group. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostGroupsDeleteOptionalParams + ): Promise; + /** + * Retrieves information about a dedicated host group. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostGroupsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts new file mode 100644 index 000000000000..bcc0e63d1878 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/dedicatedHosts.ts @@ -0,0 +1,149 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DedicatedHost, + DedicatedHostsListByHostGroupOptionalParams, + DedicatedHostsCreateOrUpdateOptionalParams, + DedicatedHostsCreateOrUpdateResponse, + DedicatedHostUpdate, + DedicatedHostsUpdateOptionalParams, + DedicatedHostsUpdateResponse, + DedicatedHostsDeleteOptionalParams, + DedicatedHostsGetOptionalParams, + DedicatedHostsGetResponse +} from "../models"; + +/// +/** Interface representing a DedicatedHosts. */ +export interface DedicatedHosts { + /** + * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in + * the response to get the next page of dedicated hosts. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param options The options parameters. + */ + listByHostGroup( + resourceGroupName: string, + hostGroupName: string, + options?: DedicatedHostsListByHostGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a dedicated host . + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Create Dedicated Host. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHost, + options?: DedicatedHostsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DedicatedHostsCreateOrUpdateResponse + > + >; + /** + * Create or update a dedicated host . + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Create Dedicated Host. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHost, + options?: DedicatedHostsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update an dedicated host . + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Update Dedicated Host operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHostUpdate, + options?: DedicatedHostsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DedicatedHostsUpdateResponse + > + >; + /** + * Update an dedicated host . + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host . + * @param parameters Parameters supplied to the Update Dedicated Host operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + parameters: DedicatedHostUpdate, + options?: DedicatedHostsUpdateOptionalParams + ): Promise; + /** + * Delete a dedicated host. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a dedicated host. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsDeleteOptionalParams + ): Promise; + /** + * Retrieves information about a dedicated host. + * @param resourceGroupName The name of the resource group. + * @param hostGroupName The name of the dedicated host group. + * @param hostName The name of the dedicated host. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + hostGroupName: string, + hostName: string, + options?: DedicatedHostsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.ts b/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.ts new file mode 100644 index 000000000000..0dca9e5ba7c5 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/diskAccesses.ts @@ -0,0 +1,277 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DiskAccess, + DiskAccessesListByResourceGroupOptionalParams, + DiskAccessesListOptionalParams, + PrivateEndpointConnection, + DiskAccessesListPrivateEndpointConnectionsOptionalParams, + DiskAccessesCreateOrUpdateOptionalParams, + DiskAccessesCreateOrUpdateResponse, + DiskAccessUpdate, + DiskAccessesUpdateOptionalParams, + DiskAccessesUpdateResponse, + DiskAccessesGetOptionalParams, + DiskAccessesGetResponse, + DiskAccessesDeleteOptionalParams, + DiskAccessesGetPrivateLinkResourcesOptionalParams, + DiskAccessesGetPrivateLinkResourcesResponse, + DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams, + DiskAccessesUpdateAPrivateEndpointConnectionResponse, + DiskAccessesGetAPrivateEndpointConnectionOptionalParams, + DiskAccessesGetAPrivateEndpointConnectionResponse, + DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams +} from "../models"; + +/// +/** Interface representing a DiskAccesses. */ +export interface DiskAccesses { + /** + * Lists all the disk access resources under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: DiskAccessesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the disk access resources under a subscription. + * @param options The options parameters. + */ + list( + options?: DiskAccessesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * List information about private endpoint connections under a disk access resource + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + listPrivateEndpointConnections( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesListPrivateEndpointConnectionsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates a disk access resource + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Put disk access operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + diskAccessName: string, + diskAccess: DiskAccess, + options?: DiskAccessesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskAccessesCreateOrUpdateResponse + > + >; + /** + * Creates or updates a disk access resource + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Put disk access operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskAccessName: string, + diskAccess: DiskAccess, + options?: DiskAccessesCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates (patches) a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Patch disk access operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + diskAccessName: string, + diskAccess: DiskAccessUpdate, + options?: DiskAccessesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskAccessesUpdateResponse + > + >; + /** + * Updates (patches) a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param diskAccess disk access object supplied in the body of the Patch disk access operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + diskAccessName: string, + diskAccess: DiskAccessUpdate, + options?: DiskAccessesUpdateOptionalParams + ): Promise; + /** + * Gets information about a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesGetOptionalParams + ): Promise; + /** + * Deletes a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesDeleteOptionalParams + ): Promise; + /** + * Gets the private link resources possible under disk access resource + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + getPrivateLinkResources( + resourceGroupName: string, + diskAccessName: string, + options?: DiskAccessesGetPrivateLinkResourcesOptionalParams + ): Promise; + /** + * Approve or reject a private endpoint connection under disk access resource, this can't be used to + * create a new private endpoint connection. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection private endpoint connection object supplied in the body of the Put + * private endpoint connection operation. + * @param options The options parameters. + */ + beginUpdateAPrivateEndpointConnection( + resourceGroupName: string, + diskAccessName: string, + privateEndpointConnectionName: string, + privateEndpointConnection: PrivateEndpointConnection, + options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskAccessesUpdateAPrivateEndpointConnectionResponse + > + >; + /** + * Approve or reject a private endpoint connection under disk access resource, this can't be used to + * create a new private endpoint connection. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection private endpoint connection object supplied in the body of the Put + * private endpoint connection operation. + * @param options The options parameters. + */ + beginUpdateAPrivateEndpointConnectionAndWait( + resourceGroupName: string, + diskAccessName: string, + privateEndpointConnectionName: string, + privateEndpointConnection: PrivateEndpointConnection, + options?: DiskAccessesUpdateAPrivateEndpointConnectionOptionalParams + ): Promise; + /** + * Gets information about a private endpoint connection under a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The options parameters. + */ + getAPrivateEndpointConnection( + resourceGroupName: string, + diskAccessName: string, + privateEndpointConnectionName: string, + options?: DiskAccessesGetAPrivateEndpointConnectionOptionalParams + ): Promise; + /** + * Deletes a private endpoint connection under a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The options parameters. + */ + beginDeleteAPrivateEndpointConnection( + resourceGroupName: string, + diskAccessName: string, + privateEndpointConnectionName: string, + options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams + ): Promise, void>>; + /** + * Deletes a private endpoint connection under a disk access resource. + * @param resourceGroupName The name of the resource group. + * @param diskAccessName The name of the disk access resource that is being created. The name can't be + * changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, + * 0-9 and _. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The options parameters. + */ + beginDeleteAPrivateEndpointConnectionAndWait( + resourceGroupName: string, + diskAccessName: string, + privateEndpointConnectionName: string, + options?: DiskAccessesDeleteAPrivateEndpointConnectionOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.ts b/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.ts new file mode 100644 index 000000000000..4f92f8a1aa92 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/diskEncryptionSets.ts @@ -0,0 +1,172 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DiskEncryptionSet, + DiskEncryptionSetsListByResourceGroupOptionalParams, + DiskEncryptionSetsListOptionalParams, + DiskEncryptionSetsListAssociatedResourcesOptionalParams, + DiskEncryptionSetsCreateOrUpdateOptionalParams, + DiskEncryptionSetsCreateOrUpdateResponse, + DiskEncryptionSetUpdate, + DiskEncryptionSetsUpdateOptionalParams, + DiskEncryptionSetsUpdateResponse, + DiskEncryptionSetsGetOptionalParams, + DiskEncryptionSetsGetResponse, + DiskEncryptionSetsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a DiskEncryptionSets. */ +export interface DiskEncryptionSets { + /** + * Lists all the disk encryption sets under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: DiskEncryptionSetsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the disk encryption sets under a subscription. + * @param options The options parameters. + */ + list( + options?: DiskEncryptionSetsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all resources that are encrypted with this disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + listAssociatedResources( + resourceGroupName: string, + diskEncryptionSetName: string, + options?: DiskEncryptionSetsListAssociatedResourcesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates a disk encryption set + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Put disk encryption + * set operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + diskEncryptionSetName: string, + diskEncryptionSet: DiskEncryptionSet, + options?: DiskEncryptionSetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskEncryptionSetsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a disk encryption set + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Put disk encryption + * set operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskEncryptionSetName: string, + diskEncryptionSet: DiskEncryptionSet, + options?: DiskEncryptionSetsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates (patches) a disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Patch disk + * encryption set operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + diskEncryptionSetName: string, + diskEncryptionSet: DiskEncryptionSetUpdate, + options?: DiskEncryptionSetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskEncryptionSetsUpdateResponse + > + >; + /** + * Updates (patches) a disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskEncryptionSet disk encryption set object supplied in the body of the Patch disk + * encryption set operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + diskEncryptionSetName: string, + diskEncryptionSet: DiskEncryptionSetUpdate, + options?: DiskEncryptionSetsUpdateOptionalParams + ): Promise; + /** + * Gets information about a disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskEncryptionSetName: string, + options?: DiskEncryptionSetsGetOptionalParams + ): Promise; + /** + * Deletes a disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + diskEncryptionSetName: string, + options?: DiskEncryptionSetsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a disk encryption set. + * @param resourceGroupName The name of the resource group. + * @param diskEncryptionSetName The name of the disk encryption set that is being created. The name + * can't be changed after the disk encryption set is created. Supported characters for the name are + * a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + diskEncryptionSetName: string, + options?: DiskEncryptionSetsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.ts b/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.ts new file mode 100644 index 000000000000..241c7949da8c --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/diskRestorePointOperations.ts @@ -0,0 +1,146 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DiskRestorePoint, + DiskRestorePointOperationsListByRestorePointOptionalParams, + DiskRestorePointOperationsGetOptionalParams, + DiskRestorePointOperationsGetResponse, + GrantAccessData, + DiskRestorePointOperationsGrantAccessOptionalParams, + DiskRestorePointOperationsGrantAccessResponse, + DiskRestorePointOperationsRevokeAccessOptionalParams +} from "../models"; + +/// +/** Interface representing a DiskRestorePointOperations. */ +export interface DiskRestorePointOperations { + /** + * Lists diskRestorePoints under a vmRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + listByRestorePoint( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + options?: DiskRestorePointOperationsListByRestorePointOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get disk restorePoint resource + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + diskRestorePointName: string, + options?: DiskRestorePointOperationsGetOptionalParams + ): Promise; + /** + * Grants access to a diskRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. + */ + beginGrantAccess( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + diskRestorePointName: string, + grantAccessData: GrantAccessData, + options?: DiskRestorePointOperationsGrantAccessOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DiskRestorePointOperationsGrantAccessResponse + > + >; + /** + * Grants access to a diskRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. + */ + beginGrantAccessAndWait( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + diskRestorePointName: string, + grantAccessData: GrantAccessData, + options?: DiskRestorePointOperationsGrantAccessOptionalParams + ): Promise; + /** + * Revokes access to a diskRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + beginRevokeAccess( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + diskRestorePointName: string, + options?: DiskRestorePointOperationsRevokeAccessOptionalParams + ): Promise, void>>; + /** + * Revokes access to a diskRestorePoint. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection that the disk restore + * point belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is + * 80 characters. + * @param vmRestorePointName The name of the vm restore point that the disk disk restore point belongs. + * Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param diskRestorePointName The name of the disk restore point created. Supported characters for the + * name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * @param options The options parameters. + */ + beginRevokeAccessAndWait( + resourceGroupName: string, + restorePointCollectionName: string, + vmRestorePointName: string, + diskRestorePointName: string, + options?: DiskRestorePointOperationsRevokeAccessOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/disks.ts b/sdk/compute/arm-compute/src/operationsInterfaces/disks.ts new file mode 100644 index 000000000000..2f53d8efa42f --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/disks.ts @@ -0,0 +1,214 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Disk, + DisksListByResourceGroupOptionalParams, + DisksListOptionalParams, + DisksCreateOrUpdateOptionalParams, + DisksCreateOrUpdateResponse, + DiskUpdate, + DisksUpdateOptionalParams, + DisksUpdateResponse, + DisksGetOptionalParams, + DisksGetResponse, + DisksDeleteOptionalParams, + GrantAccessData, + DisksGrantAccessOptionalParams, + DisksGrantAccessResponse, + DisksRevokeAccessOptionalParams +} from "../models"; + +/// +/** Interface representing a Disks. */ +export interface Disks { + /** + * Lists all the disks under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: DisksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the disks under a subscription. + * @param options The options parameters. + */ + list(options?: DisksListOptionalParams): PagedAsyncIterableIterator; + /** + * Creates or updates a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Put disk operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + diskName: string, + disk: Disk, + options?: DisksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DisksCreateOrUpdateResponse + > + >; + /** + * Creates or updates a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Put disk operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + diskName: string, + disk: Disk, + options?: DisksCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates (patches) a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Patch disk operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + diskName: string, + disk: DiskUpdate, + options?: DisksUpdateOptionalParams + ): Promise< + PollerLike, DisksUpdateResponse> + >; + /** + * Updates (patches) a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param disk Disk object supplied in the body of the Patch disk operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + diskName: string, + disk: DiskUpdate, + options?: DisksUpdateOptionalParams + ): Promise; + /** + * Gets information about a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + diskName: string, + options?: DisksGetOptionalParams + ): Promise; + /** + * Deletes a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + diskName: string, + options?: DisksDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + diskName: string, + options?: DisksDeleteOptionalParams + ): Promise; + /** + * Grants access to a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. + */ + beginGrantAccess( + resourceGroupName: string, + diskName: string, + grantAccessData: GrantAccessData, + options?: DisksGrantAccessOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DisksGrantAccessResponse + > + >; + /** + * Grants access to a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get disk access operation. + * @param options The options parameters. + */ + beginGrantAccessAndWait( + resourceGroupName: string, + diskName: string, + grantAccessData: GrantAccessData, + options?: DisksGrantAccessOptionalParams + ): Promise; + /** + * Revokes access to a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. + */ + beginRevokeAccess( + resourceGroupName: string, + diskName: string, + options?: DisksRevokeAccessOptionalParams + ): Promise, void>>; + /** + * Revokes access to a disk. + * @param resourceGroupName The name of the resource group. + * @param diskName The name of the managed disk that is being created. The name can't be changed after + * the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + * length is 80 characters. + * @param options The options parameters. + */ + beginRevokeAccessAndWait( + resourceGroupName: string, + diskName: string, + options?: DisksRevokeAccessOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleries.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleries.ts new file mode 100644 index 000000000000..8b7d2cd87902 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleries.ts @@ -0,0 +1,144 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Gallery, + GalleriesListByResourceGroupOptionalParams, + GalleriesListOptionalParams, + GalleriesCreateOrUpdateOptionalParams, + GalleriesCreateOrUpdateResponse, + GalleryUpdate, + GalleriesUpdateOptionalParams, + GalleriesUpdateResponse, + GalleriesGetOptionalParams, + GalleriesGetResponse, + GalleriesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Galleries. */ +export interface Galleries { + /** + * List galleries under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: GalleriesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * List galleries under a subscription. + * @param options The options parameters. + */ + list( + options?: GalleriesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the create or update Shared Image Gallery operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + gallery: Gallery, + options?: GalleriesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleriesCreateOrUpdateResponse + > + >; + /** + * Create or update a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the create or update Shared Image Gallery operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + gallery: Gallery, + options?: GalleriesCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the update Shared Image Gallery operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + gallery: GalleryUpdate, + options?: GalleriesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleriesUpdateResponse + > + >; + /** + * Update a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. The allowed characters are alphabets and + * numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + * @param gallery Parameters supplied to the update Shared Image Gallery operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + gallery: GalleryUpdate, + options?: GalleriesUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + options?: GalleriesGetOptionalParams + ): Promise; + /** + * Delete a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + options?: GalleriesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Shared Image Gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + options?: GalleriesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.ts new file mode 100644 index 000000000000..f934bb13ac22 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplicationVersions.ts @@ -0,0 +1,192 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GalleryApplicationVersion, + GalleryApplicationVersionsListByGalleryApplicationOptionalParams, + GalleryApplicationVersionsCreateOrUpdateOptionalParams, + GalleryApplicationVersionsCreateOrUpdateResponse, + GalleryApplicationVersionUpdate, + GalleryApplicationVersionsUpdateOptionalParams, + GalleryApplicationVersionsUpdateResponse, + GalleryApplicationVersionsGetOptionalParams, + GalleryApplicationVersionsGetResponse, + GalleryApplicationVersionsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a GalleryApplicationVersions. */ +export interface GalleryApplicationVersions { + /** + * List gallery Application Versions in a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the Shared Application Gallery Application Definition from + * which the Application Versions are to be listed. + * @param options The options parameters. + */ + listByGalleryApplication( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + options?: GalleryApplicationVersionsListByGalleryApplicationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version is to be created. + * @param galleryApplicationVersionName The name of the gallery Application Version to be created. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the create or update gallery Application + * Version operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + galleryApplicationVersion: GalleryApplicationVersion, + options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationVersionsCreateOrUpdateResponse + > + >; + /** + * Create or update a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version is to be created. + * @param galleryApplicationVersionName The name of the gallery Application Version to be created. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the create or update gallery Application + * Version operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + galleryApplicationVersion: GalleryApplicationVersion, + options?: GalleryApplicationVersionsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version is to be updated. + * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the update gallery Application Version + * operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + galleryApplicationVersion: GalleryApplicationVersionUpdate, + options?: GalleryApplicationVersionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationVersionsUpdateResponse + > + >; + /** + * Update a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version is to be updated. + * @param galleryApplicationVersionName The name of the gallery Application Version to be updated. + * Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits + * must be within the range of a 32-bit integer. Format: .. + * @param galleryApplicationVersion Parameters supplied to the update gallery Application Version + * operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + galleryApplicationVersion: GalleryApplicationVersionUpdate, + options?: GalleryApplicationVersionsUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version resides. + * @param galleryApplicationVersionName The name of the gallery Application Version to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + options?: GalleryApplicationVersionsGetOptionalParams + ): Promise; + /** + * Delete a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version resides. + * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + options?: GalleryApplicationVersionsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a gallery Application Version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition + * resides. + * @param galleryApplicationName The name of the gallery Application Definition in which the + * Application Version resides. + * @param galleryApplicationVersionName The name of the gallery Application Version to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplicationVersionName: string, + options?: GalleryApplicationVersionsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.ts new file mode 100644 index 000000000000..2e8e89ecacb2 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryApplications.ts @@ -0,0 +1,164 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GalleryApplication, + GalleryApplicationsListByGalleryOptionalParams, + GalleryApplicationsCreateOrUpdateOptionalParams, + GalleryApplicationsCreateOrUpdateResponse, + GalleryApplicationUpdate, + GalleryApplicationsUpdateOptionalParams, + GalleryApplicationsUpdateResponse, + GalleryApplicationsGetOptionalParams, + GalleryApplicationsGetResponse, + GalleryApplicationsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a GalleryApplications. */ +export interface GalleryApplications { + /** + * List gallery Application Definitions in a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery from which Application Definitions are + * to be listed. + * @param options The options parameters. + */ + listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryApplicationsListByGalleryOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be created. + * @param galleryApplicationName The name of the gallery Application Definition to be created or + * updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in + * the middle. The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the create or update gallery Application operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplication: GalleryApplication, + options?: GalleryApplicationsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationsCreateOrUpdateResponse + > + >; + /** + * Create or update a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be created. + * @param galleryApplicationName The name of the gallery Application Definition to be created or + * updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in + * the middle. The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the create or update gallery Application operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplication: GalleryApplication, + options?: GalleryApplicationsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be updated. + * @param galleryApplicationName The name of the gallery Application Definition to be updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the update gallery Application operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplication: GalleryApplicationUpdate, + options?: GalleryApplicationsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryApplicationsUpdateResponse + > + >; + /** + * Update a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be updated. + * @param galleryApplicationName The name of the gallery Application Definition to be updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryApplication Parameters supplied to the update gallery Application operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + galleryApplication: GalleryApplicationUpdate, + options?: GalleryApplicationsUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a gallery Application Definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery from which the Application Definitions + * are to be retrieved. + * @param galleryApplicationName The name of the gallery Application Definition to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + options?: GalleryApplicationsGetOptionalParams + ): Promise; + /** + * Delete a gallery Application. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be deleted. + * @param galleryApplicationName The name of the gallery Application Definition to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + options?: GalleryApplicationsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a gallery Application. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Application Gallery in which the Application Definition is + * to be deleted. + * @param galleryApplicationName The name of the gallery Application Definition to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + galleryApplicationName: string, + options?: GalleryApplicationsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.ts new file mode 100644 index 000000000000..912afc621131 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImageVersions.ts @@ -0,0 +1,179 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GalleryImageVersion, + GalleryImageVersionsListByGalleryImageOptionalParams, + GalleryImageVersionsCreateOrUpdateOptionalParams, + GalleryImageVersionsCreateOrUpdateResponse, + GalleryImageVersionUpdate, + GalleryImageVersionsUpdateOptionalParams, + GalleryImageVersionsUpdateResponse, + GalleryImageVersionsGetOptionalParams, + GalleryImageVersionsGetResponse, + GalleryImageVersionsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a GalleryImageVersions. */ +export interface GalleryImageVersions { + /** + * List gallery image versions in a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the Shared Image Gallery Image Definition from which the Image + * Versions are to be listed. + * @param options The options parameters. + */ + listByGalleryImage( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + options?: GalleryImageVersionsListByGalleryImageOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * created. + * @param galleryImageVersionName The name of the gallery image version to be created. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version + * operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + galleryImageVersion: GalleryImageVersion, + options?: GalleryImageVersionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImageVersionsCreateOrUpdateResponse + > + >; + /** + * Create or update a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * created. + * @param galleryImageVersionName The name of the gallery image version to be created. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the create or update gallery image version + * operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + galleryImageVersion: GalleryImageVersion, + options?: GalleryImageVersionsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * updated. + * @param galleryImageVersionName The name of the gallery image version to be updated. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the update gallery image version operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + galleryImageVersion: GalleryImageVersionUpdate, + options?: GalleryImageVersionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImageVersionsUpdateResponse + > + >; + /** + * Update a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version is to be + * updated. + * @param galleryImageVersionName The name of the gallery image version to be updated. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param galleryImageVersion Parameters supplied to the update gallery image version operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + galleryImageVersion: GalleryImageVersionUpdate, + options?: GalleryImageVersionsUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version resides. + * @param galleryImageVersionName The name of the gallery image version to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + options?: GalleryImageVersionsGetOptionalParams + ): Promise; + /** + * Delete a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version resides. + * @param galleryImageVersionName The name of the gallery image version to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + options?: GalleryImageVersionsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a gallery image version. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition resides. + * @param galleryImageName The name of the gallery image definition in which the Image Version resides. + * @param galleryImageVersionName The name of the gallery image version to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImageVersionName: string, + options?: GalleryImageVersionsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.ts b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.ts new file mode 100644 index 000000000000..9b3f82080478 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/galleryImages.ts @@ -0,0 +1,164 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GalleryImage, + GalleryImagesListByGalleryOptionalParams, + GalleryImagesCreateOrUpdateOptionalParams, + GalleryImagesCreateOrUpdateResponse, + GalleryImageUpdate, + GalleryImagesUpdateOptionalParams, + GalleryImagesUpdateResponse, + GalleryImagesGetOptionalParams, + GalleryImagesGetResponse, + GalleryImagesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a GalleryImages. */ +export interface GalleryImages { + /** + * List gallery image definitions in a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be + * listed. + * @param options The options parameters. + */ + listByGallery( + resourceGroupName: string, + galleryName: string, + options?: GalleryImagesListByGalleryOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * created. + * @param galleryImageName The name of the gallery image definition to be created or updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImage: GalleryImage, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImagesCreateOrUpdateResponse + > + >; + /** + * Create or update a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * created. + * @param galleryImageName The name of the gallery image definition to be created or updated. The + * allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. + * The maximum length is 80 characters. + * @param galleryImage Parameters supplied to the create or update gallery image operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImage: GalleryImage, + options?: GalleryImagesCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * updated. + * @param galleryImageName The name of the gallery image definition to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryImage Parameters supplied to the update gallery image operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImage: GalleryImageUpdate, + options?: GalleryImagesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GalleryImagesUpdateResponse + > + >; + /** + * Update a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * updated. + * @param galleryImageName The name of the gallery image definition to be updated. The allowed + * characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The + * maximum length is 80 characters. + * @param galleryImage Parameters supplied to the update gallery image operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + galleryImage: GalleryImageUpdate, + options?: GalleryImagesUpdateOptionalParams + ): Promise; + /** + * Retrieves information about a gallery image definition. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be + * retrieved. + * @param galleryImageName The name of the gallery image definition to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + options?: GalleryImagesGetOptionalParams + ): Promise; + /** + * Delete a gallery image. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * deleted. + * @param galleryImageName The name of the gallery image definition to be deleted. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a gallery image. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be + * deleted. + * @param galleryImageName The name of the gallery image definition to be deleted. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + galleryName: string, + galleryImageName: string, + options?: GalleryImagesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts b/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts new file mode 100644 index 000000000000..7010d5dab95d --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/gallerySharingProfile.ts @@ -0,0 +1,49 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SharingUpdate, + GallerySharingProfileUpdateOptionalParams, + GallerySharingProfileUpdateResponse +} from "../models"; + +/** Interface representing a GallerySharingProfile. */ +export interface GallerySharingProfile { + /** + * Update sharing profile of a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. + * @param sharingUpdate Parameters supplied to the update gallery sharing profile. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + galleryName: string, + sharingUpdate: SharingUpdate, + options?: GallerySharingProfileUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GallerySharingProfileUpdateResponse + > + >; + /** + * Update sharing profile of a gallery. + * @param resourceGroupName The name of the resource group. + * @param galleryName The name of the Shared Image Gallery. + * @param sharingUpdate Parameters supplied to the update gallery sharing profile. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + galleryName: string, + sharingUpdate: SharingUpdate, + options?: GallerySharingProfileUpdateOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/images.ts b/sdk/compute/arm-compute/src/operationsInterfaces/images.ts new file mode 100644 index 000000000000..f7f8ac8779d6 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/images.ts @@ -0,0 +1,136 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Image, + ImagesListByResourceGroupOptionalParams, + ImagesListOptionalParams, + ImagesCreateOrUpdateOptionalParams, + ImagesCreateOrUpdateResponse, + ImageUpdate, + ImagesUpdateOptionalParams, + ImagesUpdateResponse, + ImagesDeleteOptionalParams, + ImagesGetOptionalParams, + ImagesGetResponse +} from "../models"; + +/// +/** Interface representing a Images. */ +export interface Images { + /** + * Gets the list of images under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ImagesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the list of Images in the subscription. Use nextLink property in the response to get the next + * page of Images. Do this till nextLink is null to fetch all the Images. + * @param options The options parameters. + */ + list(options?: ImagesListOptionalParams): PagedAsyncIterableIterator; + /** + * Create or update an image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Create Image operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + imageName: string, + parameters: Image, + options?: ImagesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ImagesCreateOrUpdateResponse + > + >; + /** + * Create or update an image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Create Image operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + imageName: string, + parameters: Image, + options?: ImagesCreateOrUpdateOptionalParams + ): Promise; + /** + * Update an image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + imageName: string, + parameters: ImageUpdate, + options?: ImagesUpdateOptionalParams + ): Promise< + PollerLike, ImagesUpdateResponse> + >; + /** + * Update an image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param parameters Parameters supplied to the Update Image operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + imageName: string, + parameters: ImageUpdate, + options?: ImagesUpdateOptionalParams + ): Promise; + /** + * Deletes an Image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + imageName: string, + options?: ImagesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an Image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + imageName: string, + options?: ImagesDeleteOptionalParams + ): Promise; + /** + * Gets an image. + * @param resourceGroupName The name of the resource group. + * @param imageName The name of the image. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + imageName: string, + options?: ImagesGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/index.ts b/sdk/compute/arm-compute/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..e53fe188a12e --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/index.ts @@ -0,0 +1,52 @@ +/* + * 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 "./operations"; +export * from "./availabilitySets"; +export * from "./proximityPlacementGroups"; +export * from "./dedicatedHostGroups"; +export * from "./dedicatedHosts"; +export * from "./sshPublicKeys"; +export * from "./virtualMachineExtensionImages"; +export * from "./virtualMachineExtensions"; +export * from "./virtualMachineImages"; +export * from "./virtualMachineImagesEdgeZone"; +export * from "./usageOperations"; +export * from "./virtualMachines"; +export * from "./virtualMachineScaleSets"; +export * from "./virtualMachineSizes"; +export * from "./images"; +export * from "./restorePointCollections"; +export * from "./restorePoints"; +export * from "./virtualMachineScaleSetExtensions"; +export * from "./virtualMachineScaleSetRollingUpgrades"; +export * from "./virtualMachineScaleSetVMExtensions"; +export * from "./virtualMachineScaleSetVMs"; +export * from "./logAnalytics"; +export * from "./virtualMachineRunCommands"; +export * from "./virtualMachineScaleSetVMRunCommands"; +export * from "./resourceSkus"; +export * from "./disks"; +export * from "./snapshots"; +export * from "./diskEncryptionSets"; +export * from "./diskAccesses"; +export * from "./diskRestorePointOperations"; +export * from "./galleries"; +export * from "./galleryImages"; +export * from "./galleryImageVersions"; +export * from "./galleryApplications"; +export * from "./galleryApplicationVersions"; +export * from "./gallerySharingProfile"; +export * from "./sharedGalleries"; +export * from "./sharedGalleryImages"; +export * from "./sharedGalleryImageVersions"; +export * from "./cloudServiceRoleInstances"; +export * from "./cloudServiceRoles"; +export * from "./cloudServices"; +export * from "./cloudServicesUpdateDomain"; +export * from "./cloudServiceOperatingSystems"; diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts b/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts new file mode 100644 index 000000000000..bf6667d7628a --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/logAnalytics.ts @@ -0,0 +1,77 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RequestRateByIntervalInput, + LogAnalyticsExportRequestRateByIntervalOptionalParams, + LogAnalyticsExportRequestRateByIntervalResponse, + ThrottledRequestsInput, + LogAnalyticsExportThrottledRequestsOptionalParams, + LogAnalyticsExportThrottledRequestsResponse +} from "../models"; + +/** Interface representing a LogAnalytics. */ +export interface LogAnalytics { + /** + * Export logs that show Api requests made by this subscription in the given time window to show + * throttling activities. + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @param options The options parameters. + */ + beginExportRequestRateByInterval( + location: string, + parameters: RequestRateByIntervalInput, + options?: LogAnalyticsExportRequestRateByIntervalOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LogAnalyticsExportRequestRateByIntervalResponse + > + >; + /** + * Export logs that show Api requests made by this subscription in the given time window to show + * throttling activities. + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + * @param options The options parameters. + */ + beginExportRequestRateByIntervalAndWait( + location: string, + parameters: RequestRateByIntervalInput, + options?: LogAnalyticsExportRequestRateByIntervalOptionalParams + ): Promise; + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @param options The options parameters. + */ + beginExportThrottledRequests( + location: string, + parameters: ThrottledRequestsInput, + options?: LogAnalyticsExportThrottledRequestsOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LogAnalyticsExportThrottledRequestsResponse + > + >; + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + * @param location The location upon which virtual-machine-sizes is queried. + * @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. + * @param options The options parameters. + */ + beginExportThrottledRequestsAndWait( + location: string, + parameters: ThrottledRequestsInput, + options?: LogAnalyticsExportThrottledRequestsOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/operations.ts b/sdk/compute/arm-compute/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..039e7c9688de --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/operations.ts @@ -0,0 +1,23 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ComputeOperationValue, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Gets a list of compute operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/proximityPlacementGroups.ts b/sdk/compute/arm-compute/src/operationsInterfaces/proximityPlacementGroups.ts new file mode 100644 index 000000000000..006f00a2091d --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/proximityPlacementGroups.ts @@ -0,0 +1,92 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ProximityPlacementGroup, + ProximityPlacementGroupsListBySubscriptionOptionalParams, + ProximityPlacementGroupsListByResourceGroupOptionalParams, + ProximityPlacementGroupsCreateOrUpdateOptionalParams, + ProximityPlacementGroupsCreateOrUpdateResponse, + ProximityPlacementGroupUpdate, + ProximityPlacementGroupsUpdateOptionalParams, + ProximityPlacementGroupsUpdateResponse, + ProximityPlacementGroupsDeleteOptionalParams, + ProximityPlacementGroupsGetOptionalParams, + ProximityPlacementGroupsGetResponse +} from "../models"; + +/// +/** Interface representing a ProximityPlacementGroups. */ +export interface ProximityPlacementGroups { + /** + * Lists all proximity placement groups in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ProximityPlacementGroupsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all proximity placement groups in a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ProximityPlacementGroupsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a proximity placement group. + * @param resourceGroupName The name of the resource group. + * @param proximityPlacementGroupName The name of the proximity placement group. + * @param parameters Parameters supplied to the Create Proximity Placement Group operation. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + proximityPlacementGroupName: string, + parameters: ProximityPlacementGroup, + options?: ProximityPlacementGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a proximity placement group. + * @param resourceGroupName The name of the resource group. + * @param proximityPlacementGroupName The name of the proximity placement group. + * @param parameters Parameters supplied to the Update Proximity Placement Group operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + proximityPlacementGroupName: string, + parameters: ProximityPlacementGroupUpdate, + options?: ProximityPlacementGroupsUpdateOptionalParams + ): Promise; + /** + * Delete a proximity placement group. + * @param resourceGroupName The name of the resource group. + * @param proximityPlacementGroupName The name of the proximity placement group. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + proximityPlacementGroupName: string, + options?: ProximityPlacementGroupsDeleteOptionalParams + ): Promise; + /** + * Retrieves information about a proximity placement group . + * @param resourceGroupName The name of the resource group. + * @param proximityPlacementGroupName The name of the proximity placement group. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + proximityPlacementGroupName: string, + options?: ProximityPlacementGroupsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/resourceSkus.ts b/sdk/compute/arm-compute/src/operationsInterfaces/resourceSkus.ts new file mode 100644 index 000000000000..18d2ea6a002b --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/resourceSkus.ts @@ -0,0 +1,23 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ResourceSku, ResourceSkusListOptionalParams } from "../models"; + +/// +/** Interface representing a ResourceSkus. */ +export interface ResourceSkus { + /** + * Gets the list of Microsoft.Compute SKUs available for your Subscription. + * @param options The options parameters. + */ + list( + options?: ResourceSkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.ts b/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.ts new file mode 100644 index 000000000000..d27863093da6 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/restorePointCollections.ts @@ -0,0 +1,110 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RestorePointCollection, + RestorePointCollectionsListOptionalParams, + RestorePointCollectionsListAllOptionalParams, + RestorePointCollectionsCreateOrUpdateOptionalParams, + RestorePointCollectionsCreateOrUpdateResponse, + RestorePointCollectionUpdate, + RestorePointCollectionsUpdateOptionalParams, + RestorePointCollectionsUpdateResponse, + RestorePointCollectionsDeleteOptionalParams, + RestorePointCollectionsGetOptionalParams, + RestorePointCollectionsGetResponse +} from "../models"; + +/// +/** Interface representing a RestorePointCollections. */ +export interface RestorePointCollections { + /** + * Gets the list of restore point collections in a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: RestorePointCollectionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the list of restore point collections in the subscription. Use nextLink property in the + * response to get the next page of restore point collections. Do this till nextLink is not null to + * fetch all the restore point collections. + * @param options The options parameters. + */ + listAll( + options?: RestorePointCollectionsListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update the restore point collection. Please refer to + * https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags + * may be modified. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection. + * @param parameters Parameters supplied to the Create or Update restore point collection operation. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + restorePointCollectionName: string, + parameters: RestorePointCollection, + options?: RestorePointCollectionsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update the restore point collection. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection. + * @param parameters Parameters supplied to the Update restore point collection operation. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + restorePointCollectionName: string, + parameters: RestorePointCollectionUpdate, + options?: RestorePointCollectionsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the restore point collection. This operation will also delete all the + * contained restore points. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the Restore Point Collection. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + restorePointCollectionName: string, + options?: RestorePointCollectionsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the restore point collection. This operation will also delete all the + * contained restore points. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the Restore Point Collection. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + restorePointCollectionName: string, + options?: RestorePointCollectionsDeleteOptionalParams + ): Promise; + /** + * The operation to get the restore point collection. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + restorePointCollectionName: string, + options?: RestorePointCollectionsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts b/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts new file mode 100644 index 000000000000..5eff03b299ae --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/restorePoints.ts @@ -0,0 +1,97 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RestorePoint, + RestorePointsCreateOptionalParams, + RestorePointsCreateResponse, + RestorePointsDeleteOptionalParams, + RestorePointsGetOptionalParams, + RestorePointsGetResponse +} from "../models"; + +/** Interface representing a RestorePoints. */ +export interface RestorePoints { + /** + * The operation to create the restore point. Updating properties of an existing restore point is not + * allowed + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection. + * @param restorePointName The name of the restore point. + * @param parameters Parameters supplied to the Create restore point operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + restorePointCollectionName: string, + restorePointName: string, + parameters: RestorePoint, + options?: RestorePointsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + RestorePointsCreateResponse + > + >; + /** + * The operation to create the restore point. Updating properties of an existing restore point is not + * allowed + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection. + * @param restorePointName The name of the restore point. + * @param parameters Parameters supplied to the Create restore point operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + restorePointCollectionName: string, + restorePointName: string, + parameters: RestorePoint, + options?: RestorePointsCreateOptionalParams + ): Promise; + /** + * The operation to delete the restore point. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the Restore Point Collection. + * @param restorePointName The name of the restore point. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + restorePointCollectionName: string, + restorePointName: string, + options?: RestorePointsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the restore point. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the Restore Point Collection. + * @param restorePointName The name of the restore point. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + restorePointCollectionName: string, + restorePointName: string, + options?: RestorePointsDeleteOptionalParams + ): Promise; + /** + * The operation to get the restore point. + * @param resourceGroupName The name of the resource group. + * @param restorePointCollectionName The name of the restore point collection. + * @param restorePointName The name of the restore point. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + restorePointCollectionName: string, + restorePointName: string, + options?: RestorePointsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleries.ts b/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleries.ts new file mode 100644 index 000000000000..15cf5429f986 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleries.ts @@ -0,0 +1,41 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SharedGallery, + SharedGalleriesListOptionalParams, + SharedGalleriesGetOptionalParams, + SharedGalleriesGetResponse +} from "../models"; + +/// +/** Interface representing a SharedGalleries. */ +export interface SharedGalleries { + /** + * List shared galleries by subscription id or tenant id. + * @param location Resource location. + * @param options The options parameters. + */ + list( + location: string, + options?: SharedGalleriesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a shared gallery by subscription id or tenant id. + * @param location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param options The options parameters. + */ + get( + location: string, + galleryUniqueName: string, + options?: SharedGalleriesGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleryImageVersions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleryImageVersions.ts new file mode 100644 index 000000000000..8099837144e6 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleryImageVersions.ts @@ -0,0 +1,53 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SharedGalleryImageVersion, + SharedGalleryImageVersionsListOptionalParams, + SharedGalleryImageVersionsGetOptionalParams, + SharedGalleryImageVersionsGetResponse +} from "../models"; + +/// +/** Interface representing a SharedGalleryImageVersions. */ +export interface SharedGalleryImageVersions { + /** + * List shared gallery image versions by subscription id or tenant id. + * @param location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image + * Versions are to be listed. + * @param options The options parameters. + */ + list( + location: string, + galleryUniqueName: string, + galleryImageName: string, + options?: SharedGalleryImageVersionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a shared gallery image version by subscription id or tenant id. + * @param location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image + * Versions are to be listed. + * @param galleryImageVersionName The name of the gallery image version to be created. Needs to follow + * semantic version name pattern: The allowed characters are digit and period. Digits must be within + * the range of a 32-bit integer. Format: .. + * @param options The options parameters. + */ + get( + location: string, + galleryUniqueName: string, + galleryImageName: string, + galleryImageVersionName: string, + options?: SharedGalleryImageVersionsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleryImages.ts b/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleryImages.ts new file mode 100644 index 000000000000..c95aa17d2abb --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/sharedGalleryImages.ts @@ -0,0 +1,46 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SharedGalleryImage, + SharedGalleryImagesListOptionalParams, + SharedGalleryImagesGetOptionalParams, + SharedGalleryImagesGetResponse +} from "../models"; + +/// +/** Interface representing a SharedGalleryImages. */ +export interface SharedGalleryImages { + /** + * List shared gallery images by subscription id or tenant id. + * @param location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param options The options parameters. + */ + list( + location: string, + galleryUniqueName: string, + options?: SharedGalleryImagesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a shared gallery image by subscription id or tenant id. + * @param location Resource location. + * @param galleryUniqueName The unique name of the Shared Gallery. + * @param galleryImageName The name of the Shared Gallery Image Definition from which the Image + * Versions are to be listed. + * @param options The options parameters. + */ + get( + location: string, + galleryUniqueName: string, + galleryImageName: string, + options?: SharedGalleryImagesGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.ts b/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.ts new file mode 100644 index 000000000000..bfe678ec91e1 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/snapshots.ts @@ -0,0 +1,219 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Snapshot, + SnapshotsListByResourceGroupOptionalParams, + SnapshotsListOptionalParams, + SnapshotsCreateOrUpdateOptionalParams, + SnapshotsCreateOrUpdateResponse, + SnapshotUpdate, + SnapshotsUpdateOptionalParams, + SnapshotsUpdateResponse, + SnapshotsGetOptionalParams, + SnapshotsGetResponse, + SnapshotsDeleteOptionalParams, + GrantAccessData, + SnapshotsGrantAccessOptionalParams, + SnapshotsGrantAccessResponse, + SnapshotsRevokeAccessOptionalParams +} from "../models"; + +/// +/** Interface representing a Snapshots. */ +export interface Snapshots { + /** + * Lists snapshots under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: SnapshotsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists snapshots under a subscription. + * @param options The options parameters. + */ + list( + options?: SnapshotsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Put disk operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + snapshotName: string, + snapshot: Snapshot, + options?: SnapshotsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Put disk operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + snapshotName: string, + snapshot: Snapshot, + options?: SnapshotsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates (patches) a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + snapshotName: string, + snapshot: SnapshotUpdate, + options?: SnapshotsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsUpdateResponse + > + >; + /** + * Updates (patches) a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + snapshotName: string, + snapshot: SnapshotUpdate, + options?: SnapshotsUpdateOptionalParams + ): Promise; + /** + * Gets information about a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + snapshotName: string, + options?: SnapshotsGetOptionalParams + ): Promise; + /** + * Deletes a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + snapshotName: string, + options?: SnapshotsDeleteOptionalParams + ): Promise; + /** + * Grants access to a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. + * @param options The options parameters. + */ + beginGrantAccess( + resourceGroupName: string, + snapshotName: string, + grantAccessData: GrantAccessData, + options?: SnapshotsGrantAccessOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SnapshotsGrantAccessResponse + > + >; + /** + * Grants access to a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. + * @param options The options parameters. + */ + beginGrantAccessAndWait( + resourceGroupName: string, + snapshotName: string, + grantAccessData: GrantAccessData, + options?: SnapshotsGrantAccessOptionalParams + ): Promise; + /** + * Revokes access to a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. + */ + beginRevokeAccess( + resourceGroupName: string, + snapshotName: string, + options?: SnapshotsRevokeAccessOptionalParams + ): Promise, void>>; + /** + * Revokes access to a snapshot. + * @param resourceGroupName The name of the resource group. + * @param snapshotName The name of the snapshot that is being created. The name can't be changed after + * the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name + * length is 80 characters. + * @param options The options parameters. + */ + beginRevokeAccessAndWait( + resourceGroupName: string, + snapshotName: string, + options?: SnapshotsRevokeAccessOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/sshPublicKeys.ts b/sdk/compute/arm-compute/src/operationsInterfaces/sshPublicKeys.ts new file mode 100644 index 000000000000..20035c0e9958 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/sshPublicKeys.ts @@ -0,0 +1,109 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SshPublicKeyResource, + SshPublicKeysListBySubscriptionOptionalParams, + SshPublicKeysListByResourceGroupOptionalParams, + SshPublicKeysCreateOptionalParams, + SshPublicKeysCreateResponse, + SshPublicKeyUpdateResource, + SshPublicKeysUpdateOptionalParams, + SshPublicKeysUpdateResponse, + SshPublicKeysDeleteOptionalParams, + SshPublicKeysGetOptionalParams, + SshPublicKeysGetResponse, + SshPublicKeysGenerateKeyPairOptionalParams, + SshPublicKeysGenerateKeyPairResponse +} from "../models"; + +/// +/** Interface representing a SshPublicKeys. */ +export interface SshPublicKeys { + /** + * Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to + * get the next page of SSH public keys. + * @param options The options parameters. + */ + listBySubscription( + options?: SshPublicKeysListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the + * response to get the next page of SSH public keys. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: SshPublicKeysListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a new SSH public key resource. + * @param resourceGroupName The name of the resource group. + * @param sshPublicKeyName The name of the SSH public key. + * @param parameters Parameters supplied to create the SSH public key. + * @param options The options parameters. + */ + create( + resourceGroupName: string, + sshPublicKeyName: string, + parameters: SshPublicKeyResource, + options?: SshPublicKeysCreateOptionalParams + ): Promise; + /** + * Updates a new SSH public key resource. + * @param resourceGroupName The name of the resource group. + * @param sshPublicKeyName The name of the SSH public key. + * @param parameters Parameters supplied to update the SSH public key. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + sshPublicKeyName: string, + parameters: SshPublicKeyUpdateResource, + options?: SshPublicKeysUpdateOptionalParams + ): Promise; + /** + * Delete an SSH public key. + * @param resourceGroupName The name of the resource group. + * @param sshPublicKeyName The name of the SSH public key. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + sshPublicKeyName: string, + options?: SshPublicKeysDeleteOptionalParams + ): Promise; + /** + * Retrieves information about an SSH public key. + * @param resourceGroupName The name of the resource group. + * @param sshPublicKeyName The name of the SSH public key. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sshPublicKeyName: string, + options?: SshPublicKeysGetOptionalParams + ): Promise; + /** + * Generates and returns a public/private key pair and populates the SSH public key resource with the + * public key. The length of the key will be 3072 bits. This operation can only be performed once per + * SSH public key resource. + * @param resourceGroupName The name of the resource group. + * @param sshPublicKeyName The name of the SSH public key. + * @param options The options parameters. + */ + generateKeyPair( + resourceGroupName: string, + sshPublicKeyName: string, + options?: SshPublicKeysGenerateKeyPairOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/usageOperations.ts b/sdk/compute/arm-compute/src/operationsInterfaces/usageOperations.ts new file mode 100644 index 000000000000..b4f4b735d1c2 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/usageOperations.ts @@ -0,0 +1,26 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Usage, UsageOperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a UsageOperations. */ +export interface UsageOperations { + /** + * Gets, for the specified location, the current compute resource usage information as well as the + * limits for compute resources under the subscription. + * @param location The location for which resource usage is queried. + * @param options The options parameters. + */ + list( + location: string, + options?: UsageOperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensionImages.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensionImages.ts new file mode 100644 index 000000000000..9ffcfbb96ad9 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensionImages.ts @@ -0,0 +1,59 @@ +/* + * 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 { + VirtualMachineExtensionImagesGetOptionalParams, + VirtualMachineExtensionImagesGetResponse, + VirtualMachineExtensionImagesListTypesOptionalParams, + VirtualMachineExtensionImagesListTypesResponse, + VirtualMachineExtensionImagesListVersionsOptionalParams, + VirtualMachineExtensionImagesListVersionsResponse +} from "../models"; + +/** Interface representing a VirtualMachineExtensionImages. */ +export interface VirtualMachineExtensionImages { + /** + * Gets a virtual machine extension image. + * @param location The name of a supported Azure region. + * @param publisherName + * @param version + * @param typeParam + * @param options The options parameters. + */ + get( + location: string, + publisherName: string, + version: string, + typeParam: string, + options?: VirtualMachineExtensionImagesGetOptionalParams + ): Promise; + /** + * Gets a list of virtual machine extension image types. + * @param location The name of a supported Azure region. + * @param publisherName + * @param options The options parameters. + */ + listTypes( + location: string, + publisherName: string, + options?: VirtualMachineExtensionImagesListTypesOptionalParams + ): Promise; + /** + * Gets a list of virtual machine extension image versions. + * @param location The name of a supported Azure region. + * @param publisherName + * @param typeParam + * @param options The options parameters. + */ + listVersions( + location: string, + publisherName: string, + typeParam: string, + options?: VirtualMachineExtensionImagesListVersionsOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts new file mode 100644 index 000000000000..7c4f884002ff --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineExtensions.ts @@ -0,0 +1,146 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineExtension, + VirtualMachineExtensionsCreateOrUpdateOptionalParams, + VirtualMachineExtensionsCreateOrUpdateResponse, + VirtualMachineExtensionUpdate, + VirtualMachineExtensionsUpdateOptionalParams, + VirtualMachineExtensionsUpdateResponse, + VirtualMachineExtensionsDeleteOptionalParams, + VirtualMachineExtensionsGetOptionalParams, + VirtualMachineExtensionsGetResponse, + VirtualMachineExtensionsListOptionalParams, + VirtualMachineExtensionsListResponse +} from "../models"; + +/** Interface representing a VirtualMachineExtensions. */ +export interface VirtualMachineExtensions { + /** + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtension, + options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineExtensionsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be created or updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtension, + options?: VirtualMachineExtensionsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtensionUpdate, + options?: VirtualMachineExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineExtensionsUpdateResponse + > + >; + /** + * The operation to update the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be updated. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + extensionParameters: VirtualMachineExtensionUpdate, + options?: VirtualMachineExtensionsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be deleted. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + options?: VirtualMachineExtensionsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the extension should be deleted. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + options?: VirtualMachineExtensionsDeleteOptionalParams + ): Promise; + /** + * The operation to get the extension. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmName: string, + vmExtensionName: string, + options?: VirtualMachineExtensionsGetOptionalParams + ): Promise; + /** + * The operation to get all extensions of a Virtual Machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the extension. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineExtensionsListOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineImages.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineImages.ts new file mode 100644 index 000000000000..3cac600b2dc5 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineImages.ts @@ -0,0 +1,90 @@ +/* + * 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 { + VirtualMachineImagesGetOptionalParams, + VirtualMachineImagesGetResponse, + VirtualMachineImagesListOptionalParams, + VirtualMachineImagesListResponse, + VirtualMachineImagesListOffersOptionalParams, + VirtualMachineImagesListOffersResponse, + VirtualMachineImagesListPublishersOptionalParams, + VirtualMachineImagesListPublishersResponse, + VirtualMachineImagesListSkusOptionalParams, + VirtualMachineImagesListSkusResponse +} from "../models"; + +/** Interface representing a VirtualMachineImages. */ +export interface VirtualMachineImages { + /** + * Gets a virtual machine image. + * @param location The name of a supported Azure region. + * @param publisherName A valid image publisher. + * @param offer A valid image publisher offer. + * @param skus A valid image SKU. + * @param version A valid image SKU version. + * @param options The options parameters. + */ + get( + location: string, + publisherName: string, + offer: string, + skus: string, + version: string, + options?: VirtualMachineImagesGetOptionalParams + ): Promise; + /** + * Gets a list of all virtual machine image versions for the specified location, publisher, offer, and + * SKU. + * @param location The name of a supported Azure region. + * @param publisherName A valid image publisher. + * @param offer A valid image publisher offer. + * @param skus A valid image SKU. + * @param options The options parameters. + */ + list( + location: string, + publisherName: string, + offer: string, + skus: string, + options?: VirtualMachineImagesListOptionalParams + ): Promise; + /** + * Gets a list of virtual machine image offers for the specified location and publisher. + * @param location The name of a supported Azure region. + * @param publisherName A valid image publisher. + * @param options The options parameters. + */ + listOffers( + location: string, + publisherName: string, + options?: VirtualMachineImagesListOffersOptionalParams + ): Promise; + /** + * Gets a list of virtual machine image publishers for the specified Azure location. + * @param location The name of a supported Azure region. + * @param options The options parameters. + */ + listPublishers( + location: string, + options?: VirtualMachineImagesListPublishersOptionalParams + ): Promise; + /** + * Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. + * @param location The name of a supported Azure region. + * @param publisherName A valid image publisher. + * @param offer A valid image publisher offer. + * @param options The options parameters. + */ + listSkus( + location: string, + publisherName: string, + offer: string, + options?: VirtualMachineImagesListSkusOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineImagesEdgeZone.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineImagesEdgeZone.ts new file mode 100644 index 000000000000..a2b851308443 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineImagesEdgeZone.ts @@ -0,0 +1,101 @@ +/* + * 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 { + VirtualMachineImagesEdgeZoneGetOptionalParams, + VirtualMachineImagesEdgeZoneGetResponse, + VirtualMachineImagesEdgeZoneListOptionalParams, + VirtualMachineImagesEdgeZoneListResponse, + VirtualMachineImagesEdgeZoneListOffersOptionalParams, + VirtualMachineImagesEdgeZoneListOffersResponse, + VirtualMachineImagesEdgeZoneListPublishersOptionalParams, + VirtualMachineImagesEdgeZoneListPublishersResponse, + VirtualMachineImagesEdgeZoneListSkusOptionalParams, + VirtualMachineImagesEdgeZoneListSkusResponse +} from "../models"; + +/** Interface representing a VirtualMachineImagesEdgeZone. */ +export interface VirtualMachineImagesEdgeZone { + /** + * Gets a virtual machine image in an edge zone. + * @param location The name of a supported Azure region. + * @param edgeZone The name of the edge zone. + * @param publisherName A valid image publisher. + * @param offer A valid image publisher offer. + * @param skus A valid image SKU. + * @param version A valid image SKU version. + * @param options The options parameters. + */ + get( + location: string, + edgeZone: string, + publisherName: string, + offer: string, + skus: string, + version: string, + options?: VirtualMachineImagesEdgeZoneGetOptionalParams + ): Promise; + /** + * Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, + * offer, and SKU. + * @param location The name of a supported Azure region. + * @param edgeZone The name of the edge zone. + * @param publisherName A valid image publisher. + * @param offer A valid image publisher offer. + * @param skus A valid image SKU. + * @param options The options parameters. + */ + list( + location: string, + edgeZone: string, + publisherName: string, + offer: string, + skus: string, + options?: VirtualMachineImagesEdgeZoneListOptionalParams + ): Promise; + /** + * Gets a list of virtual machine image offers for the specified location, edge zone and publisher. + * @param location The name of a supported Azure region. + * @param edgeZone The name of the edge zone. + * @param publisherName A valid image publisher. + * @param options The options parameters. + */ + listOffers( + location: string, + edgeZone: string, + publisherName: string, + options?: VirtualMachineImagesEdgeZoneListOffersOptionalParams + ): Promise; + /** + * Gets a list of virtual machine image publishers for the specified Azure location and edge zone. + * @param location The name of a supported Azure region. + * @param edgeZone The name of the edge zone. + * @param options The options parameters. + */ + listPublishers( + location: string, + edgeZone: string, + options?: VirtualMachineImagesEdgeZoneListPublishersOptionalParams + ): Promise; + /** + * Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and + * offer. + * @param location The name of a supported Azure region. + * @param edgeZone The name of the edge zone. + * @param publisherName A valid image publisher. + * @param offer A valid image publisher offer. + * @param options The options parameters. + */ + listSkus( + location: string, + edgeZone: string, + publisherName: string, + offer: string, + options?: VirtualMachineImagesEdgeZoneListSkusOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.ts new file mode 100644 index 000000000000..0feae514b67a --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineRunCommands.ts @@ -0,0 +1,172 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RunCommandDocumentBase, + VirtualMachineRunCommandsListOptionalParams, + VirtualMachineRunCommand, + VirtualMachineRunCommandsListByVirtualMachineOptionalParams, + VirtualMachineRunCommandsGetOptionalParams, + VirtualMachineRunCommandsGetResponse, + VirtualMachineRunCommandsCreateOrUpdateOptionalParams, + VirtualMachineRunCommandsCreateOrUpdateResponse, + VirtualMachineRunCommandUpdate, + VirtualMachineRunCommandsUpdateOptionalParams, + VirtualMachineRunCommandsUpdateResponse, + VirtualMachineRunCommandsDeleteOptionalParams, + VirtualMachineRunCommandsGetByVirtualMachineOptionalParams, + VirtualMachineRunCommandsGetByVirtualMachineResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineRunCommands. */ +export interface VirtualMachineRunCommands { + /** + * Lists all available run commands for a subscription in a location. + * @param location The location upon which run commands is queried. + * @param options The options parameters. + */ + list( + location: string, + options?: VirtualMachineRunCommandsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to get all run commands of a Virtual Machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param options The options parameters. + */ + listByVirtualMachine( + resourceGroupName: string, + vmName: string, + options?: VirtualMachineRunCommandsListByVirtualMachineOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets specific run command for a subscription in a location. + * @param location The location upon which run commands is queried. + * @param commandId The command id. + * @param options The options parameters. + */ + get( + location: string, + commandId: string, + options?: VirtualMachineRunCommandsGetOptionalParams + ): Promise; + /** + * The operation to create or update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be created or updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineRunCommandsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be created or updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineRunCommandsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineRunCommandsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineRunCommandsUpdateResponse + > + >; + /** + * The operation to update the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be updated. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmName: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineRunCommandsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be deleted. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmName: string, + runCommandName: string, + options?: VirtualMachineRunCommandsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine where the run command should be deleted. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmName: string, + runCommandName: string, + options?: VirtualMachineRunCommandsDeleteOptionalParams + ): Promise; + /** + * The operation to get the run command. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine containing the run command. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. + */ + getByVirtualMachine( + resourceGroupName: string, + vmName: string, + runCommandName: string, + options?: VirtualMachineRunCommandsGetByVirtualMachineOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.ts new file mode 100644 index 000000000000..2d89de3c12a2 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetExtensions.ts @@ -0,0 +1,150 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionsListOptionalParams, + VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse, + VirtualMachineScaleSetExtensionUpdate, + VirtualMachineScaleSetExtensionsUpdateOptionalParams, + VirtualMachineScaleSetExtensionsUpdateResponse, + VirtualMachineScaleSetExtensionsDeleteOptionalParams, + VirtualMachineScaleSetExtensionsGetOptionalParams, + VirtualMachineScaleSetExtensionsGetResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineScaleSetExtensions. */ +export interface VirtualMachineScaleSetExtensions { + /** + * Gets a list of all extensions in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set containing the extension. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetExtensionsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update an extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param vmssExtensionName The name of the VM scale set extension. + * @param extensionParameters Parameters supplied to the Create VM scale set Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtension, + options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse + >, + VirtualMachineScaleSetExtensionsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update an extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param vmssExtensionName The name of the VM scale set extension. + * @param extensionParameters Parameters supplied to the Create VM scale set Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtension, + options?: VirtualMachineScaleSetExtensionsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update an extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be updated. + * @param vmssExtensionName The name of the VM scale set extension. + * @param extensionParameters Parameters supplied to the Update VM scale set Extension operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtensionUpdate, + options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetExtensionsUpdateResponse + > + >; + /** + * The operation to update an extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be updated. + * @param vmssExtensionName The name of the VM scale set extension. + * @param extensionParameters Parameters supplied to the Update VM scale set Extension operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + extensionParameters: VirtualMachineScaleSetExtensionUpdate, + options?: VirtualMachineScaleSetExtensionsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. + * @param vmssExtensionName The name of the VM scale set extension. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be deleted. + * @param vmssExtensionName The name of the VM scale set extension. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + options?: VirtualMachineScaleSetExtensionsDeleteOptionalParams + ): Promise; + /** + * The operation to get the extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set containing the extension. + * @param vmssExtensionName The name of the VM scale set extension. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmScaleSetName: string, + vmssExtensionName: string, + options?: VirtualMachineScaleSetExtensionsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts new file mode 100644 index 000000000000..a51bb8b45a0c --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetRollingUpgrades.ts @@ -0,0 +1,105 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineScaleSetRollingUpgradesCancelOptionalParams, + VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams, + VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams, + VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams, + VirtualMachineScaleSetRollingUpgradesGetLatestResponse +} from "../models"; + +/** Interface representing a VirtualMachineScaleSetRollingUpgrades. */ +export interface VirtualMachineScaleSetRollingUpgrades { + /** + * Cancels the current virtual machine scale set rolling upgrade. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginCancel( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams + ): Promise, void>>; + /** + * Cancels the current virtual machine scale set rolling upgrade. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginCancelAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesCancelOptionalParams + ): Promise; + /** + * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available + * Platform Image OS version. Instances which are already running the latest available OS version are + * not affected. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginStartOSUpgrade( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams + ): Promise, void>>; + /** + * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available + * Platform Image OS version. Instances which are already running the latest available OS version are + * not affected. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginStartOSUpgradeAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartOSUpgradeOptionalParams + ): Promise; + /** + * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the + * latest available extension version. Instances which are already running the latest extension + * versions are not affected. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginStartExtensionUpgrade( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams + ): Promise, void>>; + /** + * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the + * latest available extension version. Instances which are already running the latest extension + * versions are not affected. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginStartExtensionUpgradeAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeOptionalParams + ): Promise; + /** + * Gets the status of the latest virtual machine scale set rolling upgrade. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + getLatest( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetRollingUpgradesGetLatestOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts new file mode 100644 index 000000000000..d54029f9a997 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMExtensions.ts @@ -0,0 +1,164 @@ +/* + * 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineScaleSetVMExtension, + VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse, + VirtualMachineScaleSetVMExtensionUpdate, + VirtualMachineScaleSetVMExtensionsUpdateOptionalParams, + VirtualMachineScaleSetVMExtensionsUpdateResponse, + VirtualMachineScaleSetVMExtensionsDeleteOptionalParams, + VirtualMachineScaleSetVMExtensionsGetOptionalParams, + VirtualMachineScaleSetVMExtensionsGetResponse, + VirtualMachineScaleSetVMExtensionsListOptionalParams, + VirtualMachineScaleSetVMExtensionsListResponse +} from "../models"; + +/** Interface representing a VirtualMachineScaleSetVMExtensions. */ +export interface VirtualMachineScaleSetVMExtensions { + /** + * The operation to create or update the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtension, + options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse + >, + VirtualMachineScaleSetVMExtensionsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtension, + options?: VirtualMachineScaleSetVMExtensionsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, + options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMExtensionsUpdateResponse + > + >; + /** + * The operation to update the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + extensionParameters: VirtualMachineScaleSetVMExtensionUpdate, + options?: VirtualMachineScaleSetVMExtensionsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + options?: VirtualMachineScaleSetVMExtensionsDeleteOptionalParams + ): Promise; + /** + * The operation to get the VMSS VM extension. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param vmExtensionName The name of the virtual machine extension. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + vmExtensionName: string, + options?: VirtualMachineScaleSetVMExtensionsGetOptionalParams + ): Promise; + /** + * The operation to get all extensions of an instance in Virtual Machine Scaleset. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMExtensionsListOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.ts new file mode 100644 index 000000000000..d55a4ff703c1 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMRunCommands.ts @@ -0,0 +1,166 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineRunCommand, + VirtualMachineScaleSetVMRunCommandsListOptionalParams, + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse, + VirtualMachineRunCommandUpdate, + VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams, + VirtualMachineScaleSetVMRunCommandsUpdateResponse, + VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams, + VirtualMachineScaleSetVMRunCommandsGetOptionalParams, + VirtualMachineScaleSetVMRunCommandsGetResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineScaleSetVMRunCommands. */ +export interface VirtualMachineScaleSetVMRunCommands { + /** + * The operation to get all run commands of an instance in Virtual Machine Scaleset. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMRunCommandsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * The operation to create or update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse + >, + VirtualMachineScaleSetVMRunCommandsCreateOrUpdateResponse + > + >; + /** + * The operation to create or update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Create Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommand, + options?: VirtualMachineScaleSetVMRunCommandsCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMRunCommandsUpdateResponse + > + >; + /** + * The operation to update the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param runCommand Parameters supplied to the Update Virtual Machine RunCommand operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + runCommand: VirtualMachineRunCommandUpdate, + options?: VirtualMachineScaleSetVMRunCommandsUpdateOptionalParams + ): Promise; + /** + * The operation to delete the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + options?: VirtualMachineScaleSetVMRunCommandsDeleteOptionalParams + ): Promise; + /** + * The operation to get the VMSS VM run command. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param runCommandName The name of the virtual machine run command. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + runCommandName: string, + options?: VirtualMachineScaleSetVMRunCommandsGetOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts new file mode 100644 index 000000000000..2bdf60d86598 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSetVMs.ts @@ -0,0 +1,420 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMsListOptionalParams, + VirtualMachineScaleSetVMsReimageOptionalParams, + VirtualMachineScaleSetVMsReimageAllOptionalParams, + VirtualMachineScaleSetVMsDeallocateOptionalParams, + VirtualMachineScaleSetVMsUpdateOptionalParams, + VirtualMachineScaleSetVMsUpdateResponse, + VirtualMachineScaleSetVMsDeleteOptionalParams, + VirtualMachineScaleSetVMsGetOptionalParams, + VirtualMachineScaleSetVMsGetResponse, + VirtualMachineScaleSetVMsGetInstanceViewOptionalParams, + VirtualMachineScaleSetVMsGetInstanceViewResponse, + VirtualMachineScaleSetVMsPowerOffOptionalParams, + VirtualMachineScaleSetVMsRestartOptionalParams, + VirtualMachineScaleSetVMsStartOptionalParams, + VirtualMachineScaleSetVMsRedeployOptionalParams, + VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams, + VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataResponse, + VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams, + VirtualMachineScaleSetVMsSimulateEvictionOptionalParams, + RunCommandInput, + VirtualMachineScaleSetVMsRunCommandOptionalParams, + VirtualMachineScaleSetVMsRunCommandResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachineScaleSetVMs. */ +export interface VirtualMachineScaleSetVMs { + /** + * Gets a list of all virtual machines in a VM scale sets. + * @param resourceGroupName The name of the resource group. + * @param virtualMachineScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + virtualMachineScaleSetName: string, + options?: VirtualMachineScaleSetVMsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginReimage( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageOptionalParams + ): Promise, void>>; + /** + * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginReimageAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageOptionalParams + ): Promise; + /** + * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This + * operation is only supported for managed disks. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginReimageAll( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageAllOptionalParams + ): Promise, void>>; + /** + * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This + * operation is only supported for managed disks. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginReimageAllAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsReimageAllOptionalParams + ): Promise; + /** + * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and + * releases the compute resources it uses. You are not billed for the compute resources of this virtual + * machine once it is deallocated. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginDeallocate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeallocateOptionalParams + ): Promise, void>>; + /** + * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and + * releases the compute resources it uses. You are not billed for the compute resources of this virtual + * machine once it is deallocated. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginDeallocateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeallocateOptionalParams + ): Promise; + /** + * Updates a virtual machine of a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: VirtualMachineScaleSetVM, + options?: VirtualMachineScaleSetVMsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMsUpdateResponse + > + >; + /** + * Updates a virtual machine of a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine Scale Sets VM operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: VirtualMachineScaleSetVM, + options?: VirtualMachineScaleSetVMsUpdateOptionalParams + ): Promise; + /** + * Deletes a virtual machine from a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a virtual machine from a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsDeleteOptionalParams + ): Promise; + /** + * Gets a virtual machine from a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsGetOptionalParams + ): Promise; + /** + * Gets the status of a virtual machine from a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + getInstanceView( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsGetInstanceViewOptionalParams + ): Promise; + /** + * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you + * are getting charged for the resources. Instead, use deallocate to release resources and avoid + * charges. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginPowerOff( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPowerOffOptionalParams + ): Promise, void>>; + /** + * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you + * are getting charged for the resources. Instead, use deallocate to release resources and avoid + * charges. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginPowerOffAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPowerOffOptionalParams + ): Promise; + /** + * Restarts a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRestartOptionalParams + ): Promise, void>>; + /** + * Restarts a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRestartOptionalParams + ): Promise; + /** + * Starts a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsStartOptionalParams + ): Promise, void>>; + /** + * Starts a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsStartOptionalParams + ): Promise; + /** + * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers + * it back on. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginRedeploy( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRedeployOptionalParams + ): Promise, void>>; + /** + * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers + * it back on. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginRedeployAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRedeployOptionalParams + ): Promise; + /** + * The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + retrieveBootDiagnosticsData( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams + ): Promise; + /** + * Performs maintenance on a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginPerformMaintenance( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams + ): Promise, void>>; + /** + * Performs maintenance on a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + beginPerformMaintenanceAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams + ): Promise; + /** + * The operation to simulate the eviction of spot virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param options The options parameters. + */ + simulateEviction( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + options?: VirtualMachineScaleSetVMsSimulateEvictionOptionalParams + ): Promise; + /** + * Run command on a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Run command operation. + * @param options The options parameters. + */ + beginRunCommand( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: RunCommandInput, + options?: VirtualMachineScaleSetVMsRunCommandOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetVMsRunCommandResponse + > + >; + /** + * Run command on a virtual machine in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param instanceId The instance ID of the virtual machine. + * @param parameters Parameters supplied to the Run command operation. + * @param options The options parameters. + */ + beginRunCommandAndWait( + resourceGroupName: string, + vmScaleSetName: string, + instanceId: string, + parameters: RunCommandInput, + options?: VirtualMachineScaleSetVMsRunCommandOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts new file mode 100644 index 000000000000..4a56b0d88cee --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineScaleSets.ts @@ -0,0 +1,514 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachineScaleSet, + VirtualMachineScaleSetsListByLocationOptionalParams, + VirtualMachineScaleSetsListOptionalParams, + VirtualMachineScaleSetsListAllOptionalParams, + VirtualMachineScaleSetSku, + VirtualMachineScaleSetsListSkusOptionalParams, + UpgradeOperationHistoricalStatusInfo, + VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams, + VirtualMachineScaleSetsCreateOrUpdateOptionalParams, + VirtualMachineScaleSetsCreateOrUpdateResponse, + VirtualMachineScaleSetUpdate, + VirtualMachineScaleSetsUpdateOptionalParams, + VirtualMachineScaleSetsUpdateResponse, + VirtualMachineScaleSetsDeleteOptionalParams, + VirtualMachineScaleSetsGetOptionalParams, + VirtualMachineScaleSetsGetResponse, + VirtualMachineScaleSetsDeallocateOptionalParams, + VirtualMachineScaleSetVMInstanceRequiredIDs, + VirtualMachineScaleSetsDeleteInstancesOptionalParams, + VirtualMachineScaleSetsGetInstanceViewOptionalParams, + VirtualMachineScaleSetsGetInstanceViewResponse, + VirtualMachineScaleSetsPowerOffOptionalParams, + VirtualMachineScaleSetsRestartOptionalParams, + VirtualMachineScaleSetsStartOptionalParams, + VirtualMachineScaleSetsRedeployOptionalParams, + VirtualMachineScaleSetsPerformMaintenanceOptionalParams, + VirtualMachineScaleSetsUpdateInstancesOptionalParams, + VirtualMachineScaleSetsReimageOptionalParams, + VirtualMachineScaleSetsReimageAllOptionalParams, + VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams, + VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse, + VMScaleSetConvertToSinglePlacementGroupInput, + VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams, + OrchestrationServiceStateInput, + VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams +} from "../models"; + +/// +/** Interface representing a VirtualMachineScaleSets. */ +export interface VirtualMachineScaleSets { + /** + * Gets all the VM scale sets under the specified subscription for the specified location. + * @param location The location for which VM scale sets under the subscription are queried. + * @param options The options parameters. + */ + listByLocation( + location: string, + options?: VirtualMachineScaleSetsListByLocationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of all VM scale sets under a resource group. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: VirtualMachineScaleSetsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. + * Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink + * is null to fetch all the VM Scale Sets. + * @param options The options parameters. + */ + listAll( + options?: VirtualMachineScaleSetsListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances + * allowed for each SKU. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + listSkus( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsListSkusOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets list of OS upgrades on a VM scale set instance. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + listOSUpgradeHistory( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetOSUpgradeHistoryOptionalParams + ): PagedAsyncIterableIterator; + /** + * Create or update a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set to create or update. + * @param parameters The scale set object. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmScaleSetName: string, + parameters: VirtualMachineScaleSet, + options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetsCreateOrUpdateResponse + > + >; + /** + * Create or update a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set to create or update. + * @param parameters The scale set object. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + parameters: VirtualMachineScaleSet, + options?: VirtualMachineScaleSetsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set to create or update. + * @param parameters The scale set object. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmScaleSetName: string, + parameters: VirtualMachineScaleSetUpdate, + options?: VirtualMachineScaleSetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachineScaleSetsUpdateResponse + > + >; + /** + * Update a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set to create or update. + * @param parameters The scale set object. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + parameters: VirtualMachineScaleSetUpdate, + options?: VirtualMachineScaleSetsUpdateOptionalParams + ): Promise; + /** + * Deletes a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsDeleteOptionalParams + ): Promise; + /** + * Display information about a virtual machine scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetOptionalParams + ): Promise; + /** + * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and + * releases the compute resources. You are not billed for the compute resources that this virtual + * machine scale set deallocates. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginDeallocate( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsDeallocateOptionalParams + ): Promise, void>>; + /** + * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and + * releases the compute resources. You are not billed for the compute resources that this virtual + * machine scale set deallocates. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginDeallocateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsDeallocateOptionalParams + ): Promise; + /** + * Deletes virtual machines in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. + */ + beginDeleteInstances( + resourceGroupName: string, + vmScaleSetName: string, + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams + ): Promise, void>>; + /** + * Deletes virtual machines in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. + */ + beginDeleteInstancesAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsDeleteInstancesOptionalParams + ): Promise; + /** + * Gets the status of a VM scale set instance. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + getInstanceView( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsGetInstanceViewOptionalParams + ): Promise; + /** + * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still + * attached and you are getting charged for the resources. Instead, use deallocate to release resources + * and avoid charges. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginPowerOff( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsPowerOffOptionalParams + ): Promise, void>>; + /** + * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still + * attached and you are getting charged for the resources. Instead, use deallocate to release resources + * and avoid charges. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginPowerOffAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsPowerOffOptionalParams + ): Promise; + /** + * Restarts one or more virtual machines in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsRestartOptionalParams + ): Promise, void>>; + /** + * Restarts one or more virtual machines in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsRestartOptionalParams + ): Promise; + /** + * Starts one or more virtual machines in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsStartOptionalParams + ): Promise, void>>; + /** + * Starts one or more virtual machines in a VM scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsStartOptionalParams + ): Promise; + /** + * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and + * powers them back on. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginRedeploy( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsRedeployOptionalParams + ): Promise, void>>; + /** + * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and + * powers them back on. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginRedeployAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsRedeployOptionalParams + ): Promise; + /** + * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which + * are not eligible for perform maintenance will be failed. Please refer to best practices for more + * details: + * https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginPerformMaintenance( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams + ): Promise, void>>; + /** + * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which + * are not eligible for perform maintenance will be failed. Please refer to best practices for more + * details: + * https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginPerformMaintenanceAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsPerformMaintenanceOptionalParams + ): Promise; + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. + */ + beginUpdateInstances( + resourceGroupName: string, + vmScaleSetName: string, + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams + ): Promise, void>>; + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. + * @param options The options parameters. + */ + beginUpdateInstancesAndWait( + resourceGroupName: string, + vmScaleSetName: string, + vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs, + options?: VirtualMachineScaleSetsUpdateInstancesOptionalParams + ): Promise; + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't + * have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is + * reset to initial state. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginReimage( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReimageOptionalParams + ): Promise, void>>; + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't + * have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is + * reset to initial state. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginReimageAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReimageOptionalParams + ): Promise; + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This + * operation is only supported for managed disks. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginReimageAll( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReimageAllOptionalParams + ): Promise, void>>; + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This + * operation is only supported for managed disks. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param options The options parameters. + */ + beginReimageAllAndWait( + resourceGroupName: string, + vmScaleSetName: string, + options?: VirtualMachineScaleSetsReimageAllOptionalParams + ): Promise; + /** + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine + * scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested + * @param options The options parameters. + */ + forceRecoveryServiceFabricPlatformUpdateDomainWalk( + resourceGroupName: string, + vmScaleSetName: string, + platformUpdateDomain: number, + options?: VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkOptionalParams + ): Promise< + VirtualMachineScaleSetsForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse + >; + /** + * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the virtual machine scale set to create or update. + * @param parameters The input object for ConvertToSinglePlacementGroup API. + * @param options The options parameters. + */ + convertToSinglePlacementGroup( + resourceGroupName: string, + vmScaleSetName: string, + parameters: VMScaleSetConvertToSinglePlacementGroupInput, + options?: VirtualMachineScaleSetsConvertToSinglePlacementGroupOptionalParams + ): Promise; + /** + * Changes ServiceState property for a given service + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the virtual machine scale set to create or update. + * @param parameters The input object for SetOrchestrationServiceState API. + * @param options The options parameters. + */ + beginSetOrchestrationServiceState( + resourceGroupName: string, + vmScaleSetName: string, + parameters: OrchestrationServiceStateInput, + options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams + ): Promise, void>>; + /** + * Changes ServiceState property for a given service + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the virtual machine scale set to create or update. + * @param parameters The input object for SetOrchestrationServiceState API. + * @param options The options parameters. + */ + beginSetOrchestrationServiceStateAndWait( + resourceGroupName: string, + vmScaleSetName: string, + parameters: OrchestrationServiceStateInput, + options?: VirtualMachineScaleSetsSetOrchestrationServiceStateOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineSizes.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineSizes.ts new file mode 100644 index 000000000000..7b0bbe1c2cf2 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachineSizes.ts @@ -0,0 +1,29 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + VirtualMachineSize, + VirtualMachineSizesListOptionalParams +} from "../models"; + +/// +/** Interface representing a VirtualMachineSizes. */ +export interface VirtualMachineSizes { + /** + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) + * @param location The location upon which virtual-machine-sizes is queried. + * @param options The options parameters. + */ + list( + location: string, + options?: VirtualMachineSizesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts new file mode 100644 index 000000000000..2448598f48c4 --- /dev/null +++ b/sdk/compute/arm-compute/src/operationsInterfaces/virtualMachines.ts @@ -0,0 +1,568 @@ +/* + * 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 "@azure/core-paging"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VirtualMachine, + VirtualMachinesListByLocationOptionalParams, + VirtualMachinesListOptionalParams, + VirtualMachinesListAllOptionalParams, + VirtualMachineSize, + VirtualMachinesListAvailableSizesOptionalParams, + VirtualMachineCaptureParameters, + VirtualMachinesCaptureOptionalParams, + VirtualMachinesCaptureResponse, + VirtualMachinesCreateOrUpdateOptionalParams, + VirtualMachinesCreateOrUpdateResponse, + VirtualMachineUpdate, + VirtualMachinesUpdateOptionalParams, + VirtualMachinesUpdateResponse, + VirtualMachinesDeleteOptionalParams, + VirtualMachinesGetOptionalParams, + VirtualMachinesGetResponse, + VirtualMachinesInstanceViewOptionalParams, + VirtualMachinesInstanceViewResponse, + VirtualMachinesConvertToManagedDisksOptionalParams, + VirtualMachinesDeallocateOptionalParams, + VirtualMachinesGeneralizeOptionalParams, + VirtualMachinesPowerOffOptionalParams, + VirtualMachinesReapplyOptionalParams, + VirtualMachinesRestartOptionalParams, + VirtualMachinesStartOptionalParams, + VirtualMachinesRedeployOptionalParams, + VirtualMachinesReimageOptionalParams, + VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams, + VirtualMachinesRetrieveBootDiagnosticsDataResponse, + VirtualMachinesPerformMaintenanceOptionalParams, + VirtualMachinesSimulateEvictionOptionalParams, + VirtualMachinesAssessPatchesOptionalParams, + VirtualMachinesAssessPatchesResponse, + VirtualMachineInstallPatchesParameters, + VirtualMachinesInstallPatchesOptionalParams, + VirtualMachinesInstallPatchesResponse, + RunCommandInput, + VirtualMachinesRunCommandOptionalParams, + VirtualMachinesRunCommandResponse +} from "../models"; + +/// +/** Interface representing a VirtualMachines. */ +export interface VirtualMachines { + /** + * Gets all the virtual machines under the specified subscription for the specified location. + * @param location The location for which virtual machines under the subscription are queried. + * @param options The options parameters. + */ + listByLocation( + location: string, + options?: VirtualMachinesListByLocationOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the + * response to get the next page of virtual machines. + * @param resourceGroupName The name of the resource group. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + options?: VirtualMachinesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the + * response to get the next page of virtual machines. + * @param options The options parameters. + */ + listAll( + options?: VirtualMachinesListAllOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all available virtual machine sizes to which the specified virtual machine can be resized. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + listAvailableSizes( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesListAvailableSizesOptionalParams + ): PagedAsyncIterableIterator; + /** + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to + * create similar VMs. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Capture Virtual Machine operation. + * @param options The options parameters. + */ + beginCapture( + resourceGroupName: string, + vmName: string, + parameters: VirtualMachineCaptureParameters, + options?: VirtualMachinesCaptureOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesCaptureResponse + > + >; + /** + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to + * create similar VMs. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Capture Virtual Machine operation. + * @param options The options parameters. + */ + beginCaptureAndWait( + resourceGroupName: string, + vmName: string, + parameters: VirtualMachineCaptureParameters, + options?: VirtualMachinesCaptureOptionalParams + ): Promise; + /** + * The operation to create or update a virtual machine. Please note some properties can be set only + * during virtual machine creation. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Create Virtual Machine operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + vmName: string, + parameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesCreateOrUpdateResponse + > + >; + /** + * The operation to create or update a virtual machine. Please note some properties can be set only + * during virtual machine creation. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Create Virtual Machine operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + vmName: string, + parameters: VirtualMachine, + options?: VirtualMachinesCreateOrUpdateOptionalParams + ): Promise; + /** + * The operation to update a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + vmName: string, + parameters: VirtualMachineUpdate, + options?: VirtualMachinesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesUpdateResponse + > + >; + /** + * The operation to update a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Update Virtual Machine operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + vmName: string, + parameters: VirtualMachineUpdate, + options?: VirtualMachinesUpdateOptionalParams + ): Promise; + /** + * The operation to delete a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesDeleteOptionalParams + ): Promise, void>>; + /** + * The operation to delete a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesDeleteOptionalParams + ): Promise; + /** + * Retrieves information about the model view or the instance view of a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesGetOptionalParams + ): Promise; + /** + * Retrieves information about the run-time state of a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + instanceView( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesInstanceViewOptionalParams + ): Promise; + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be + * stop-deallocated before invoking this operation. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginConvertToManagedDisks( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesConvertToManagedDisksOptionalParams + ): Promise, void>>; + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be + * stop-deallocated before invoking this operation. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginConvertToManagedDisksAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesConvertToManagedDisksOptionalParams + ): Promise; + /** + * Shuts down the virtual machine and releases the compute resources. You are not billed for the + * compute resources that this virtual machine uses. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginDeallocate( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesDeallocateOptionalParams + ): Promise, void>>; + /** + * Shuts down the virtual machine and releases the compute resources. You are not billed for the + * compute resources that this virtual machine uses. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginDeallocateAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesDeallocateOptionalParams + ): Promise; + /** + * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual + * machine before performing this operation.
    For Windows, please refer to [Create a managed image + * of a generalized VM in + * Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For + * Linux, please refer to [How to create an image of a virtual machine or + * VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + generalize( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesGeneralizeOptionalParams + ): Promise; + /** + * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the + * same provisioned resources. You are still charged for this virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginPowerOff( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesPowerOffOptionalParams + ): Promise, void>>; + /** + * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the + * same provisioned resources. You are still charged for this virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginPowerOffAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesPowerOffOptionalParams + ): Promise; + /** + * The operation to reapply a virtual machine's state. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginReapply( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesReapplyOptionalParams + ): Promise, void>>; + /** + * The operation to reapply a virtual machine's state. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginReapplyAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesReapplyOptionalParams + ): Promise; + /** + * The operation to restart a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesRestartOptionalParams + ): Promise, void>>; + /** + * The operation to restart a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesRestartOptionalParams + ): Promise; + /** + * The operation to start a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesStartOptionalParams + ): Promise, void>>; + /** + * The operation to start a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesStartOptionalParams + ): Promise; + /** + * Shuts down the virtual machine, moves it to a new node, and powers it back on. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginRedeploy( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesRedeployOptionalParams + ): Promise, void>>; + /** + * Shuts down the virtual machine, moves it to a new node, and powers it back on. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginRedeployAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesRedeployOptionalParams + ): Promise; + /** + * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginReimage( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesReimageOptionalParams + ): Promise, void>>; + /** + * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginReimageAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesReimageOptionalParams + ): Promise; + /** + * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + retrieveBootDiagnosticsData( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams + ): Promise; + /** + * The operation to perform maintenance on a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginPerformMaintenance( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesPerformMaintenanceOptionalParams + ): Promise, void>>; + /** + * The operation to perform maintenance on a virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginPerformMaintenanceAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesPerformMaintenanceOptionalParams + ): Promise; + /** + * The operation to simulate the eviction of spot virtual machine. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + simulateEviction( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesSimulateEvictionOptionalParams + ): Promise; + /** + * Assess patches on the VM. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginAssessPatches( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesAssessPatchesOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesAssessPatchesResponse + > + >; + /** + * Assess patches on the VM. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param options The options parameters. + */ + beginAssessPatchesAndWait( + resourceGroupName: string, + vmName: string, + options?: VirtualMachinesAssessPatchesOptionalParams + ): Promise; + /** + * Installs patches on the VM. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. + */ + beginInstallPatches( + resourceGroupName: string, + vmName: string, + installPatchesInput: VirtualMachineInstallPatchesParameters, + options?: VirtualMachinesInstallPatchesOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesInstallPatchesResponse + > + >; + /** + * Installs patches on the VM. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param installPatchesInput Input for InstallPatches as directly received by the API + * @param options The options parameters. + */ + beginInstallPatchesAndWait( + resourceGroupName: string, + vmName: string, + installPatchesInput: VirtualMachineInstallPatchesParameters, + options?: VirtualMachinesInstallPatchesOptionalParams + ): Promise; + /** + * Run command on the VM. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Run command operation. + * @param options The options parameters. + */ + beginRunCommand( + resourceGroupName: string, + vmName: string, + parameters: RunCommandInput, + options?: VirtualMachinesRunCommandOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualMachinesRunCommandResponse + > + >; + /** + * Run command on the VM. + * @param resourceGroupName The name of the resource group. + * @param vmName The name of the virtual machine. + * @param parameters Parameters supplied to the Run command operation. + * @param options The options parameters. + */ + beginRunCommandAndWait( + resourceGroupName: string, + vmName: string, + parameters: RunCommandInput, + options?: VirtualMachinesRunCommandOptionalParams + ): Promise; +} diff --git a/sdk/compute/arm-compute/tsconfig.json b/sdk/compute/arm-compute/tsconfig.json index 422b584abd5e..0ec8659c8e83 100644 --- a/sdk/compute/arm-compute/tsconfig.json +++ b/sdk/compute/arm-compute/tsconfig.json @@ -3,12 +3,13 @@ "module": "es6", "moduleResolution": "node", "strict": true, - "target": "es5", + "target": "es6", "sourceMap": true, "declarationMap": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, + "preserveConstEnums": true, "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", diff --git a/sdk/compute/ci.yml b/sdk/compute/ci.yml new file mode 100644 index 000000000000..c7834ddcfa25 --- /dev/null +++ b/sdk/compute/ci.yml @@ -0,0 +1,28 @@ +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/compute/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/compute/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: compute + Artifacts: + - name: azure-arm-compute + safeName: azurearmcompute + \ No newline at end of file