diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 840cf1ae8c7c..a8ce48a2b23c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -178,6 +178,7 @@ specifiers: '@rush-temp/arm-vmwarecloudsimple': file:./projects/arm-vmwarecloudsimple.tgz '@rush-temp/arm-webpubsub': file:./projects/arm-webpubsub.tgz '@rush-temp/arm-webservices': file:./projects/arm-webservices.tgz + '@rush-temp/arm-workloads': file:./projects/arm-workloads.tgz '@rush-temp/arm-workspaces': file:./projects/arm-workspaces.tgz '@rush-temp/attestation': file:./projects/attestation.tgz '@rush-temp/communication-chat': file:./projects/communication-chat.tgz @@ -458,6 +459,7 @@ dependencies: '@rush-temp/arm-vmwarecloudsimple': file:projects/arm-vmwarecloudsimple.tgz '@rush-temp/arm-webpubsub': file:projects/arm-webpubsub.tgz '@rush-temp/arm-webservices': file:projects/arm-webservices.tgz + '@rush-temp/arm-workloads': file:projects/arm-workloads.tgz '@rush-temp/arm-workspaces': file:projects/arm-workspaces.tgz '@rush-temp/attestation': file:projects/attestation.tgz '@rush-temp/communication-chat': file:projects/communication-chat.tgz @@ -2928,7 +2930,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.4: @@ -3168,7 +3170,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3309,7 +3311,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -9744,7 +9746,7 @@ packages: dev: false file:projects/arm-azurestackhci.tgz: - resolution: {integrity: sha512-aH3mBpP2+zYcZ6p7hsFZOJ8sWQJ6vQKe6bP0c9KTKO1eQ4vk3V1IXqUVkmGKgM6RoJ+cyFzrIGy7f5NB3Z8nLA==, tarball: file:projects/arm-azurestackhci.tgz} + resolution: {integrity: sha512-Vxb9+g7chzP6Xa24rWbnuY0NkBHDuT3qKQY0YknMRxJVWyi7GHUAH24UesIo86XiD2XMmlZn4kAWx7VW6iOevA==, tarball: file:projects/arm-azurestackhci.tgz} name: '@rush-temp/arm-azurestackhci' version: 0.0.0 dependencies: @@ -10232,7 +10234,7 @@ packages: dev: false file:projects/arm-containerregistry.tgz: - resolution: {integrity: sha512-cTCAzAO90LYq2ZJ4JOOppGa8HRwgasLykCdoaQCVZWfMLlOxOBkYtEyY27/LYHjLki+cGgjqBdp9WUdjcqm4NA==, tarball: file:projects/arm-containerregistry.tgz} + resolution: {integrity: sha512-iF8sXHNI1djRZmD4LQh/3lu/I3SDrA8UKBCmpYY5woJl5jMfMuz86EAWk/9utlgEsYCxCS/EnhWhHAgugIi0jQ==, tarball: file:projects/arm-containerregistry.tgz} name: '@rush-temp/arm-containerregistry' version: 0.0.0 dependencies: @@ -14170,6 +14172,33 @@ packages: - supports-color dev: false + file:projects/arm-workloads.tgz: + resolution: {integrity: sha512-Gq5EfExqeuCa2MPYFRPo/uHrqJiIYyRKWGC1trKhWO1yIldHPs5HRcx8YZKsMJs2Jr070dqeoHuRCdNu3l6jnw==, tarball: file:projects/arm-workloads.tgz} + name: '@rush-temp/arm-workloads' + version: 0.0.0 + dependencies: + '@azure/core-lro': 2.2.4 + '@azure/identity': 2.0.4 + '@microsoft/api-extractor': 7.18.11 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.70.2 + '@rollup/plugin-json': 4.1.0_rollup@2.70.2 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.2 + '@rollup/plugin-node-resolve': 13.2.1_rollup@2.70.2 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.70.2 + rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.2 + tslib: 2.4.0 + typescript: 4.2.4 + uglify-js: 3.15.4 + transitivePeerDependencies: + - '@types/node' + - debug + - supports-color + dev: false + file:projects/arm-workspaces.tgz: resolution: {integrity: sha512-kZH9xy+GCEJvZWdGfdjthX+8z2uTRDTyUkNItlhVRk47oc85jHOwvMsjtM2yY9UdLd1I+4zIF6qU/snt3QRCTg==, tarball: file:projects/arm-workspaces.tgz} name: '@rush-temp/arm-workspaces' diff --git a/rush.json b/rush.json index 3d6adbd50128..e11a45f79009 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -1710,6 +1710,11 @@ "packageName": "@azure/arm-education", "projectFolder": "sdk/education/arm-education", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-workloads", + "projectFolder": "sdk/workloads/arm-workloads", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/workloads/arm-workloads/CHANGELOG.md b/sdk/workloads/arm-workloads/CHANGELOG.md new file mode 100644 index 000000000000..645691dfa4f4 --- /dev/null +++ b/sdk/workloads/arm-workloads/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2022-05-26) + +The package of @azure/arm-workloads is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/workloads/arm-workloads/LICENSE b/sdk/workloads/arm-workloads/LICENSE new file mode 100644 index 000000000000..5d1d36e0af80 --- /dev/null +++ b/sdk/workloads/arm-workloads/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/workloads/arm-workloads/README.md b/sdk/workloads/arm-workloads/README.md new file mode 100644 index 000000000000..af8f098c715f --- /dev/null +++ b/sdk/workloads/arm-workloads/README.md @@ -0,0 +1,109 @@ +# Azure Workloads client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Workloads client. + +Workloads client provides access to various workload operations + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloads) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-workloads) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-workloads?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-workloads` package + +Install the Azure Workloads client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-workloads +``` + +### Create and authenticate a `WorkloadsClient` + +To create a client object to access the Azure Workloads API, you will need the `endpoint` of your Azure Workloads resource and a `credential`. The Azure Workloads client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Workloads resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure Workloads** 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`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { WorkloadsClient } = require("@azure/arm-workloads"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new WorkloadsClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new WorkloadsClient(credential, subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### WorkloadsClient + +`WorkloadsClient` is the primary interface for developers using the Azure Workloads client library. Explore the methods on this client object to understand the different features of the Azure Workloads service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fworkloads%2Farm-workloads%2FREADME.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/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/workloads/arm-workloads/_meta.json b/sdk/workloads/arm-workloads/_meta.json new file mode 100644 index 000000000000..0998160bb548 --- /dev/null +++ b/sdk/workloads/arm-workloads/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "ee75a30bd5898b62e511da9fa91a31ef02aba475", + "readme": "specification/workloads/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/workloads/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.1", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" +} \ No newline at end of file diff --git a/sdk/workloads/arm-workloads/api-extractor.json b/sdk/workloads/arm-workloads/api-extractor.json new file mode 100644 index 000000000000..f4ee85b333f2 --- /dev/null +++ b/sdk/workloads/arm-workloads/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-workloads.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/workloads/arm-workloads/package.json b/sdk/workloads/arm-workloads/package.json new file mode 100644 index 000000000000..064ed02cf217 --- /dev/null +++ b/sdk/workloads/arm-workloads/package.json @@ -0,0 +1,112 @@ +{ + "name": "@azure/arm-workloads", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for WorkloadsClient.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=12.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.5.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.8.0", + "tslib": "^2.2.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-workloads.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "7.18.11", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^1.0.4", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloads", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/workloadsClient.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/workloads/arm-workloads/review/arm-workloads.api.md b/sdk/workloads/arm-workloads/review/arm-workloads.api.md new file mode 100644 index 000000000000..bd203cc6b023 --- /dev/null +++ b/sdk/workloads/arm-workloads/review/arm-workloads.api.md @@ -0,0 +1,2245 @@ +## API Report File for "@azure/arm-workloads" + +> 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 ActionType = string; + +// @public +export type ApplicationProvisioningState = string; + +// @public +export interface ApplicationServerConfiguration { + instanceCount: number; + subnetId: string; + virtualMachineConfiguration: VirtualMachineConfiguration; +} + +// @public +export type AzureFrontDoorEnabled = string; + +// @public +export interface BackupProfile { + backupEnabled: EnableBackup; + readonly vaultResourceId?: string; +} + +// @public +export interface CacheProfile { + readonly cacheResourceId?: string; + capacity: number; + family: RedisCacheFamily; + name?: string; + skuName: string; +} + +// @public +export interface CentralServerConfiguration { + instanceCount: number; + subnetId: string; + virtualMachineConfiguration: VirtualMachineConfiguration; +} + +// @public +export type CentralServerVirtualMachineType = string; + +// @public +export interface CentralServerVmDetails { + readonly type?: CentralServerVirtualMachineType; + readonly virtualMachineId?: string; +} + +// @public +export type CreatedByType = string; + +// @public +export interface DatabaseConfiguration { + databaseType?: SAPDatabaseType; + instanceCount: number; + subnetId: string; + virtualMachineConfiguration: VirtualMachineConfiguration; +} + +// @public +export interface DatabaseProfile { + backupRetentionDays?: number; + haEnabled?: HAEnabled; + serverName?: string; + readonly serverResourceId?: string; + sku: string; + sslEnforcementEnabled?: EnableSslEnforcement; + storageInGB?: number; + storageIops?: number; + storageSku?: string; + tier: DatabaseTier; + type: DatabaseType; + version?: string; +} + +// @public +export type DatabaseTier = "Burstable" | "GeneralPurpose" | "MemoryOptimized"; + +// @public +export type DatabaseType = string; + +// @public +export interface DatabaseVmDetails { + readonly status?: SAPVirtualInstanceStatus; + readonly virtualMachineId?: string; +} + +// @public +export type DB2ProviderInstanceProperties = ProviderSpecificProperties & { + providerType: "Db2"; + hostname?: string; + dbName?: string; + dbPort?: string; + dbUsername?: string; + dbPassword?: string; + dbPasswordUri?: string; + sapSid?: string; +}; + +// @public +export interface DeployerVmPackages { + storageAccountId?: string; + url?: string; +} + +// @public +export type DeploymentConfiguration = SAPConfiguration & { + configurationType: "Deployment"; + appLocation?: string; + infrastructureConfiguration?: InfrastructureConfigurationUnion; + softwareConfiguration?: SoftwareConfigurationUnion; +}; + +// @public +export type DeploymentWithOSConfiguration = SAPConfiguration & { + configurationType: "DeploymentWithOSConfig"; + appLocation?: string; + infrastructureConfiguration?: InfrastructureConfigurationUnion; + softwareConfiguration?: SoftwareConfigurationUnion; + osSapConfiguration?: OsSapConfiguration; +}; + +// @public +export type DiscoveryConfiguration = SAPConfiguration & { + configurationType: "Discovery"; + centralServerVmId?: string; + readonly appLocation?: string; +}; + +// @public +export interface DiskInfo { + sizeInGB?: number; + storageType: DiskStorageType; +} + +// @public +export type DiskStorageType = "Premium_LRS" | "Standard_LRS" | "StandardSSD_LRS"; + +// @public +export type EnableBackup = string; + +// @public +export type EnableSslEnforcement = string; + +// @public +export interface EnqueueReplicationServerProperties { + readonly ersVersion?: EnqueueReplicationServerType; + readonly health?: SAPHealthState; + readonly hostname?: string; + readonly instanceNo?: string; + readonly ipAddress?: string; + readonly kernelPatch?: string; + readonly kernelVersion?: string; +} + +// @public +export type EnqueueReplicationServerType = string; + +// @public +export interface EnqueueServerProperties { + readonly health?: SAPHealthState; + readonly hostname?: string; + readonly ipAddress?: string; + readonly port?: number; +} + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDefinition { + readonly code?: string; + readonly details?: ErrorDefinition[]; + readonly message?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorInnerError { + innerError?: ErrorModel; +} + +// @public +export interface ErrorModel { + readonly code?: string; + readonly details?: ErrorModel[]; + readonly innerError?: ErrorInnerError; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface FileshareProfile { + readonly shareName?: string; + shareSizeInGB?: number; + shareType: FileShareType; + readonly storageResourceId?: string; + storageType: FileShareStorageType; +} + +// @public +export type FileShareStorageType = string; + +// @public +export type FileShareType = string; + +// @public +export interface GatewayServerProperties { + readonly health?: SAPHealthState; + readonly port?: number; +} + +// @public +export type HAEnabled = string; + +// @public +export type HanaDbProviderInstanceProperties = ProviderSpecificProperties & { + providerType: "SapHana"; + hostname?: string; + dbName?: string; + sqlPort?: string; + instanceNumber?: string; + dbUsername?: string; + dbPassword?: string; + dbPasswordUri?: string; + dbSslCertificateUri?: string; + sslHostNameInCertificate?: string; +}; + +// @public +export interface HighAvailabilityConfiguration { + highAvailabilityType: SAPHighAvailabilityType; +} + +// @public +export interface HighAvailabilitySoftwareConfiguration { + fencingClientId: string; + fencingClientPassword: string; +} + +// @public +export interface ImageReference { + readonly exactVersion?: string; + offer?: string; + publisher?: string; + sharedGalleryImageId?: string; + sku?: string; + version?: string; +} + +// @public +export interface InfrastructureConfiguration { + appResourceGroup: string; + deploymentType: "SingleServer" | "ThreeTier"; +} + +// @public (undocumented) +export type InfrastructureConfigurationUnion = InfrastructureConfiguration | SingleServerConfiguration | ThreeTierConfiguration; + +// @public +export enum KnownActionType { + // (undocumented) + Internal = "Internal" +} + +// @public +export enum KnownApplicationProvisioningState { + // (undocumented) + Accepted = "Accepted", + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Created = "Created", + // (undocumented) + Failed = "Failed", + // (undocumented) + Installing = "Installing", + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownAzureFrontDoorEnabled { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownCentralServerVirtualMachineType { + // (undocumented) + Ascs = "ASCS", + // (undocumented) + ERS = "ERS", + // (undocumented) + ERSInactive = "ERSInactive", + // (undocumented) + Primary = "Primary", + // (undocumented) + Secondary = "Secondary", + // (undocumented) + Standby = "Standby", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownDatabaseType { + // (undocumented) + MySql = "MySql" +} + +// @public +export enum KnownEnableBackup { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownEnableSslEnforcement { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownEnqueueReplicationServerType { + // (undocumented) + EnqueueReplicator1 = "EnqueueReplicator1", + // (undocumented) + EnqueueReplicator2 = "EnqueueReplicator2" +} + +// @public +export enum KnownFileShareStorageType { + // (undocumented) + PremiumLRS = "Premium_LRS", + // (undocumented) + StandardGRS = "Standard_GRS", + // (undocumented) + StandardLRS = "Standard_LRS", + // (undocumented) + StandardZRS = "Standard_ZRS" +} + +// @public +export enum KnownFileShareType { + // (undocumented) + AzureFiles = "AzureFiles", + // (undocumented) + NfsOnController = "NfsOnController" +} + +// @public +export enum KnownHAEnabled { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownLoadBalancerType { + // (undocumented) + ApplicationGateway = "ApplicationGateway", + // (undocumented) + LoadBalancer = "LoadBalancer" +} + +// @public +export enum KnownLocationType { + // (undocumented) + EdgeZone = "EdgeZone", + // (undocumented) + Region = "Region" +} + +// @public +export enum KnownManagedServiceIdentityType { + // (undocumented) + None = "None", + // (undocumented) + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownOperationProperties { + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + System = "System", + // (undocumented) + User = "User" +} + +// @public +export enum KnownOrigin { + // (undocumented) + System = "system", + // (undocumented) + User = "user", + // (undocumented) + UserSystem = "user,system" +} + +// @public +export enum KnownOSImageOffer { + // (undocumented) + UbuntuServer = "UbuntuServer" +} + +// @public +export enum KnownOSImagePublisher { + // (undocumented) + Canonical = "Canonical" +} + +// @public +export enum KnownOSImageSku { + // (undocumented) + Eighteen04LTS = "18.04-LTS", + // (undocumented) + Sixteen04LTS = "16.04-LTS" +} + +// @public +export enum KnownOSImageVersion { + // (undocumented) + Latest = "latest" +} + +// @public +export enum KnownOSType { + // (undocumented) + Linux = "Linux", + // (undocumented) + Windows = "Windows" +} + +// @public +export enum KnownPHPVersion { + // (undocumented) + Seven2 = "7.2", + // (undocumented) + Seven3 = "7.3", + // (undocumented) + Seven4 = "7.4" +} + +// @public +export enum KnownPhpWorkloadProvisioningState { + // (undocumented) + Accepted = "Accepted", + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Created = "Created", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + Provisioning = "Provisioning", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownRedisCacheFamily { + // (undocumented) + C = "C", + // (undocumented) + P = "P" +} + +// @public +export enum KnownRoutingPreference { + // (undocumented) + Default = "Default", + // (undocumented) + RouteAll = "RouteAll" +} + +// @public +export enum KnownSAPConfigurationType { + // (undocumented) + Deployment = "Deployment", + // (undocumented) + DeploymentWithOSConfig = "DeploymentWithOSConfig", + // (undocumented) + Discovery = "Discovery" +} + +// @public +export enum KnownSAPDatabaseScaleMethod { + // (undocumented) + ScaleUp = "ScaleUp" +} + +// @public +export enum KnownSAPDatabaseType { + // (undocumented) + DB2 = "DB2", + // (undocumented) + Hana = "HANA" +} + +// @public +export enum KnownSAPDeploymentType { + // (undocumented) + SingleServer = "SingleServer", + // (undocumented) + ThreeTier = "ThreeTier" +} + +// @public +export enum KnownSAPEnvironmentType { + // (undocumented) + NonProd = "NonProd", + // (undocumented) + Prod = "Prod" +} + +// @public +export enum KnownSAPHealthState { + // (undocumented) + Degraded = "Degraded", + // (undocumented) + Healthy = "Healthy", + // (undocumented) + Unhealthy = "Unhealthy", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownSAPHighAvailabilityType { + // (undocumented) + AvailabilitySet = "AvailabilitySet", + // (undocumented) + AvailabilityZone = "AvailabilityZone" +} + +// @public +export enum KnownSAPProductType { + // (undocumented) + ECC = "ECC", + // (undocumented) + Other = "Other", + // (undocumented) + S4Hana = "S4HANA" +} + +// @public +export enum KnownSAPSoftwareInstallationType { + // (undocumented) + SAPInstallWithoutOSConfig = "SAPInstallWithoutOSConfig", + // (undocumented) + ServiceInitiated = "ServiceInitiated" +} + +// @public +export enum KnownSapVirtualInstanceProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownSAPVirtualInstanceState { + // (undocumented) + DiscoveryFailed = "DiscoveryFailed", + // (undocumented) + DiscoveryInProgress = "DiscoveryInProgress", + // (undocumented) + DiscoveryPending = "DiscoveryPending", + // (undocumented) + InfrastructureDeploymentFailed = "InfrastructureDeploymentFailed", + // (undocumented) + InfrastructureDeploymentInProgress = "InfrastructureDeploymentInProgress", + // (undocumented) + InfrastructureDeploymentPending = "InfrastructureDeploymentPending", + // (undocumented) + RegistrationComplete = "RegistrationComplete", + // (undocumented) + SoftwareInstallationFailed = "SoftwareInstallationFailed", + // (undocumented) + SoftwareInstallationInProgress = "SoftwareInstallationInProgress", + // (undocumented) + SoftwareInstallationPending = "SoftwareInstallationPending" +} + +// @public +export enum KnownSAPVirtualInstanceStatus { + // (undocumented) + Offline = "Offline", + // (undocumented) + PartiallyRunning = "PartiallyRunning", + // (undocumented) + Running = "Running", + // (undocumented) + Starting = "Starting", + // (undocumented) + Stopping = "Stopping", + // (undocumented) + Unavailable = "Unavailable" +} + +// @public +export enum KnownSearchType { + // (undocumented) + Elastic = "Elastic" +} + +// @public +export enum KnownSkuRestrictionReasonCode { + // (undocumented) + NotAvailableForSubscription = "NotAvailableForSubscription", + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + QuotaId = "QuotaId" +} + +// @public +export enum KnownSkuRestrictionType { + // (undocumented) + Location = "Location", + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + Zone = "Zone" +} + +// @public +export enum KnownSkuScaleType { + // (undocumented) + Automatic = "Automatic", + // (undocumented) + Manual = "Manual", + // (undocumented) + None = "None" +} + +// @public +export enum KnownWordpressVersions { + // (undocumented) + Five4 = "5.4", + // (undocumented) + Five41 = "5.4.1", + // (undocumented) + Five42 = "5.4.2", + // (undocumented) + Five43 = "5.4.3" +} + +// @public +export enum KnownWorkloadKind { + // (undocumented) + WordPress = "WordPress" +} + +// @public +export enum KnownWorkloadMonitorActionType { + // (undocumented) + Internal = "Internal", + // (undocumented) + NotSpecified = "NotSpecified" +} + +// @public +export enum KnownWorkloadMonitorProvisioningState { + // (undocumented) + Accepted = "Accepted", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Migrating = "Migrating", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + +// @public +export type LinuxConfiguration = OSConfiguration & { + osType: "Linux"; + disablePasswordAuthentication?: boolean; + ssh?: SshConfiguration; + sshKeyPair?: SshKeyPair; +}; + +// @public +export type LoadBalancerType = string; + +// @public +export type LocationType = string; + +// @public +export interface ManagedRGConfiguration { + name?: string; +} + +// @public +export type ManagedServiceIdentityType = string; + +// @public +export interface MessageServerProperties { + readonly health?: SAPHealthState; + readonly hostname?: string; + readonly httpPort?: number; + readonly httpsPort?: number; + readonly internalMsPort?: number; + readonly ipAddress?: string; + readonly msPort?: number; +} + +// @public +export type Monitor = TrackedResource & { + readonly provisioningState?: WorkloadMonitorProvisioningState; + readonly errors?: MonitorPropertiesErrors; + appLocation?: string; + routingPreference?: RoutingPreference; + managedResourceGroupConfiguration?: ManagedRGConfiguration; + logAnalyticsWorkspaceArmId?: string; + monitorSubnet?: string; + readonly msiArmId?: string; +}; + +// @public +export interface MonitorListResult { + nextLink?: string; + value?: Monitor[]; +} + +// @public +export type MonitorPropertiesErrors = ErrorModel & {}; + +// @public +export interface Monitors { + beginCreate(resourceGroupName: string, monitorName: string, monitorParameter: Monitor, options?: MonitorsCreateOptionalParams): Promise, MonitorsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, monitorName: string, monitorParameter: Monitor, options?: MonitorsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, monitorName: string, options?: MonitorsDeleteOptionalParams): Promise, MonitorsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, monitorName: string, options?: MonitorsDeleteOptionalParams): Promise; + get(resourceGroupName: string, monitorName: string, options?: MonitorsGetOptionalParams): Promise; + list(options?: MonitorsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: MonitorsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, monitorName: string, tagsParameter: Tags, options?: MonitorsUpdateOptionalParams): Promise; +} + +// @public +export interface MonitorsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MonitorsCreateResponse = Monitor; + +// @public +export interface MonitorsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MonitorsDeleteResponse = OperationStatusResult; + +// @public +export interface MonitorsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitorsGetResponse = Monitor; + +// @public +export interface MonitorsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitorsListByResourceGroupNextResponse = MonitorListResult; + +// @public +export interface MonitorsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitorsListByResourceGroupResponse = MonitorListResult; + +// @public +export interface MonitorsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitorsListNextResponse = MonitorListResult; + +// @public +export interface MonitorsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitorsListResponse = MonitorListResult; + +// @public +export interface MonitorsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitorsUpdateResponse = Monitor; + +// @public +export type MsSqlServerProviderInstanceProperties = ProviderSpecificProperties & { + providerType: "MsSqlServer"; + hostname?: string; + dbPort?: string; + dbUsername?: string; + dbPassword?: string; + dbPasswordUri?: string; + sapSid?: string; +}; + +// @public +export interface NetworkConfiguration { + isSecondaryIpEnabled?: boolean; +} + +// @public +export interface NetworkProfile { + azureFrontDoorEnabled?: AzureFrontDoorEnabled; + readonly azureFrontDoorResourceId?: string; + capacity?: number; + readonly frontEndPublicIpResourceId?: string; + readonly loadBalancerResourceId?: string; + loadBalancerSku?: string; + loadBalancerTier?: string; + loadBalancerType: LoadBalancerType; + readonly outboundPublicIpResourceIds?: string[]; + readonly vNetResourceId?: string; +} + +// @public +export interface NodeProfile { + dataDisks?: DiskInfo[]; + name?: string; + readonly nodeResourceIds?: string[]; + nodeSku: string; + osDisk: DiskInfo; + osImage: OsImageProfile; +} + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export type OperationProperties = string; + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type OperationsContent = Resource & { + namePropertiesName?: string; + isDataAction?: boolean; + origin?: OperationProperties; + display?: OperationsDefinitionDisplay; + actionType?: WorkloadMonitorActionType; + properties?: any; +}; + +// @public +export interface OperationsDefinition { + actionType?: WorkloadMonitorActionType; + display: OperationsDefinitionDisplay; + isDataAction?: boolean; + name: string; + origin?: OperationProperties; + properties?: any; +} + +// @public +export interface OperationsDefinitionArrayResponseWithContinuation { + nextLink?: string; + value?: OperationsDefinition[]; +} + +// @public +export type OperationsDefinitionDisplay = OperationsDisplayDefinition & {}; + +// @public +export interface OperationsDisplayDefinition { + description: string; + operation: string; + provider: string; + resource: string; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export interface OperationStatusResult { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: OperationStatusResult[]; + percentComplete?: number; + startTime?: Date; + status: string; +} + +// @public +export type Origin = string; + +// @public +export interface OSConfiguration { + osType: "Windows" | "Linux"; +} + +// @public (undocumented) +export type OSConfigurationUnion = OSConfiguration | WindowsConfiguration | LinuxConfiguration; + +// @public +export type OSImageOffer = string; + +// @public +export interface OsImageProfile { + offer?: OSImageOffer; + publisher?: OSImagePublisher; + sku?: OSImageSku; + version?: OSImageVersion; +} + +// @public +export type OSImagePublisher = string; + +// @public +export type OSImageSku = string; + +// @public +export type OSImageVersion = string; + +// @public +export interface OSProfile { + adminPassword?: string; + adminUsername?: string; + osConfiguration?: OSConfigurationUnion; +} + +// @public +export interface OsSapConfiguration { + deployerVmPackages?: DeployerVmPackages; + sapFqdn?: string; +} + +// @public +export type OSType = string; + +// @public +export interface PatchResourceRequestBody { + // (undocumented) + identity?: PatchResourceRequestBodyIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public (undocumented) +export type PatchResourceRequestBodyIdentity = UserAssignedServiceIdentity & {}; + +// @public +export interface PhpProfile { + version: PHPVersion; +} + +// @public +export type PHPVersion = string; + +// @public +export type PhpWorkloadProvisioningState = string; + +// @public +export type PhpWorkloadResource = TrackedResource & { + kind: WorkloadKind; + sku?: Sku; + identity?: PhpWorkloadResourceIdentity; + appLocation?: string; + managedResourceGroupConfiguration?: ManagedRGConfiguration; + adminUserProfile?: UserProfile; + webNodesProfile?: VmssNodesProfile; + controllerProfile?: NodeProfile; + networkProfile?: NetworkProfile; + databaseProfile?: DatabaseProfile; + siteProfile?: SiteProfile; + fileshareProfile?: FileshareProfile; + phpProfile?: PhpProfile; + searchProfile?: SearchProfile; + cacheProfile?: CacheProfile; + backupProfile?: BackupProfile; + readonly provisioningState?: PhpWorkloadProvisioningState; +}; + +// @public +export type PhpWorkloadResourceIdentity = UserAssignedServiceIdentity & {}; + +// @public +export interface PhpWorkloadResourceList { + nextLink?: string; + value?: PhpWorkloadResource[]; +} + +// @public +export interface PhpWorkloads { + beginCreateOrUpdate(resourceGroupName: string, phpWorkloadName: string, phpWorkloadResource: PhpWorkloadResource, options?: PhpWorkloadsCreateOrUpdateOptionalParams): Promise, PhpWorkloadsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, phpWorkloadName: string, phpWorkloadResource: PhpWorkloadResource, options?: PhpWorkloadsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, phpWorkloadName: string, options?: PhpWorkloadsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, phpWorkloadName: string, options?: PhpWorkloadsDeleteOptionalParams): Promise; + get(resourceGroupName: string, phpWorkloadName: string, options?: PhpWorkloadsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: PhpWorkloadsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: PhpWorkloadsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, phpWorkloadName: string, resourcePatchRequestBody: PatchResourceRequestBody, options?: PhpWorkloadsUpdateOptionalParams): Promise; +} + +// @public +export interface PhpWorkloadsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PhpWorkloadsCreateOrUpdateResponse = PhpWorkloadResource; + +// @public +export interface PhpWorkloadsDeleteOptionalParams extends coreClient.OperationOptions { + deleteInfra?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PhpWorkloadsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PhpWorkloadsGetResponse = PhpWorkloadResource; + +// @public +export interface PhpWorkloadsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PhpWorkloadsListByResourceGroupNextResponse = PhpWorkloadResourceList; + +// @public +export interface PhpWorkloadsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PhpWorkloadsListByResourceGroupResponse = PhpWorkloadResourceList; + +// @public +export interface PhpWorkloadsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PhpWorkloadsListBySubscriptionNextResponse = PhpWorkloadResourceList; + +// @public +export interface PhpWorkloadsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PhpWorkloadsListBySubscriptionResponse = PhpWorkloadResourceList; + +// @public +export interface PhpWorkloadsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PhpWorkloadsUpdateResponse = PhpWorkloadResource; + +// @public +export type PrometheusHaClusterProviderInstanceProperties = ProviderSpecificProperties & { + providerType: "PrometheusHaCluster"; + prometheusUrl?: string; + hostname?: string; + sid?: string; + clusterName?: string; +}; + +// @public +export type PrometheusOSProviderInstanceProperties = ProviderSpecificProperties & { + providerType: "PrometheusOS"; + prometheusUrl?: string; +}; + +// @public +export type ProviderInstance = ProxyResource & { + readonly provisioningState?: WorkloadMonitorProvisioningState; + readonly errors?: ProviderInstancePropertiesErrors; + providerSettings?: ProviderSpecificPropertiesUnion; +}; + +// @public +export interface ProviderInstanceListResult { + nextLink?: string; + value?: ProviderInstance[]; +} + +// @public +export type ProviderInstancePropertiesErrors = ErrorModel & {}; + +// @public +export interface ProviderInstances { + beginCreate(resourceGroupName: string, monitorName: string, providerInstanceName: string, providerInstanceParameter: ProviderInstance, options?: ProviderInstancesCreateOptionalParams): Promise, ProviderInstancesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, monitorName: string, providerInstanceName: string, providerInstanceParameter: ProviderInstance, options?: ProviderInstancesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, monitorName: string, providerInstanceName: string, options?: ProviderInstancesDeleteOptionalParams): Promise, ProviderInstancesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, monitorName: string, providerInstanceName: string, options?: ProviderInstancesDeleteOptionalParams): Promise; + get(resourceGroupName: string, monitorName: string, providerInstanceName: string, options?: ProviderInstancesGetOptionalParams): Promise; + list(resourceGroupName: string, monitorName: string, options?: ProviderInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ProviderInstancesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProviderInstancesCreateResponse = ProviderInstance; + +// @public +export interface ProviderInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ProviderInstancesDeleteResponse = OperationStatusResult; + +// @public +export interface ProviderInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProviderInstancesGetResponse = ProviderInstance; + +// @public +export interface ProviderInstancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProviderInstancesListNextResponse = ProviderInstanceListResult; + +// @public +export interface ProviderInstancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProviderInstancesListResponse = ProviderInstanceListResult; + +// @public +export interface ProviderSpecificProperties { + providerType: "SapHana" | "SapNetWeaver" | "PrometheusOS" | "Db2" | "PrometheusHaCluster" | "MsSqlServer"; +} + +// @public (undocumented) +export type ProviderSpecificPropertiesUnion = ProviderSpecificProperties | HanaDbProviderInstanceProperties | SapNetWeaverProviderInstanceProperties | PrometheusOSProviderInstanceProperties | DB2ProviderInstanceProperties | PrometheusHaClusterProviderInstanceProperties | MsSqlServerProviderInstanceProperties; + +// @public +export type ProxyResource = Resource & {}; + +// @public +export type RedisCacheFamily = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface RestrictionInfo { + locations?: string[]; + zones?: string[]; +} + +// @public +export type RoutingPreference = string; + +// @public +export type SAPApplicationServerInstance = TrackedResource & { + readonly instanceNo?: string; + readonly subnet?: string; + readonly hostname?: string; + readonly kernelVersion?: string; + readonly kernelPatch?: string; + readonly ipAddress?: string; + readonly gatewayPort?: number; + readonly icmHttpPort?: number; + readonly icmHttpsPort?: number; + readonly virtualMachineId?: string; + readonly status?: SAPVirtualInstanceStatus; + readonly health?: SAPHealthState; + readonly provisioningState?: SapVirtualInstanceProvisioningState; + readonly errors?: SAPVirtualInstanceError; +}; + +// @public +export interface SAPApplicationServerInstanceList { + nextLink?: string; + value?: SAPApplicationServerInstance[]; +} + +// @public +export interface SAPApplicationServerInstances { + beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesCreateOptionalParams): Promise, SAPApplicationServerInstancesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesDeleteOptionalParams): Promise, SAPApplicationServerInstancesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesUpdateOptionalParams): Promise, SAPApplicationServerInstancesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesUpdateOptionalParams): Promise; + get(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesGetOptionalParams): Promise; + list(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPApplicationServerInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SAPApplicationServerInstancesCreateOptionalParams extends coreClient.OperationOptions { + body?: SAPApplicationServerInstance; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPApplicationServerInstancesCreateResponse = SAPApplicationServerInstance; + +// @public +export interface SAPApplicationServerInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPApplicationServerInstancesDeleteResponse = OperationStatusResult; + +// @public +export interface SAPApplicationServerInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPApplicationServerInstancesGetResponse = SAPApplicationServerInstance; + +// @public +export interface SAPApplicationServerInstancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPApplicationServerInstancesListNextResponse = SAPApplicationServerInstanceList; + +// @public +export interface SAPApplicationServerInstancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPApplicationServerInstancesListResponse = SAPApplicationServerInstanceList; + +// @public +export interface SAPApplicationServerInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: UpdateSAPApplicationInstanceRequest; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPApplicationServerInstancesUpdateResponse = SAPApplicationServerInstance; + +// @public +export interface SAPAvailabilityZoneDetailsOptionalParams extends coreClient.OperationOptions { + sAPAvailabilityZoneDetails?: SAPAvailabilityZoneDetailsRequest; +} + +// @public +export interface SAPAvailabilityZoneDetailsRequest { + appLocation: string; + databaseType: SAPDatabaseType; + sapProduct: SAPProductType; +} + +// @public +export type SAPAvailabilityZoneDetailsResponse = SAPAvailabilityZoneDetailsResult; + +// @public +export interface SAPAvailabilityZoneDetailsResult { + availabilityZonePairs?: SAPAvailabilityZonePair[]; +} + +// @public +export interface SAPAvailabilityZonePair { + zoneA?: number; + zoneB?: number; +} + +// @public +export interface SAPCentralInstanceList { + nextLink?: string; + value?: SAPCentralServerInstance[]; +} + +// @public +export interface SAPCentralInstances { + beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesCreateOptionalParams): Promise, SAPCentralInstancesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesDeleteOptionalParams): Promise, SAPCentralInstancesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesUpdateOptionalParams): Promise, SAPCentralInstancesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesUpdateOptionalParams): Promise; + get(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesGetOptionalParams): Promise; + list(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPCentralInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SAPCentralInstancesCreateOptionalParams extends coreClient.OperationOptions { + body?: SAPCentralServerInstance; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPCentralInstancesCreateResponse = SAPCentralServerInstance; + +// @public +export interface SAPCentralInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPCentralInstancesDeleteResponse = OperationStatusResult; + +// @public +export interface SAPCentralInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPCentralInstancesGetResponse = SAPCentralServerInstance; + +// @public +export interface SAPCentralInstancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPCentralInstancesListNextResponse = SAPCentralInstanceList; + +// @public +export interface SAPCentralInstancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPCentralInstancesListResponse = SAPCentralInstanceList; + +// @public +export interface SAPCentralInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: UpdateSAPCentralInstanceRequest; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPCentralInstancesUpdateResponse = SAPCentralServerInstance; + +// @public +export type SAPCentralServerInstance = TrackedResource & { + readonly instanceNo?: string; + readonly subnet?: string; + messageServerProperties?: MessageServerProperties; + enqueueServerProperties?: EnqueueServerProperties; + gatewayServerProperties?: GatewayServerProperties; + enqueueReplicationServerProperties?: EnqueueReplicationServerProperties; + readonly kernelVersion?: string; + readonly kernelPatch?: string; + readonly vmDetails?: CentralServerVmDetails[]; + readonly status?: SAPVirtualInstanceStatus; + readonly health?: SAPHealthState; + readonly provisioningState?: SapVirtualInstanceProvisioningState; + readonly errors?: SAPVirtualInstanceError; +}; + +// @public +export interface SAPConfiguration { + configurationType: "Discovery" | "Deployment" | "DeploymentWithOSConfig"; +} + +// @public +export type SAPConfigurationType = string; + +// @public (undocumented) +export type SAPConfigurationUnion = SAPConfiguration | DiscoveryConfiguration | DeploymentConfiguration | DeploymentWithOSConfiguration; + +// @public +export type SAPDatabaseInstance = TrackedResource & { + readonly subnet?: string; + readonly databaseSid?: string; + readonly databaseType?: string; + readonly ipAddress?: string; + readonly vmDetails?: DatabaseVmDetails[]; + readonly status?: SAPVirtualInstanceStatus; + readonly provisioningState?: SapVirtualInstanceProvisioningState; + readonly errors?: SAPVirtualInstanceError; +}; + +// @public +export interface SAPDatabaseInstanceList { + nextLink?: string; + value?: SAPDatabaseInstance[]; +} + +// @public +export interface SAPDatabaseInstances { + beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesCreateOptionalParams): Promise, SAPDatabaseInstancesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesDeleteOptionalParams): Promise, SAPDatabaseInstancesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesUpdateOptionalParams): Promise, SAPDatabaseInstancesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesUpdateOptionalParams): Promise; + get(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesGetOptionalParams): Promise; + list(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPDatabaseInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SAPDatabaseInstancesCreateOptionalParams extends coreClient.OperationOptions { + body?: SAPDatabaseInstance; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPDatabaseInstancesCreateResponse = SAPDatabaseInstance; + +// @public +export interface SAPDatabaseInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPDatabaseInstancesDeleteResponse = OperationStatusResult; + +// @public +export interface SAPDatabaseInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPDatabaseInstancesGetResponse = SAPDatabaseInstance; + +// @public +export interface SAPDatabaseInstancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPDatabaseInstancesListNextResponse = SAPDatabaseInstanceList; + +// @public +export interface SAPDatabaseInstancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPDatabaseInstancesListResponse = SAPDatabaseInstanceList; + +// @public +export interface SAPDatabaseInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: UpdateSAPDatabaseInstanceRequest; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPDatabaseInstancesUpdateResponse = SAPDatabaseInstance; + +// @public +export type SAPDatabaseScaleMethod = string; + +// @public +export type SAPDatabaseType = string; + +// @public +export type SAPDeploymentType = string; + +// @public +export interface SAPDiskConfiguration { + diskCount?: number; + diskIopsReadWrite?: number; + diskMBpsReadWrite?: number; + diskSizeGB?: number; + diskStorageType?: string; + diskType?: string; + volume?: string; +} + +// @public +export interface SAPDiskConfigurationsOptionalParams extends coreClient.OperationOptions { + sAPDiskConfigurations?: SAPDiskConfigurationsRequest; +} + +// @public +export interface SAPDiskConfigurationsRequest { + appLocation: string; + databaseType: SAPDatabaseType; + dbVmSku: string; + deploymentType: SAPDeploymentType; + environment: SAPEnvironmentType; + sapProduct: SAPProductType; +} + +// @public +export type SAPDiskConfigurationsResponse = SAPDiskConfigurationsResult; + +// @public +export interface SAPDiskConfigurationsResult { + diskConfigurations?: SAPDiskConfiguration[]; +} + +// @public +export type SAPEnvironmentType = string; + +// @public +export type SAPHealthState = string; + +// @public +export type SAPHighAvailabilityType = string; + +// @public +export type SAPInstallWithoutOSConfigSoftwareConfiguration = SoftwareConfiguration & { + softwareInstallationType: "SAPInstallWithoutOSConfig"; + bomUrl: string; + sapBitsStorageAccountId: string; + softwareVersion: string; + highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; +}; + +// @public +export type SapNetWeaverProviderInstanceProperties = ProviderSpecificProperties & { + providerType: "SapNetWeaver"; + sapSid?: string; + sapHostname?: string; + sapInstanceNr?: string; + sapHostFileEntries?: string[]; + sapUsername?: string; + sapPassword?: string; + sapPasswordUri?: string; + sapClientId?: string; + sapPortNumber?: string; + sapSslCertificateUri?: string; +}; + +// @public +export type SAPProductType = string; + +// @public +export interface SAPSizingRecommendationRequest { + appLocation: string; + databaseType: SAPDatabaseType; + dbMemory: number; + dbScaleMethod?: SAPDatabaseScaleMethod; + deploymentType: SAPDeploymentType; + environment: SAPEnvironmentType; + highAvailabilityType?: SAPHighAvailabilityType; + sapProduct: SAPProductType; + saps: number; +} + +// @public +export interface SAPSizingRecommendationResult { + deploymentType: "SingleServer" | "ThreeTier"; +} + +// @public (undocumented) +export type SAPSizingRecommendationResultUnion = SAPSizingRecommendationResult | SingleServerRecommendationResult | ThreeTierRecommendationResult; + +// @public +export interface SAPSizingRecommendationsOptionalParams extends coreClient.OperationOptions { + sAPSizingRecommendation?: SAPSizingRecommendationRequest; +} + +// @public +export type SAPSizingRecommendationsResponse = SAPSizingRecommendationResultUnion; + +// @public +export type SAPSoftwareInstallationType = string; + +// @public +export interface SAPSupportedResourceSkusResult { + supportedSkus?: SAPSupportedSku[]; +} + +// @public +export interface SAPSupportedSku { + isAppServerCertified?: boolean; + isDatabaseCertified?: boolean; + vmSku?: string; +} + +// @public +export interface SAPSupportedSkuOptionalParams extends coreClient.OperationOptions { + sAPSupportedSku?: SAPSupportedSkusRequest; +} + +// @public +export type SAPSupportedSkuResponse = SAPSupportedResourceSkusResult; + +// @public +export interface SAPSupportedSkusRequest { + appLocation: string; + databaseType: SAPDatabaseType; + deploymentType: SAPDeploymentType; + environment: SAPEnvironmentType; + highAvailabilityType?: SAPHighAvailabilityType; + sapProduct: SAPProductType; +} + +// @public +export type SAPVirtualInstance = TrackedResource & { + identity?: UserAssignedServiceIdentity; + environment: SAPEnvironmentType; + sapProduct: SAPProductType; + configuration: SAPConfigurationUnion; + managedResourceGroupConfiguration?: ManagedRGConfiguration; + readonly status?: SAPVirtualInstanceStatus; + readonly health?: SAPHealthState; + readonly state?: SAPVirtualInstanceState; + readonly provisioningState?: SapVirtualInstanceProvisioningState; + readonly errors?: SAPVirtualInstanceError; +}; + +// @public +export interface SAPVirtualInstanceError { + properties?: ErrorDefinition; +} + +// @public +export interface SAPVirtualInstanceList { + nextLink?: string; + value?: SAPVirtualInstance[]; +} + +// @public +export type SapVirtualInstanceProvisioningState = string; + +// @public +export interface SAPVirtualInstances { + beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesCreateOptionalParams): Promise, SAPVirtualInstancesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesDeleteOptionalParams): Promise, SAPVirtualInstancesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesDeleteOptionalParams): Promise; + beginStart(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStartOptionalParams): Promise, SAPVirtualInstancesStartResponse>>; + beginStartAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStartOptionalParams): Promise; + beginStop(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStopOptionalParams): Promise, SAPVirtualInstancesStopResponse>>; + beginStopAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStopOptionalParams): Promise; + get(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: SAPVirtualInstancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: SAPVirtualInstancesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesUpdateOptionalParams): Promise; +} + +// @public +export interface SAPVirtualInstancesCreateOptionalParams extends coreClient.OperationOptions { + body?: SAPVirtualInstance; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPVirtualInstancesCreateResponse = SAPVirtualInstance; + +// @public +export interface SAPVirtualInstancesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPVirtualInstancesDeleteResponse = OperationStatusResult; + +// @public +export interface SAPVirtualInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPVirtualInstancesGetResponse = SAPVirtualInstance; + +// @public +export interface SAPVirtualInstancesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPVirtualInstancesListByResourceGroupNextResponse = SAPVirtualInstanceList; + +// @public +export interface SAPVirtualInstancesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPVirtualInstancesListByResourceGroupResponse = SAPVirtualInstanceList; + +// @public +export interface SAPVirtualInstancesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPVirtualInstancesListBySubscriptionNextResponse = SAPVirtualInstanceList; + +// @public +export interface SAPVirtualInstancesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SAPVirtualInstancesListBySubscriptionResponse = SAPVirtualInstanceList; + +// @public +export interface SAPVirtualInstancesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPVirtualInstancesStartResponse = OperationStatusResult; + +// @public +export interface SAPVirtualInstancesStopOptionalParams extends coreClient.OperationOptions { + body?: StopRequest; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SAPVirtualInstancesStopResponse = OperationStatusResult; + +// @public +export type SAPVirtualInstanceState = string; + +// @public +export type SAPVirtualInstanceStatus = string; + +// @public +export interface SAPVirtualInstancesUpdateOptionalParams extends coreClient.OperationOptions { + body?: UpdateSAPVirtualInstanceRequest; +} + +// @public +export type SAPVirtualInstancesUpdateResponse = SAPVirtualInstance; + +// @public +export type SearchProfile = NodeProfile & { + searchType: SearchType; +}; + +// @public +export type SearchType = string; + +// @public +export type ServiceInitiatedSoftwareConfiguration = SoftwareConfiguration & { + softwareInstallationType: "ServiceInitiated"; + bomUrl: string; + softwareVersion: string; + sapBitsStorageAccountId: string; + sapFqdn: string; + sshPrivateKey: string; + highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; +}; + +// @public +export type SingleServerConfiguration = InfrastructureConfiguration & { + deploymentType: "SingleServer"; + networkConfiguration?: NetworkConfiguration; + databaseType?: SAPDatabaseType; + subnetId: string; + virtualMachineConfiguration: VirtualMachineConfiguration; +}; + +// @public +export type SingleServerRecommendationResult = SAPSizingRecommendationResult & { + deploymentType: "SingleServer"; + vmSku?: string; +}; + +// @public +export interface SiteProfile { + domainName?: string; +} + +// @public +export interface Sku { + capacity?: number; + family?: string; + name: string; + size?: string; + tier?: SkuTier; +} + +// @public +export interface SkuCapability { + name?: string; + value?: string; +} + +// @public +export interface SkuCapacity { + default?: number; + maximum?: number; + minimum?: number; + scaleType?: SkuScaleType; +} + +// @public +export interface SkuCost { + extendedUnit?: string; + meterId?: string; + quantity?: number; +} + +// @public +export interface SkuDefinition { + capabilities?: SkuCapability[]; + capacity?: Record; + costs?: SkuCost[]; + family?: string; + kind?: string; + locationInfo?: SkuLocationAndZones[]; + locations?: string[]; + name: string; + resourceType?: string; + restrictions?: SkuRestriction[]; + size?: string; + tier?: string; +} + +// @public +export interface SkuLocationAndZones { + extendedLocations?: string[]; + location?: string; + type?: LocationType; + zoneDetails?: SkuZoneDetail[]; + zones?: string[]; +} + +// @public +export interface SkuRestriction { + reasonCode?: SkuRestrictionReasonCode; + restrictionInfo?: Record; + type?: SkuRestrictionType; + values?: string[]; +} + +// @public +export type SkuRestrictionReasonCode = string; + +// @public +export type SkuRestrictionType = string; + +// @public +export interface Skus { + list(options?: SkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type SkuScaleType = string; + +// @public +export interface SkusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SkusListNextResponse = SkusListResult; + +// @public +export interface SkusListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SkusListResponse = SkusListResult; + +// @public +export interface SkusListResult { + readonly nextLink?: string; + readonly value?: SkuDefinition[]; +} + +// @public +export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; + +// @public +export interface SkuZoneDetail { + capabilities?: SkuCapability[]; + zones?: string[]; +} + +// @public +export interface SoftwareConfiguration { + softwareInstallationType: "ServiceInitiated" | "SAPInstallWithoutOSConfig"; +} + +// @public (undocumented) +export type SoftwareConfigurationUnion = SoftwareConfiguration | ServiceInitiatedSoftwareConfiguration | SAPInstallWithoutOSConfigSoftwareConfiguration; + +// @public +export interface SshConfiguration { + publicKeys?: SshPublicKey[]; +} + +// @public +export interface SshKeyPair { + privateKey?: string; + publicKey?: string; +} + +// @public +export interface SshPublicKey { + keyData?: string; +} + +// @public +export interface StopRequest { + hardStop?: boolean; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface Tags { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type ThreeTierConfiguration = InfrastructureConfiguration & { + deploymentType: "ThreeTier"; + networkConfiguration?: NetworkConfiguration; + centralServer: CentralServerConfiguration; + applicationServer: ApplicationServerConfiguration; + databaseServer: DatabaseConfiguration; + highAvailabilityConfig?: HighAvailabilityConfiguration; +}; + +// @public +export type ThreeTierRecommendationResult = SAPSizingRecommendationResult & { + deploymentType: "ThreeTier"; + dbVmSku?: string; + databaseInstanceCount?: number; + centralServerVmSku?: string; + centralServerInstanceCount?: number; + applicationServerVmSku?: string; + applicationServerInstanceCount?: number; +}; + +// @public +export type TrackedResource = Resource & { + tags?: { + [propertyName: string]: string; + }; + location: string; +}; + +// @public +export interface UpdateSAPApplicationInstanceRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UpdateSAPCentralInstanceRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UpdateSAPDatabaseInstanceRequest { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UpdateSAPVirtualInstanceRequest { + identity?: UserAssignedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface UserAssignedServiceIdentity { + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export interface UserProfile { + sshPublicKey: string; + userName: string; +} + +// @public +export interface VirtualMachineConfiguration { + imageReference: ImageReference; + osProfile: OSProfile; + vmSize: string; +} + +// @public +export type VmssNodesProfile = NodeProfile & { + autoScaleMinCount?: number; + autoScaleMaxCount?: number; +}; + +// @public +export type WindowsConfiguration = OSConfiguration & { + osType: "Windows"; +}; + +// @public +export type WordpressInstanceResource = ProxyResource & { + version?: WordpressVersions; + databaseName?: string; + databaseUser?: string; + readonly siteUrl?: string; + readonly provisioningState?: ApplicationProvisioningState; +}; + +// @public +export interface WordpressInstanceResourceList { + nextLink?: string; + value?: WordpressInstanceResource[]; +} + +// @public +export interface WordpressInstances { + beginCreateOrUpdate(resourceGroupName: string, phpWorkloadName: string, wordpressInstanceResource: WordpressInstanceResource, options?: WordpressInstancesCreateOrUpdateOptionalParams): Promise, WordpressInstancesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, phpWorkloadName: string, wordpressInstanceResource: WordpressInstanceResource, options?: WordpressInstancesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, phpWorkloadName: string, options?: WordpressInstancesDeleteOptionalParams): Promise; + get(resourceGroupName: string, phpWorkloadName: string, options?: WordpressInstancesGetOptionalParams): Promise; + list(resourceGroupName: string, phpWorkloadName: string, options?: WordpressInstancesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface WordpressInstancesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type WordpressInstancesCreateOrUpdateResponse = WordpressInstanceResource; + +// @public +export interface WordpressInstancesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface WordpressInstancesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WordpressInstancesGetResponse = WordpressInstanceResource; + +// @public +export interface WordpressInstancesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WordpressInstancesListNextResponse = WordpressInstanceResourceList; + +// @public +export interface WordpressInstancesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WordpressInstancesListResponse = WordpressInstanceResourceList; + +// @public +export type WordpressVersions = string; + +// @public +export type WorkloadKind = string; + +// @public +export type WorkloadMonitorActionType = string; + +// @public +export type WorkloadMonitorProvisioningState = string; + +// @public (undocumented) +export class WorkloadsClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: WorkloadsClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + monitors: Monitors; + // (undocumented) + operations: Operations; + // (undocumented) + phpWorkloads: PhpWorkloads; + // (undocumented) + providerInstances: ProviderInstances; + // (undocumented) + sAPApplicationServerInstances: SAPApplicationServerInstances; + sAPAvailabilityZoneDetails(location: string, options?: SAPAvailabilityZoneDetailsOptionalParams): Promise; + // (undocumented) + sAPCentralInstances: SAPCentralInstances; + // (undocumented) + sAPDatabaseInstances: SAPDatabaseInstances; + sAPDiskConfigurations(location: string, options?: SAPDiskConfigurationsOptionalParams): Promise; + sAPSizingRecommendations(location: string, options?: SAPSizingRecommendationsOptionalParams): Promise; + sAPSupportedSku(location: string, options?: SAPSupportedSkuOptionalParams): Promise; + // (undocumented) + sAPVirtualInstances: SAPVirtualInstances; + // (undocumented) + skus: Skus; + // (undocumented) + subscriptionId: string; + // (undocumented) + wordpressInstances: WordpressInstances; +} + +// @public +export interface WorkloadsClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/workloads/arm-workloads/rollup.config.js b/sdk/workloads/arm-workloads/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/workloads/arm-workloads/rollup.config.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +// #region Warning Handler + +/** + * A function that can determine whether a rollup warning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEval(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependency(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; + +/** + * 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(), + 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 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()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/workloads/arm-workloads/src/index.ts b/sdk/workloads/arm-workloads/src/index.ts new file mode 100644 index 000000000000..c373f7fec407 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { WorkloadsClient } from "./workloadsClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/workloads/arm-workloads/src/lroImpl.ts b/sdk/workloads/arm-workloads/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/workloads/arm-workloads/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * 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 { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/workloads/arm-workloads/src/models/index.ts b/sdk/workloads/arm-workloads/src/models/index.ts new file mode 100644 index 000000000000..9f069cd8debb --- /dev/null +++ b/sdk/workloads/arm-workloads/src/models/index.ts @@ -0,0 +1,3211 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export type SAPSizingRecommendationResultUnion = + | SAPSizingRecommendationResult + | SingleServerRecommendationResult + | ThreeTierRecommendationResult; +export type SAPConfigurationUnion = + | SAPConfiguration + | DiscoveryConfiguration + | DeploymentConfiguration + | DeploymentWithOSConfiguration; +export type ProviderSpecificPropertiesUnion = + | ProviderSpecificProperties + | HanaDbProviderInstanceProperties + | SapNetWeaverProviderInstanceProperties + | PrometheusOSProviderInstanceProperties + | DB2ProviderInstanceProperties + | PrometheusHaClusterProviderInstanceProperties + | MsSqlServerProviderInstanceProperties; +export type OSConfigurationUnion = + | OSConfiguration + | WindowsConfiguration + | LinuxConfiguration; +export type InfrastructureConfigurationUnion = + | InfrastructureConfiguration + | SingleServerConfiguration + | ThreeTierConfiguration; +export type SoftwareConfigurationUnion = + | SoftwareConfiguration + | ServiceInitiatedSoftwareConfiguration + | SAPInstallWithoutOSConfigSoftwareConfiguration; + +/** Php workload resource list */ +export interface PhpWorkloadResourceList { + /** List of resources in current page */ + value?: PhpWorkloadResource[]; + /** Link to next page of resources */ + nextLink?: string; +} + +/** Managed resource group configuration */ +export interface ManagedRGConfiguration { + /** Managed resource group name */ + name?: string; +} + +/** User profile to configure on a compute resources such as VM, VMSS */ +export interface UserProfile { + /** User name */ + userName: string; + /** SSH public key data */ + sshPublicKey: string; +} + +/** VM or VMSS node profile */ +export interface NodeProfile { + /** VM or VMSS name */ + name?: string; + /** VM SKU for node(s) */ + nodeSku: string; + /** OS image used for creating the nodes */ + osImage: OsImageProfile; + /** OS disk details */ + osDisk: DiskInfo; + /** Data disks details. This property is not in use right now */ + dataDisks?: DiskInfo[]; + /** + * VM/VMSS resource ARM Ids + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nodeResourceIds?: string[]; +} + +/** OS image profile */ +export interface OsImageProfile { + /** OS image publisher */ + publisher?: OSImagePublisher; + /** OS image offer */ + offer?: OSImageOffer; + /** OS image sku */ + sku?: OSImageSku; + /** OS image version */ + version?: OSImageVersion; +} + +/** Disk resource creation details */ +export interface DiskInfo { + /** Storage type */ + storageType: DiskStorageType; + /** Disk size in GB */ + sizeInGB?: number; +} + +/** Network profile */ +export interface NetworkProfile { + /** Load balancer type */ + loadBalancerType: LoadBalancerType; + /** Load balancer SKU */ + loadBalancerSku?: string; + /** Load balancer tier */ + loadBalancerTier?: string; + /** Capacity, applicable only for Application Gateway */ + capacity?: number; + /** Whether to enable Azure front door */ + azureFrontDoorEnabled?: AzureFrontDoorEnabled; + /** + * Virtual network resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vNetResourceId?: string; + /** + * Azure Loadbalancer or ApplicationGateway resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly loadBalancerResourceId?: string; + /** + * Azure front door resource id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly azureFrontDoorResourceId?: string; + /** + * Loadbalancer front-end IP address resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly frontEndPublicIpResourceId?: string; + /** + * List of outbound public IP resource IDs + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundPublicIpResourceIds?: string[]; +} + +/** Workload database profile */ +export interface DatabaseProfile { + /** Database type */ + type: DatabaseType; + /** Database server name */ + serverName?: string; + /** Database version */ + version?: string; + /** The name of the server SKU, e.g. Standard_D32s_v4 */ + sku: string; + /** Tier of the server SKU */ + tier: DatabaseTier; + /** Whether to enable HA for the server */ + haEnabled?: HAEnabled; + /** SKU name for database storage */ + storageSku?: string; + /** Database storage size in GB */ + storageInGB?: number; + /** Storage IOPS for the server */ + storageIops?: number; + /** Backup retention days for the server */ + backupRetentionDays?: number; + /** Whether to enable SSL enforcement on the database */ + sslEnforcementEnabled?: EnableSslEnforcement; + /** + * Azure Database Server resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverResourceId?: string; +} + +/** Workload website profile */ +export interface SiteProfile { + /** Domain name for the application site URL */ + domainName?: string; +} + +/** File share profile */ +export interface FileshareProfile { + /** Share type */ + shareType: FileShareType; + /** File share backing storage type */ + storageType: FileShareStorageType; + /** File share size in GB */ + shareSizeInGB?: number; + /** + * File share storage resource id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageResourceId?: string; + /** + * File share name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly shareName?: string; +} + +/** PHP profile */ +export interface PhpProfile { + /** PHP version */ + version: PHPVersion; +} + +/** Cache profile */ +export interface CacheProfile { + /** Cache name */ + name?: string; + /** Cache SKU name */ + skuName: string; + /** Cache family */ + family: RedisCacheFamily; + /** Cache capacity */ + capacity: number; + /** + * Cache resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cacheResourceId?: string; +} + +/** Backup profile */ +export interface BackupProfile { + /** Whether to enable Azure backup for the workload */ + backupEnabled: EnableBackup; + /** + * Backup vault resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vaultResourceId?: string; +} + +/** The resource model definition representing SKU */ +export interface Sku { + /** The name of the SKU. Ex - P3. It is typically a letter+number code */ + name: string; + /** This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. */ + tier?: SkuTier; + /** The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. */ + size?: string; + /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ + family?: string; + /** If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. */ + capacity?: number; +} + +/** Managed service identity (user assigned identities) */ +export interface UserAssignedServiceIdentity { + /** Type of manage identity */ + type: ManagedServiceIdentityType; + /** User assigned identities dictionary */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Resource patch request body */ +export interface PatchResourceRequestBody { + /** Resource tags */ + tags?: { [propertyName: string]: string }; + identity?: PatchResourceRequestBodyIdentity; +} + +/** WordPress instance resource list */ +export interface WordpressInstanceResourceList { + /** List of resources in current page */ + value?: WordpressInstanceResource[]; + /** Link to next page of resources */ + nextLink?: string; +} + +/** The SAP Sizing Recommendation request. */ +export interface SAPSizingRecommendationRequest { + /** The geo-location where the resource is to be created. */ + appLocation: string; + /** Defines the environment type - Production/Non Production. */ + environment: SAPEnvironmentType; + /** Defines the SAP Product type. */ + sapProduct: SAPProductType; + /** The deployment type. Eg: SingleServer/ThreeTier */ + deploymentType: SAPDeploymentType; + /** The SAP Application Performance Standard measurement. */ + saps: number; + /** The database memory configuration. */ + dbMemory: number; + /** The database type. */ + databaseType: SAPDatabaseType; + /** The DB scale method. */ + dbScaleMethod?: SAPDatabaseScaleMethod; + /** The high availability type. */ + highAvailabilityType?: SAPHighAvailabilityType; +} + +/** The SAP sizing recommendation result. */ +export interface SAPSizingRecommendationResult { + /** Polymorphic discriminator, which specifies the different types this object can be */ + deploymentType: "SingleServer" | "ThreeTier"; +} + +/** The SAP request to get list of supported SKUs. */ +export interface SAPSupportedSkusRequest { + /** The geo-location where the resource is to be created. */ + appLocation: string; + /** Defines the environment type - Production/Non Production. */ + environment: SAPEnvironmentType; + /** Defines the SAP Product type. */ + sapProduct: SAPProductType; + /** The deployment type. Eg: SingleServer/ThreeTier */ + deploymentType: SAPDeploymentType; + /** The database type. Eg: HANA, DB2, etc */ + databaseType: SAPDatabaseType; + /** The high availability type. */ + highAvailabilityType?: SAPHighAvailabilityType; +} + +/** The list of supported SKUs for different resources which are part of SAP deployment. */ +export interface SAPSupportedResourceSkusResult { + /** Gets the list of SAP supported SKUs. */ + supportedSkus?: SAPSupportedSku[]; +} + +/** The SAP supported SKU. */ +export interface SAPSupportedSku { + /** The VM Sku. */ + vmSku?: string; + /** True if the Sku is certified for App server in the SAP system. */ + isAppServerCertified?: boolean; + /** True if the Sku is certified for Database server in the SAP system. */ + isDatabaseCertified?: boolean; +} + +/** The SAP request to get list of disk configurations. */ +export interface SAPDiskConfigurationsRequest { + /** The geo-location where the SAP resources will be created. */ + appLocation: string; + /** Defines the environment type - Production/Non Production. */ + environment: SAPEnvironmentType; + /** Defines the SAP Product type. */ + sapProduct: SAPProductType; + /** The database type. Eg: HANA, DB2, etc */ + databaseType: SAPDatabaseType; + /** The deployment type. Eg: SingleServer/ThreeTier */ + deploymentType: SAPDeploymentType; + /** The VM SKU for database instance. */ + dbVmSku: string; +} + +/** The list of disk configuration for vmSku which are part of SAP deployment. */ +export interface SAPDiskConfigurationsResult { + /** Gets the list of Disk Configurations. */ + diskConfigurations?: SAPDiskConfiguration[]; +} + +/** The SAP Disk Configuration. */ +export interface SAPDiskConfiguration { + /** The volume name. */ + volume?: string; + /** The disk type. */ + diskType?: string; + /** The disk count. */ + diskCount?: number; + /** The disk size in GB. */ + diskSizeGB?: number; + /** The disk Iops. */ + diskIopsReadWrite?: number; + /** The disk provisioned throughput in MBps. */ + diskMBpsReadWrite?: number; + /** The disk storage type */ + diskStorageType?: string; +} + +/** The SAP request to get list of availability zones. */ +export interface SAPAvailabilityZoneDetailsRequest { + /** The geo-location where the SAP resources will be created. */ + appLocation: string; + /** Defines the SAP Product type. */ + sapProduct: SAPProductType; + /** The database type. Eg: HANA, DB2, etc */ + databaseType: SAPDatabaseType; +} + +/** The list of supported availability zone pairs which are part of SAP HA deployment. */ +export interface SAPAvailabilityZoneDetailsResult { + /** Gets the list of availability zone pairs. */ + availabilityZonePairs?: SAPAvailabilityZonePair[]; +} + +/** The SAP Availability Zone Pair. */ +export interface SAPAvailabilityZonePair { + /** The zone A. */ + zoneA?: number; + /** The zone B. */ + zoneB?: number; +} + +/** The SAP Configuration. */ +export interface SAPConfiguration { + /** Polymorphic discriminator, which specifies the different types this object can be */ + configurationType: "Discovery" | "Deployment" | "DeploymentWithOSConfig"; +} + +/** An error response from the Virtual Instance for SAP Workload service. */ +export interface SAPVirtualInstanceError { + /** The Virtual Instance for SAP error body. */ + properties?: ErrorDefinition; +} + +/** Error definition. */ +export interface ErrorDefinition { + /** + * Service specific error code which serves as the substatus for the HTTP error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Description of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Internal error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDefinition[]; +} + +/** Defines the request body for updating Virtual Instance for SAP. */ +export interface UpdateSAPVirtualInstanceRequest { + /** Gets or sets the Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Managed service identity (user assigned identities) */ + identity?: UserAssignedServiceIdentity; +} + +/** The current status of an async operation. */ +export interface OperationStatusResult { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: OperationStatusResult[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; +} + +/** Defines the collection of Virtual Instance for SAP. */ +export interface SAPVirtualInstanceList { + /** Gets the list of Virtual Instances for SAP. */ + value?: SAPVirtualInstance[]; + /** Gets the value of next link. */ + nextLink?: string; +} + +/** Defines the SAP message server properties. */ +export interface MessageServerProperties { + /** + * The message server port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly msPort?: number; + /** + * The message server internal MS port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly internalMsPort?: number; + /** + * The message server http port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly httpPort?: number; + /** + * The message server https port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly httpsPort?: number; + /** + * The message server SAP host name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostname?: string; + /** + * The message server IP Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddress?: string; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; +} + +/** Defines the SAP enqueue server properties. */ +export interface EnqueueServerProperties { + /** + * The enqueue server SAP host name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostname?: string; + /** + * The enqueue server SAP IP Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddress?: string; + /** + * The enqueue server Port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly port?: number; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; +} + +/** Defines the SAP Gateway Server properties. */ +export interface GatewayServerProperties { + /** + * The gateway Port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly port?: number; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; +} + +/** Defines the SAP ERS Server properties. */ +export interface EnqueueReplicationServerProperties { + /** + * Defines the type of Enqueue Replication Server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ersVersion?: EnqueueReplicationServerType; + /** + * The ERS server instance id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceNo?: string; + /** + * The ERS server SAP host name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostname?: string; + /** + * The ERS server SAP kernel version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kernelVersion?: string; + /** + * The ERS server SAP kernel patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kernelPatch?: string; + /** + * The ERS server SAP IP Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddress?: string; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; +} + +/** The Central Server VM Details. */ +export interface CentralServerVmDetails { + /** + * Defines the type of central server VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: CentralServerVirtualMachineType; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly virtualMachineId?: string; +} + +/** Defines the request body for updating SAP Central Instance. */ +export interface UpdateSAPCentralInstanceRequest { + /** Gets or sets the Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** Defines the collection of SAP Central Instances. */ +export interface SAPCentralInstanceList { + /** Gets the list of SAP central instances. */ + value?: SAPCentralServerInstance[]; + /** Gets the value of next link. */ + nextLink?: string; +} + +/** The Database VM Details. */ +export interface DatabaseVmDetails { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly virtualMachineId?: string; + /** + * Defines the SAP Instance status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: SAPVirtualInstanceStatus; +} + +/** Defines the request body for updating SAP Database Instance. */ +export interface UpdateSAPDatabaseInstanceRequest { + /** Gets or sets the Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** Defines the collection of SAP Database Instances. */ +export interface SAPDatabaseInstanceList { + /** Gets the list of SAP Database instances. */ + value?: SAPDatabaseInstance[]; + /** Gets the value of next link. */ + nextLink?: string; +} + +/** Defines the request body for updating SAP Application Instance. */ +export interface UpdateSAPApplicationInstanceRequest { + /** Gets or sets the Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** Defines the collection of SAP Application Server Instances. */ +export interface SAPApplicationServerInstanceList { + /** Gets the list of SAP Application Server instances. */ + value?: SAPApplicationServerInstance[]; + /** Gets the value of next link. */ + nextLink?: string; +} + +/** Stop SAP Request. */ +export interface StopRequest { + /** A boolean to specify if the SAP system should be hard-stopped. */ + hardStop?: boolean; +} + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** The response from the List SAP monitors operation. */ +export interface MonitorListResult { + /** The list of SAP monitors. */ + value?: Monitor[]; + /** The URL to get the next set of SAP monitors. */ + nextLink?: string; +} + +/** Standard error object. */ +export interface ErrorModel { + /** + * Server-defined set of error codes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Human-readable representation of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Target of the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * Array of details about specific errors that led to this reported error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorModel[]; + /** + * Object containing more specific information than the current object about the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly innerError?: ErrorInnerError; +} + +/** Object containing more specific information than the current object about the error. */ +export interface ErrorInnerError { + /** Standard error object. */ + innerError?: ErrorModel; +} + +/** Tags field of the resource. */ +export interface Tags { + /** Tags field of the resource. */ + tags?: { [propertyName: string]: string }; +} + +/** The response from the List provider instances operation. */ +export interface ProviderInstanceListResult { + /** The list of provider instances. */ + value?: ProviderInstance[]; + /** The URL to get the next set of provider instances. */ + nextLink?: string; +} + +/** Gets or sets the provider specific properties. */ +export interface ProviderSpecificProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: + | "SapHana" + | "SapNetWeaver" + | "PrometheusOS" + | "Db2" + | "PrometheusHaCluster" + | "MsSqlServer"; +} + +/** A list of SKUs supported by an Azure Resource Provider. */ +export interface SkusListResult { + /** + * List of SKUs supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: SkuDefinition[]; + /** + * URL to get the next set of SKU list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The SKU definition. */ +export interface SkuDefinition { + /** The name of the SKU. */ + name: string; + /** Resource type the SKU applicable for. */ + resourceType?: string; + /** This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. */ + tier?: string; + /** The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. */ + size?: string; + /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ + family?: string; + /** If the service has different kinds of hardware, for the same SKU, then that can be captured here. */ + kind?: string; + /** List of locations where this SKU is available. */ + locations?: string[]; + /** List of locations where this SKU is available. */ + locationInfo?: SkuLocationAndZones[]; + /** If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. */ + capacity?: Record; + /** The SKU costs. */ + costs?: SkuCost[]; + /** The SKU capabilities. */ + capabilities?: SkuCapability[]; + /** The SKU restrictions. */ + restrictions?: SkuRestriction[]; +} + +/** The SKU location and zone. */ +export interface SkuLocationAndZones { + /** The location of the SKU. */ + location?: string; + /** The availability zones of SKU location. */ + zones?: string[]; + /** The availability zone details of the SKU location. */ + zoneDetails?: SkuZoneDetail[]; + /** The extended locations of SKU. */ + extendedLocations?: string[]; + /** Type of the extended location. */ + type?: LocationType; +} + +/** The SKU zone details. */ +export interface SkuZoneDetail { + /** The physical zones. */ + zones?: string[]; + /** The capabilities. */ + capabilities?: SkuCapability[]; +} + +/** The SKU capability definition. */ +export interface SkuCapability { + /** The capability name. */ + name?: string; + /** The capability value. */ + value?: string; +} + +/** The SKU cost definition. */ +export interface SkuCost { + /** Billing meter id. */ + meterId?: string; + /** The quantity. */ + quantity?: number; + /** The extended unit. */ + extendedUnit?: string; +} + +/** The SKU restriction definition. */ +export interface SkuRestriction { + /** The SKU restriction type. */ + type?: SkuRestrictionType; + /** Restriction values. */ + values?: string[]; + /** The restriction information. */ + restrictionInfo?: Record; + /** The SKU restriction reason code. */ + reasonCode?: SkuRestrictionReasonCode; +} + +/** 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 { + /** 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 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. + */ + readonly exactVersion?: string; + /** Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. */ + sharedGalleryImageId?: string; +} + +/** Defines the OS configuration. */ +export interface OSConfiguration { + /** Polymorphic discriminator, which specifies the different types this object can be */ + osType: "Windows" | "Linux"; +} + +/** Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. */ +export interface SshPublicKey { + /** 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; +} + +/** 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 SSH Key-pair used to authenticate with the VM. 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). */ +export interface SshKeyPair { + /** SSH public key */ + publicKey?: string; + /** SSH private key. */ + privateKey?: string; +} + +/** 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 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 Windows operating system settings on the virtual machine. */ + osConfiguration?: OSConfigurationUnion; +} + +/** Defines the virtual machine configuration. */ +export interface VirtualMachineConfiguration { + /** The virtual machine size. */ + vmSize: string; + /** The image reference. */ + imageReference: ImageReference; + /** The OS profile. */ + osProfile: OSProfile; +} + +/** Defines the network configuration for SAP infrastructure */ +export interface NetworkConfiguration { + /** Specifies whether a secondary IP address should be added to the network interface on all VMs */ + isSecondaryIpEnabled?: boolean; +} + +/** Deploy SAP Infrastructure Details. */ +export interface InfrastructureConfiguration { + /** Polymorphic discriminator, which specifies the different types this object can be */ + deploymentType: "SingleServer" | "ThreeTier"; + /** The application resource group where SAP system resources will be deployed. */ + appResourceGroup: string; +} + +/** Gets or sets the central server configuration. */ +export interface CentralServerConfiguration { + /** The subnet id. */ + subnetId: string; + /** Gets or sets the virtual machine configuration. */ + virtualMachineConfiguration: VirtualMachineConfiguration; + /** The number of central server VMs. */ + instanceCount: number; +} + +/** Gets or sets the database configuration. */ +export interface DatabaseConfiguration { + /** The database type. */ + databaseType?: SAPDatabaseType; + /** The subnet id. */ + subnetId: string; + /** Gets or sets the virtual machine configuration. */ + virtualMachineConfiguration: VirtualMachineConfiguration; + /** The number of database VMs. */ + instanceCount: number; +} + +/** Gets or sets the application server configuration. */ +export interface ApplicationServerConfiguration { + /** The subnet id. */ + subnetId: string; + /** Gets or sets the virtual machine configuration. */ + virtualMachineConfiguration: VirtualMachineConfiguration; + /** The number of app server instances. */ + instanceCount: number; +} + +/** Gets or sets the high availability configuration. */ +export interface HighAvailabilityConfiguration { + /** The high availability type. */ + highAvailabilityType: SAPHighAvailabilityType; +} + +/** The SAP Software configuration Input. */ +export interface SoftwareConfiguration { + /** Polymorphic discriminator, which specifies the different types this object can be */ + softwareInstallationType: "ServiceInitiated" | "SAPInstallWithoutOSConfig"; +} + +/** Gets or sets the HA software configuration. */ +export interface HighAvailabilitySoftwareConfiguration { + /** The fencing client id. */ + fencingClientId: string; + /** The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. */ + fencingClientPassword: string; +} + +/** Defines the OS and SAP Configurations for Deployment */ +export interface OsSapConfiguration { + /** The url and storage account ID where deployer VM packages are uploaded */ + deployerVmPackages?: DeployerVmPackages; + /** The FQDN to set for the SAP system */ + sapFqdn?: string; +} + +/** Defines the url and storage account ID where deployer VM packages are uploaded */ +export interface DeployerVmPackages { + /** The URL to the deployer VM packages file. */ + url?: string; + /** The deployer VM packages storage account id */ + storageAccountId?: string; +} + +/** Defines the workload operation. */ +export interface OperationsDisplayDefinition { + /** Defines the workload provider. */ + provider: string; + /** Defines the workload resource. */ + resource: string; + /** Defines the workload operation. */ + operation: string; + /** Describes the workload operation. */ + description: string; +} + +/** Properties of an Operation. */ +export interface OperationsDefinition { + /** Name of the operation. */ + name: string; + /** Indicates whether the operation applies to data-plane. */ + isDataAction?: boolean; + /** Defines the workload operation origin. */ + origin?: OperationProperties; + /** Display information of the operation. */ + display: OperationsDefinitionDisplay; + /** Defines the action type of workload operation. */ + actionType?: WorkloadMonitorActionType; + /** Defines the workload operation properties. */ + properties?: any; +} + +/** Defines the workload operation definition response. */ +export interface OperationsDefinitionArrayResponseWithContinuation { + /** Defines the workload operation definition response properties. */ + value?: OperationsDefinition[]; + /** The URL to get to the next set of results, if there are any. */ + nextLink?: string; +} + +/** The SKU restriction information. */ +export interface RestrictionInfo { + /** The restriction locations. */ + locations?: string[]; + /** The restriction zones. */ + zones?: string[]; +} + +/** The SKU capacity. */ +export interface SkuCapacity { + /** Minimum capacity value. */ + minimum?: number; + /** Maximum capacity value. */ + maximum?: number; + /** Default capacity value. */ + default?: number; + /** Scale type of the SKU capacity. */ + scaleType?: SkuScaleType; +} + +/** VMSS profile */ +export type VmssNodesProfile = NodeProfile & { + /** Minimum number of nodes for autoscale */ + autoScaleMinCount?: number; + /** Maximum number of nodes for autoscale */ + autoScaleMaxCount?: number; +}; + +/** Search profile */ +export type SearchProfile = NodeProfile & { + /** Search type */ + searchType: SearchType; +}; + +/** Identity for the resource. Currently not supported */ +export type PhpWorkloadResourceIdentity = UserAssignedServiceIdentity & {}; + +export type PatchResourceRequestBodyIdentity = UserAssignedServiceIdentity & {}; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export type TrackedResource = Resource & { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +}; + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** Defines the workload operation content. */ +export type OperationsContent = Resource & { + /** Name of the operation. */ + namePropertiesName?: string; + /** Indicates whether the operation applies to data-plane. */ + isDataAction?: boolean; + /** Defines the workload operation origin. */ + origin?: OperationProperties; + /** Display information of the operation. */ + display?: OperationsDefinitionDisplay; + /** Defines the action type of workload operation. */ + actionType?: WorkloadMonitorActionType; + /** Defines the workload operation properties. */ + properties?: any; +}; + +/** The recommended configuration for a single server SAP system. */ +export type SingleServerRecommendationResult = SAPSizingRecommendationResult & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + deploymentType: "SingleServer"; + /** The recommended VM SKU for single server. */ + vmSku?: string; +}; + +/** The recommended configuration for a three tier SAP system. */ +export type ThreeTierRecommendationResult = SAPSizingRecommendationResult & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + deploymentType: "ThreeTier"; + /** The database VM SKU. */ + dbVmSku?: string; + /** The database server instance count. */ + databaseInstanceCount?: number; + /** The central server VM SKU. */ + centralServerVmSku?: string; + /** The central server instance count. */ + centralServerInstanceCount?: number; + /** The application server VM SKU. */ + applicationServerVmSku?: string; + /** The application server instance count. */ + applicationServerInstanceCount?: number; +}; + +/** Discovery Details. */ +export type DiscoveryConfiguration = SAPConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + configurationType: "Discovery"; + /** The virtual machine ID of the Central Server. */ + centralServerVmId?: string; + /** + * The geo-location where the SAP system exists. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly appLocation?: string; +}; + +/** Deployment Configuration. */ +export type DeploymentConfiguration = SAPConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + configurationType: "Deployment"; + /** The geo-location where the SAP system is to be created. */ + appLocation?: string; + /** The infrastructure configuration. */ + infrastructureConfiguration?: InfrastructureConfigurationUnion; + /** The software configuration. */ + softwareConfiguration?: SoftwareConfigurationUnion; +}; + +/** Deployment along with OS Configuration. */ +export type DeploymentWithOSConfiguration = SAPConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + configurationType: "DeploymentWithOSConfig"; + /** The geo-location where the SAP system is to be created. */ + appLocation?: string; + /** The infrastructure configuration. */ + infrastructureConfiguration?: InfrastructureConfigurationUnion; + /** The software configuration. */ + softwareConfiguration?: SoftwareConfigurationUnion; + /** The OS and SAP configuration. */ + osSapConfiguration?: OsSapConfiguration; +}; + +/** Defines the SAP monitor errors. */ +export type MonitorPropertiesErrors = ErrorModel & {}; + +/** Defines the provider instance errors. */ +export type ProviderInstancePropertiesErrors = ErrorModel & {}; + +/** Gets or sets the provider properties. */ +export type HanaDbProviderInstanceProperties = ProviderSpecificProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: "SapHana"; + /** Gets or sets the target virtual machine size. */ + hostname?: string; + /** Gets or sets the hana database name. */ + dbName?: string; + /** Gets or sets the database sql port. */ + sqlPort?: string; + /** Gets or sets the database instance number. */ + instanceNumber?: string; + /** Gets or sets the database user name. */ + dbUsername?: string; + /** Gets or sets the database password. */ + dbPassword?: string; + /** Gets or sets the key vault URI to secret with the database password. */ + dbPasswordUri?: string; + /** Gets or sets the blob URI to SSL certificate for the DB. */ + dbSslCertificateUri?: string; + /** Gets or sets the hostname(s) in the SSL certificate. */ + sslHostNameInCertificate?: string; +}; + +/** Gets or sets the provider properties. */ +export type SapNetWeaverProviderInstanceProperties = ProviderSpecificProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: "SapNetWeaver"; + /** Gets or sets the SAP System Identifier */ + sapSid?: string; + /** Gets or sets the target virtual machine IP Address/FQDN. */ + sapHostname?: string; + /** Gets or sets the instance number of SAP NetWeaver. */ + sapInstanceNr?: string; + /** Gets or sets the list of HostFile Entries */ + sapHostFileEntries?: string[]; + /** Gets or sets the SAP user name. */ + sapUsername?: string; + /** Sets the SAP password. */ + sapPassword?: string; + /** Gets or sets the key vault URI to secret with the SAP password. */ + sapPasswordUri?: string; + /** Gets or sets the SAP Client ID. */ + sapClientId?: string; + /** Gets or sets the SAP HTTP port number. */ + sapPortNumber?: string; + /** Gets or sets the blob URI to SSL certificate for the SAP system. */ + sapSslCertificateUri?: string; +}; + +/** Gets or sets the PrometheusOS provider properties. */ +export type PrometheusOSProviderInstanceProperties = ProviderSpecificProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: "PrometheusOS"; + /** URL of the Node Exporter endpoint */ + prometheusUrl?: string; +}; + +/** Gets or sets the DB2 provider properties. */ +export type DB2ProviderInstanceProperties = ProviderSpecificProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: "Db2"; + /** Gets or sets the target virtual machine name. */ + hostname?: string; + /** Gets or sets the db2 database name. */ + dbName?: string; + /** Gets or sets the db2 database sql port. */ + dbPort?: string; + /** Gets or sets the db2 database user name. */ + dbUsername?: string; + /** Gets or sets the db2 database password. */ + dbPassword?: string; + /** Gets or sets the key vault URI to secret with the database password. */ + dbPasswordUri?: string; + /** Gets or sets the SAP System Identifier */ + sapSid?: string; +}; + +/** Gets or sets the PrometheusHaCluster provider properties. */ +export type PrometheusHaClusterProviderInstanceProperties = ProviderSpecificProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: "PrometheusHaCluster"; + /** URL of the Node Exporter endpoint. */ + prometheusUrl?: string; + /** Gets or sets the target machine name. */ + hostname?: string; + /** Gets or sets the cluster sid. */ + sid?: string; + /** Gets or sets the clusterName. */ + clusterName?: string; +}; + +/** Gets or sets the SQL server provider properties. */ +export type MsSqlServerProviderInstanceProperties = ProviderSpecificProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + providerType: "MsSqlServer"; + /** Gets or sets the SQL server host name. */ + hostname?: string; + /** Gets or sets the database sql port. */ + dbPort?: string; + /** Gets or sets the database user name. */ + dbUsername?: string; + /** Gets or sets the database password. */ + dbPassword?: string; + /** Gets or sets the key vault URI to secret with the database password. */ + dbPasswordUri?: string; + /** Gets or sets the SAP System Identifier */ + sapSid?: string; +}; + +/** Specifies Windows operating system settings on the virtual machine. */ +export type WindowsConfiguration = OSConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + osType: "Windows"; +}; + +/** 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 type LinuxConfiguration = OSConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + osType: "Linux"; + /** Specifies whether password authentication should be disabled. */ + disablePasswordAuthentication?: boolean; + /** Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead) */ + ssh?: SshConfiguration; + /** The SSH Key-pair used to authenticate with the VM's. */ + sshKeyPair?: SshKeyPair; +}; + +/** Gets or sets the single server configuration. */ +export type SingleServerConfiguration = InfrastructureConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + deploymentType: "SingleServer"; + /** Network configuration for the server */ + networkConfiguration?: NetworkConfiguration; + /** The database type. */ + databaseType?: SAPDatabaseType; + /** The subnet id. */ + subnetId: string; + /** Gets or sets the virtual machine configuration. */ + virtualMachineConfiguration: VirtualMachineConfiguration; +}; + +/** Gets or sets the three tier SAP configuration. */ +export type ThreeTierConfiguration = InfrastructureConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + deploymentType: "ThreeTier"; + /** Network configuration common to all servers */ + networkConfiguration?: NetworkConfiguration; + /** The central server configuration. */ + centralServer: CentralServerConfiguration; + /** The application server configuration. */ + applicationServer: ApplicationServerConfiguration; + /** The database configuration. */ + databaseServer: DatabaseConfiguration; + /** The high availability configuration. */ + highAvailabilityConfig?: HighAvailabilityConfiguration; +}; + +/** The SAP Software configuration Input when the software is to be installed by service. */ +export type ServiceInitiatedSoftwareConfiguration = SoftwareConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + softwareInstallationType: "ServiceInitiated"; + /** The URL to the SAP Build of Materials(BOM) file. */ + bomUrl: string; + /** The software version to install. */ + softwareVersion: string; + /** The SAP bits storage account id. */ + sapBitsStorageAccountId: string; + /** The FQDN to set for the SAP system during install. */ + sapFqdn: string; + /** The SSH private key. */ + sshPrivateKey: string; + /** Gets or sets the HA software configuration. */ + highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; +}; + +/** The SAP Software configuration Input when the software is to be installed by service without OS Configurations */ +export type SAPInstallWithoutOSConfigSoftwareConfiguration = SoftwareConfiguration & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + softwareInstallationType: "SAPInstallWithoutOSConfig"; + /** The URL to the SAP Build of Materials(BOM) file. */ + bomUrl: string; + /** The SAP bits storage account id. */ + sapBitsStorageAccountId: string; + /** The software version to install. */ + softwareVersion: string; + /** Gets or sets the HA software configuration. */ + highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; +}; + +/** Display information of the operation. */ +export type OperationsDefinitionDisplay = OperationsDisplayDefinition & {}; + +/** Php workload resource */ +export type PhpWorkloadResource = TrackedResource & { + /** Indicates which kind of php workload this resource represent e.g WordPress */ + kind: WorkloadKind; + /** Php workloads SKU */ + sku?: Sku; + /** Identity for the resource. Currently not supported */ + identity?: PhpWorkloadResourceIdentity; + /** The infra resources for PHP workload will be created in this location */ + appLocation?: string; + /** Managed resource group configuration of the workload */ + managedResourceGroupConfiguration?: ManagedRGConfiguration; + /** Admin user profile used for VM and VMSS */ + adminUserProfile?: UserProfile; + /** VMSS web nodes profile */ + webNodesProfile?: VmssNodesProfile; + /** Controller VM profile */ + controllerProfile?: NodeProfile; + /** Network profile */ + networkProfile?: NetworkProfile; + /** Database profile */ + databaseProfile?: DatabaseProfile; + /** Site profile */ + siteProfile?: SiteProfile; + /** File share profile */ + fileshareProfile?: FileshareProfile; + /** PHP profile */ + phpProfile?: PhpProfile; + /** Search profile */ + searchProfile?: SearchProfile; + /** Cache profile */ + cacheProfile?: CacheProfile; + /** Backup profile */ + backupProfile?: BackupProfile; + /** + * Php workload resource provisioning state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: PhpWorkloadProvisioningState; +}; + +/** Define the Virtual Instance for SAP. */ +export type SAPVirtualInstance = TrackedResource & { + /** Managed service identity (user assigned identities) */ + identity?: UserAssignedServiceIdentity; + /** Defines the environment type - Production/Non Production. */ + environment: SAPEnvironmentType; + /** Defines the SAP Product type. */ + sapProduct: SAPProductType; + /** Defines if an existing SAP system is being registered or a new SAP system is being created */ + configuration: SAPConfigurationUnion; + /** Managed resource group configuration */ + managedResourceGroupConfiguration?: ManagedRGConfiguration; + /** + * Defines the SAP Instance status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: SAPVirtualInstanceStatus; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; + /** + * Defines the Virtual Instance for SAP state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: SAPVirtualInstanceState; + /** + * Defines the provisioning states. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: SapVirtualInstanceProvisioningState; + /** + * Defines the Virtual Instance for SAP errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: SAPVirtualInstanceError; +}; + +/** Define the SAP Central Server Instance. */ +export type SAPCentralServerInstance = TrackedResource & { + /** + * The central server instance id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceNo?: string; + /** + * The central server subnet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnet?: string; + /** Defines the SAP message server properties. */ + messageServerProperties?: MessageServerProperties; + /** Defines the SAP enqueue server properties. */ + enqueueServerProperties?: EnqueueServerProperties; + /** Defines the SAP Gateway Server properties. */ + gatewayServerProperties?: GatewayServerProperties; + /** Defines the SAP ERS Server properties. */ + enqueueReplicationServerProperties?: EnqueueReplicationServerProperties; + /** + * The central server kernel version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kernelVersion?: string; + /** + * The central server kernel patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kernelPatch?: string; + /** + * The list of virtual machines. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmDetails?: CentralServerVmDetails[]; + /** + * Defines the SAP Instance status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: SAPVirtualInstanceStatus; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; + /** + * Defines the provisioning states. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: SapVirtualInstanceProvisioningState; + /** + * Defines the Central Instance errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: SAPVirtualInstanceError; +}; + +/** Define the SAP Database Instance. */ +export type SAPDatabaseInstance = TrackedResource & { + /** + * The database subnet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnet?: string; + /** + * The database SID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseSid?: string; + /** + * The SAP database type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseType?: string; + /** + * The database IP Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddress?: string; + /** + * The list of virtual machines. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmDetails?: DatabaseVmDetails[]; + /** + * Defines the SAP Instance status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: SAPVirtualInstanceStatus; + /** + * Defines the provisioning states. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: SapVirtualInstanceProvisioningState; + /** + * Defines the Database Instance errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: SAPVirtualInstanceError; +}; + +/** Define the SAP Application Server Instance. */ +export type SAPApplicationServerInstance = TrackedResource & { + /** + * The application server instance id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceNo?: string; + /** + * The application server subnet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subnet?: string; + /** + * The application server SAP host name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostname?: string; + /** + * The application server SAP kernel version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kernelVersion?: string; + /** + * The application server SAP kernel patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kernelPatch?: string; + /** + * The application server SAP IP Address. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ipAddress?: string; + /** + * The application server gateway Port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayPort?: number; + /** + * The application server ICM HTTP Port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly icmHttpPort?: number; + /** + * The application server ICM HTTPS Port. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly icmHttpsPort?: number; + /** + * The virtual machine. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly virtualMachineId?: string; + /** + * Defines the SAP Instance status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: SAPVirtualInstanceStatus; + /** + * Defines the SAP Instance health. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly health?: SAPHealthState; + /** + * Defines the provisioning states. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: SapVirtualInstanceProvisioningState; + /** + * Defines the Application Instance errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: SAPVirtualInstanceError; +}; + +/** SAP monitor info on Azure (ARM properties and SAP monitor properties) */ +export type Monitor = TrackedResource & { + /** + * State of provisioning of the SAP monitor. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: WorkloadMonitorProvisioningState; + /** + * Defines the SAP monitor errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: MonitorPropertiesErrors; + /** The SAP monitor resources will be deployed in the SAP monitoring region. The subnet region should be same as the SAP monitoring region. */ + appLocation?: string; + /** Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET. */ + routingPreference?: RoutingPreference; + /** Managed resource group configuration */ + managedResourceGroupConfiguration?: ManagedRGConfiguration; + /** The ARM ID of the Log Analytics Workspace that is used for SAP monitoring. */ + logAnalyticsWorkspaceArmId?: string; + /** The subnet which the SAP monitor will be deployed in */ + monitorSubnet?: string; + /** + * The ARM ID of the MSI used for SAP monitoring. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly msiArmId?: string; +}; + +/** WordPress instance resource */ +export type WordpressInstanceResource = ProxyResource & { + /** Application version */ + version?: WordpressVersions; + /** Database name used by the application */ + databaseName?: string; + /** User name used by the application to connect to database */ + databaseUser?: string; + /** + * Site Url to access the WordPress application + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteUrl?: string; + /** + * WordPress instance provisioning state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ApplicationProvisioningState; +}; + +/** A provider instance associated with SAP monitor. */ +export type ProviderInstance = ProxyResource & { + /** + * State of provisioning of the provider instance + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: WorkloadMonitorProvisioningState; + /** + * Defines the provider instance errors. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errors?: ProviderInstancePropertiesErrors; + /** Defines the provider instance errors. */ + providerSettings?: ProviderSpecificPropertiesUnion; +}; + +/** Known values of {@link OSImagePublisher} that the service accepts. */ +export enum KnownOSImagePublisher { + Canonical = "Canonical" +} + +/** + * Defines values for OSImagePublisher. \ + * {@link KnownOSImagePublisher} can be used interchangeably with OSImagePublisher, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Canonical** + */ +export type OSImagePublisher = string; + +/** Known values of {@link OSImageOffer} that the service accepts. */ +export enum KnownOSImageOffer { + UbuntuServer = "UbuntuServer" +} + +/** + * Defines values for OSImageOffer. \ + * {@link KnownOSImageOffer} can be used interchangeably with OSImageOffer, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UbuntuServer** + */ +export type OSImageOffer = string; + +/** Known values of {@link OSImageSku} that the service accepts. */ +export enum KnownOSImageSku { + Eighteen04LTS = "18.04-LTS", + Sixteen04LTS = "16.04-LTS" +} + +/** + * Defines values for OSImageSku. \ + * {@link KnownOSImageSku} can be used interchangeably with OSImageSku, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **18.04-LTS** \ + * **16.04-LTS** + */ +export type OSImageSku = string; + +/** Known values of {@link OSImageVersion} that the service accepts. */ +export enum KnownOSImageVersion { + Latest = "latest" +} + +/** + * Defines values for OSImageVersion. \ + * {@link KnownOSImageVersion} can be used interchangeably with OSImageVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **latest** + */ +export type OSImageVersion = string; + +/** Known values of {@link LoadBalancerType} that the service accepts. */ +export enum KnownLoadBalancerType { + ApplicationGateway = "ApplicationGateway", + LoadBalancer = "LoadBalancer" +} + +/** + * Defines values for LoadBalancerType. \ + * {@link KnownLoadBalancerType} can be used interchangeably with LoadBalancerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ApplicationGateway** \ + * **LoadBalancer** + */ +export type LoadBalancerType = string; + +/** Known values of {@link AzureFrontDoorEnabled} that the service accepts. */ +export enum KnownAzureFrontDoorEnabled { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for AzureFrontDoorEnabled. \ + * {@link KnownAzureFrontDoorEnabled} can be used interchangeably with AzureFrontDoorEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type AzureFrontDoorEnabled = string; + +/** Known values of {@link DatabaseType} that the service accepts. */ +export enum KnownDatabaseType { + MySql = "MySql" +} + +/** + * Defines values for DatabaseType. \ + * {@link KnownDatabaseType} can be used interchangeably with DatabaseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MySql** + */ +export type DatabaseType = string; + +/** Known values of {@link HAEnabled} that the service accepts. */ +export enum KnownHAEnabled { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for HAEnabled. \ + * {@link KnownHAEnabled} can be used interchangeably with HAEnabled, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type HAEnabled = string; + +/** Known values of {@link EnableSslEnforcement} that the service accepts. */ +export enum KnownEnableSslEnforcement { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for EnableSslEnforcement. \ + * {@link KnownEnableSslEnforcement} can be used interchangeably with EnableSslEnforcement, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type EnableSslEnforcement = string; + +/** Known values of {@link FileShareType} that the service accepts. */ +export enum KnownFileShareType { + NfsOnController = "NfsOnController", + AzureFiles = "AzureFiles" +} + +/** + * Defines values for FileShareType. \ + * {@link KnownFileShareType} can be used interchangeably with FileShareType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NfsOnController** \ + * **AzureFiles** + */ +export type FileShareType = string; + +/** Known values of {@link FileShareStorageType} that the service accepts. */ +export enum KnownFileShareStorageType { + StandardLRS = "Standard_LRS", + StandardGRS = "Standard_GRS", + StandardZRS = "Standard_ZRS", + PremiumLRS = "Premium_LRS" +} + +/** + * Defines values for FileShareStorageType. \ + * {@link KnownFileShareStorageType} can be used interchangeably with FileShareStorageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard_LRS** \ + * **Standard_GRS** \ + * **Standard_ZRS** \ + * **Premium_LRS** + */ +export type FileShareStorageType = string; + +/** Known values of {@link PHPVersion} that the service accepts. */ +export enum KnownPHPVersion { + Seven2 = "7.2", + Seven3 = "7.3", + Seven4 = "7.4" +} + +/** + * Defines values for PHPVersion. \ + * {@link KnownPHPVersion} can be used interchangeably with PHPVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **7.2** \ + * **7.3** \ + * **7.4** + */ +export type PHPVersion = string; + +/** Known values of {@link SearchType} that the service accepts. */ +export enum KnownSearchType { + Elastic = "Elastic" +} + +/** + * Defines values for SearchType. \ + * {@link KnownSearchType} can be used interchangeably with SearchType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Elastic** + */ +export type SearchType = string; + +/** Known values of {@link RedisCacheFamily} that the service accepts. */ +export enum KnownRedisCacheFamily { + C = "C", + P = "P" +} + +/** + * Defines values for RedisCacheFamily. \ + * {@link KnownRedisCacheFamily} can be used interchangeably with RedisCacheFamily, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **C** \ + * **P** + */ +export type RedisCacheFamily = string; + +/** Known values of {@link EnableBackup} that the service accepts. */ +export enum KnownEnableBackup { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for EnableBackup. \ + * {@link KnownEnableBackup} can be used interchangeably with EnableBackup, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type EnableBackup = string; + +/** Known values of {@link PhpWorkloadProvisioningState} that the service accepts. */ +export enum KnownPhpWorkloadProvisioningState { + NotSpecified = "NotSpecified", + Accepted = "Accepted", + Created = "Created", + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + Provisioning = "Provisioning", + Deleting = "Deleting" +} + +/** + * Defines values for PhpWorkloadProvisioningState. \ + * {@link KnownPhpWorkloadProvisioningState} can be used interchangeably with PhpWorkloadProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **Accepted** \ + * **Created** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Provisioning** \ + * **Deleting** + */ +export type PhpWorkloadProvisioningState = string; + +/** Known values of {@link WorkloadKind} that the service accepts. */ +export enum KnownWorkloadKind { + WordPress = "WordPress" +} + +/** + * Defines values for WorkloadKind. \ + * {@link KnownWorkloadKind} can be used interchangeably with WorkloadKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **WordPress** + */ +export type WorkloadKind = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + None = "None", + UserAssigned = "UserAssigned" +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **UserAssigned** + */ +export type ManagedServiceIdentityType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link WordpressVersions} that the service accepts. */ +export enum KnownWordpressVersions { + Five43 = "5.4.3", + Five42 = "5.4.2", + Five41 = "5.4.1", + Five4 = "5.4" +} + +/** + * Defines values for WordpressVersions. \ + * {@link KnownWordpressVersions} can be used interchangeably with WordpressVersions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **5.4.3** \ + * **5.4.2** \ + * **5.4.1** \ + * **5.4** + */ +export type WordpressVersions = string; + +/** Known values of {@link ApplicationProvisioningState} that the service accepts. */ +export enum KnownApplicationProvisioningState { + NotSpecified = "NotSpecified", + Accepted = "Accepted", + Created = "Created", + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + Installing = "Installing" +} + +/** + * Defines values for ApplicationProvisioningState. \ + * {@link KnownApplicationProvisioningState} can be used interchangeably with ApplicationProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **Accepted** \ + * **Created** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Installing** + */ +export type ApplicationProvisioningState = string; + +/** Known values of {@link SAPEnvironmentType} that the service accepts. */ +export enum KnownSAPEnvironmentType { + NonProd = "NonProd", + Prod = "Prod" +} + +/** + * Defines values for SAPEnvironmentType. \ + * {@link KnownSAPEnvironmentType} can be used interchangeably with SAPEnvironmentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NonProd** \ + * **Prod** + */ +export type SAPEnvironmentType = string; + +/** Known values of {@link SAPProductType} that the service accepts. */ +export enum KnownSAPProductType { + ECC = "ECC", + S4Hana = "S4HANA", + Other = "Other" +} + +/** + * Defines values for SAPProductType. \ + * {@link KnownSAPProductType} can be used interchangeably with SAPProductType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ECC** \ + * **S4HANA** \ + * **Other** + */ +export type SAPProductType = string; + +/** Known values of {@link SAPDeploymentType} that the service accepts. */ +export enum KnownSAPDeploymentType { + SingleServer = "SingleServer", + ThreeTier = "ThreeTier" +} + +/** + * Defines values for SAPDeploymentType. \ + * {@link KnownSAPDeploymentType} can be used interchangeably with SAPDeploymentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SingleServer** \ + * **ThreeTier** + */ +export type SAPDeploymentType = string; + +/** Known values of {@link SAPDatabaseType} that the service accepts. */ +export enum KnownSAPDatabaseType { + Hana = "HANA", + DB2 = "DB2" +} + +/** + * Defines values for SAPDatabaseType. \ + * {@link KnownSAPDatabaseType} can be used interchangeably with SAPDatabaseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HANA** \ + * **DB2** + */ +export type SAPDatabaseType = string; + +/** Known values of {@link SAPDatabaseScaleMethod} that the service accepts. */ +export enum KnownSAPDatabaseScaleMethod { + ScaleUp = "ScaleUp" +} + +/** + * Defines values for SAPDatabaseScaleMethod. \ + * {@link KnownSAPDatabaseScaleMethod} can be used interchangeably with SAPDatabaseScaleMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ScaleUp** + */ +export type SAPDatabaseScaleMethod = string; + +/** Known values of {@link SAPHighAvailabilityType} that the service accepts. */ +export enum KnownSAPHighAvailabilityType { + AvailabilitySet = "AvailabilitySet", + AvailabilityZone = "AvailabilityZone" +} + +/** + * Defines values for SAPHighAvailabilityType. \ + * {@link KnownSAPHighAvailabilityType} can be used interchangeably with SAPHighAvailabilityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AvailabilitySet** \ + * **AvailabilityZone** + */ +export type SAPHighAvailabilityType = string; + +/** Known values of {@link SAPConfigurationType} that the service accepts. */ +export enum KnownSAPConfigurationType { + Deployment = "Deployment", + Discovery = "Discovery", + DeploymentWithOSConfig = "DeploymentWithOSConfig" +} + +/** + * Defines values for SAPConfigurationType. \ + * {@link KnownSAPConfigurationType} can be used interchangeably with SAPConfigurationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Deployment** \ + * **Discovery** \ + * **DeploymentWithOSConfig** + */ +export type SAPConfigurationType = string; + +/** Known values of {@link SAPVirtualInstanceStatus} that the service accepts. */ +export enum KnownSAPVirtualInstanceStatus { + Starting = "Starting", + Running = "Running", + Stopping = "Stopping", + Offline = "Offline", + PartiallyRunning = "PartiallyRunning", + Unavailable = "Unavailable" +} + +/** + * Defines values for SAPVirtualInstanceStatus. \ + * {@link KnownSAPVirtualInstanceStatus} can be used interchangeably with SAPVirtualInstanceStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Starting** \ + * **Running** \ + * **Stopping** \ + * **Offline** \ + * **PartiallyRunning** \ + * **Unavailable** + */ +export type SAPVirtualInstanceStatus = string; + +/** Known values of {@link SAPHealthState} that the service accepts. */ +export enum KnownSAPHealthState { + Unknown = "Unknown", + Healthy = "Healthy", + Unhealthy = "Unhealthy", + Degraded = "Degraded" +} + +/** + * Defines values for SAPHealthState. \ + * {@link KnownSAPHealthState} can be used interchangeably with SAPHealthState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Healthy** \ + * **Unhealthy** \ + * **Degraded** + */ +export type SAPHealthState = string; + +/** Known values of {@link SAPVirtualInstanceState} that the service accepts. */ +export enum KnownSAPVirtualInstanceState { + InfrastructureDeploymentPending = "InfrastructureDeploymentPending", + InfrastructureDeploymentInProgress = "InfrastructureDeploymentInProgress", + InfrastructureDeploymentFailed = "InfrastructureDeploymentFailed", + SoftwareInstallationPending = "SoftwareInstallationPending", + SoftwareInstallationInProgress = "SoftwareInstallationInProgress", + SoftwareInstallationFailed = "SoftwareInstallationFailed", + DiscoveryPending = "DiscoveryPending", + DiscoveryInProgress = "DiscoveryInProgress", + DiscoveryFailed = "DiscoveryFailed", + RegistrationComplete = "RegistrationComplete" +} + +/** + * Defines values for SAPVirtualInstanceState. \ + * {@link KnownSAPVirtualInstanceState} can be used interchangeably with SAPVirtualInstanceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InfrastructureDeploymentPending** \ + * **InfrastructureDeploymentInProgress** \ + * **InfrastructureDeploymentFailed** \ + * **SoftwareInstallationPending** \ + * **SoftwareInstallationInProgress** \ + * **SoftwareInstallationFailed** \ + * **DiscoveryPending** \ + * **DiscoveryInProgress** \ + * **DiscoveryFailed** \ + * **RegistrationComplete** + */ +export type SAPVirtualInstanceState = string; + +/** Known values of {@link SapVirtualInstanceProvisioningState} that the service accepts. */ +export enum KnownSapVirtualInstanceProvisioningState { + Succeeded = "Succeeded", + Updating = "Updating", + Creating = "Creating", + Failed = "Failed", + Deleting = "Deleting" +} + +/** + * Defines values for SapVirtualInstanceProvisioningState. \ + * {@link KnownSapVirtualInstanceProvisioningState} can be used interchangeably with SapVirtualInstanceProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Updating** \ + * **Creating** \ + * **Failed** \ + * **Deleting** + */ +export type SapVirtualInstanceProvisioningState = string; + +/** Known values of {@link EnqueueReplicationServerType} that the service accepts. */ +export enum KnownEnqueueReplicationServerType { + EnqueueReplicator1 = "EnqueueReplicator1", + EnqueueReplicator2 = "EnqueueReplicator2" +} + +/** + * Defines values for EnqueueReplicationServerType. \ + * {@link KnownEnqueueReplicationServerType} can be used interchangeably with EnqueueReplicationServerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EnqueueReplicator1** \ + * **EnqueueReplicator2** + */ +export type EnqueueReplicationServerType = string; + +/** Known values of {@link CentralServerVirtualMachineType} that the service accepts. */ +export enum KnownCentralServerVirtualMachineType { + Primary = "Primary", + Secondary = "Secondary", + Unknown = "Unknown", + Ascs = "ASCS", + ERSInactive = "ERSInactive", + ERS = "ERS", + Standby = "Standby" +} + +/** + * Defines values for CentralServerVirtualMachineType. \ + * {@link KnownCentralServerVirtualMachineType} can be used interchangeably with CentralServerVirtualMachineType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **Secondary** \ + * **Unknown** \ + * **ASCS** \ + * **ERSInactive** \ + * **ERS** \ + * **Standby** + */ +export type CentralServerVirtualMachineType = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + User = "user", + System = "system", + UserSystem = "user,system" +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + Internal = "Internal" +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link WorkloadMonitorProvisioningState} that the service accepts. */ +export enum KnownWorkloadMonitorProvisioningState { + Accepted = "Accepted", + Creating = "Creating", + Updating = "Updating", + Failed = "Failed", + Succeeded = "Succeeded", + Deleting = "Deleting", + Migrating = "Migrating" +} + +/** + * Defines values for WorkloadMonitorProvisioningState. \ + * {@link KnownWorkloadMonitorProvisioningState} can be used interchangeably with WorkloadMonitorProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted** \ + * **Creating** \ + * **Updating** \ + * **Failed** \ + * **Succeeded** \ + * **Deleting** \ + * **Migrating** + */ +export type WorkloadMonitorProvisioningState = string; + +/** Known values of {@link RoutingPreference} that the service accepts. */ +export enum KnownRoutingPreference { + Default = "Default", + RouteAll = "RouteAll" +} + +/** + * Defines values for RoutingPreference. \ + * {@link KnownRoutingPreference} can be used interchangeably with RoutingPreference, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **RouteAll** + */ +export type RoutingPreference = string; + +/** Known values of {@link LocationType} that the service accepts. */ +export enum KnownLocationType { + Region = "Region", + EdgeZone = "EdgeZone" +} + +/** + * Defines values for LocationType. \ + * {@link KnownLocationType} can be used interchangeably with LocationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Region** \ + * **EdgeZone** + */ +export type LocationType = string; + +/** Known values of {@link SkuRestrictionType} that the service accepts. */ +export enum KnownSkuRestrictionType { + NotSpecified = "NotSpecified", + Location = "Location", + Zone = "Zone" +} + +/** + * Defines values for SkuRestrictionType. \ + * {@link KnownSkuRestrictionType} can be used interchangeably with SkuRestrictionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **Location** \ + * **Zone** + */ +export type SkuRestrictionType = string; + +/** Known values of {@link SkuRestrictionReasonCode} that the service accepts. */ +export enum KnownSkuRestrictionReasonCode { + NotSpecified = "NotSpecified", + QuotaId = "QuotaId", + NotAvailableForSubscription = "NotAvailableForSubscription" +} + +/** + * Defines values for SkuRestrictionReasonCode. \ + * {@link KnownSkuRestrictionReasonCode} can be used interchangeably with SkuRestrictionReasonCode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **QuotaId** \ + * **NotAvailableForSubscription** + */ +export type SkuRestrictionReasonCode = string; + +/** Known values of {@link OSType} that the service accepts. */ +export enum KnownOSType { + Linux = "Linux", + Windows = "Windows" +} + +/** + * Defines values for OSType. \ + * {@link KnownOSType} can be used interchangeably with OSType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Linux** \ + * **Windows** + */ +export type OSType = string; + +/** Known values of {@link SAPSoftwareInstallationType} that the service accepts. */ +export enum KnownSAPSoftwareInstallationType { + ServiceInitiated = "ServiceInitiated", + SAPInstallWithoutOSConfig = "SAPInstallWithoutOSConfig" +} + +/** + * Defines values for SAPSoftwareInstallationType. \ + * {@link KnownSAPSoftwareInstallationType} can be used interchangeably with SAPSoftwareInstallationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceInitiated** \ + * **SAPInstallWithoutOSConfig** + */ +export type SAPSoftwareInstallationType = string; + +/** Known values of {@link OperationProperties} that the service accepts. */ +export enum KnownOperationProperties { + NotSpecified = "NotSpecified", + User = "User", + System = "System" +} + +/** + * Defines values for OperationProperties. \ + * {@link KnownOperationProperties} can be used interchangeably with OperationProperties, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **User** \ + * **System** + */ +export type OperationProperties = string; + +/** Known values of {@link WorkloadMonitorActionType} that the service accepts. */ +export enum KnownWorkloadMonitorActionType { + NotSpecified = "NotSpecified", + Internal = "Internal" +} + +/** + * Defines values for WorkloadMonitorActionType. \ + * {@link KnownWorkloadMonitorActionType} can be used interchangeably with WorkloadMonitorActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **Internal** + */ +export type WorkloadMonitorActionType = string; + +/** Known values of {@link SkuScaleType} that the service accepts. */ +export enum KnownSkuScaleType { + None = "None", + Manual = "Manual", + Automatic = "Automatic" +} + +/** + * Defines values for SkuScaleType. \ + * {@link KnownSkuScaleType} can be used interchangeably with SkuScaleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Manual** \ + * **Automatic** + */ +export type SkuScaleType = string; +/** Defines values for DiskStorageType. */ +export type DiskStorageType = + | "Premium_LRS" + | "Standard_LRS" + | "StandardSSD_LRS"; +/** Defines values for DatabaseTier. */ +export type DatabaseTier = "Burstable" | "GeneralPurpose" | "MemoryOptimized"; +/** Defines values for SkuTier. */ +export type SkuTier = "Free" | "Basic" | "Standard" | "Premium"; + +/** Optional parameters. */ +export interface PhpWorkloadsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type PhpWorkloadsListBySubscriptionResponse = PhpWorkloadResourceList; + +/** Optional parameters. */ +export interface PhpWorkloadsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type PhpWorkloadsListByResourceGroupResponse = PhpWorkloadResourceList; + +/** Optional parameters. */ +export interface PhpWorkloadsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PhpWorkloadsGetResponse = PhpWorkloadResource; + +/** Optional parameters. */ +export interface PhpWorkloadsCreateOrUpdateOptionalParams + 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 PhpWorkloadsCreateOrUpdateResponse = PhpWorkloadResource; + +/** Optional parameters. */ +export interface PhpWorkloadsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type PhpWorkloadsUpdateResponse = PhpWorkloadResource; + +/** Optional parameters. */ +export interface PhpWorkloadsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Whether to delete infra along with workload resource. */ + deleteInfra?: string; + /** 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 PhpWorkloadsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type PhpWorkloadsListBySubscriptionNextResponse = PhpWorkloadResourceList; + +/** Optional parameters. */ +export interface PhpWorkloadsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type PhpWorkloadsListByResourceGroupNextResponse = PhpWorkloadResourceList; + +/** Optional parameters. */ +export interface WordpressInstancesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type WordpressInstancesListResponse = WordpressInstanceResourceList; + +/** Optional parameters. */ +export interface WordpressInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type WordpressInstancesGetResponse = WordpressInstanceResource; + +/** Optional parameters. */ +export interface WordpressInstancesCreateOrUpdateOptionalParams + 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 WordpressInstancesCreateOrUpdateResponse = WordpressInstanceResource; + +/** Optional parameters. */ +export interface WordpressInstancesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface WordpressInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type WordpressInstancesListNextResponse = WordpressInstanceResourceList; + +/** Optional parameters. */ +export interface SAPSizingRecommendationsOptionalParams + extends coreClient.OperationOptions { + /** SAP Sizing Recommendation Request body */ + sAPSizingRecommendation?: SAPSizingRecommendationRequest; +} + +/** Contains response data for the sAPSizingRecommendations operation. */ +export type SAPSizingRecommendationsResponse = SAPSizingRecommendationResultUnion; + +/** Optional parameters. */ +export interface SAPSupportedSkuOptionalParams + extends coreClient.OperationOptions { + /** SAP Supported SKU Request body */ + sAPSupportedSku?: SAPSupportedSkusRequest; +} + +/** Contains response data for the sAPSupportedSku operation. */ +export type SAPSupportedSkuResponse = SAPSupportedResourceSkusResult; + +/** Optional parameters. */ +export interface SAPDiskConfigurationsOptionalParams + extends coreClient.OperationOptions { + /** SAP Disk Configurations Request body */ + sAPDiskConfigurations?: SAPDiskConfigurationsRequest; +} + +/** Contains response data for the sAPDiskConfigurations operation. */ +export type SAPDiskConfigurationsResponse = SAPDiskConfigurationsResult; + +/** Optional parameters. */ +export interface SAPAvailabilityZoneDetailsOptionalParams + extends coreClient.OperationOptions { + /** SAP Availability Zone Details Request body */ + sAPAvailabilityZoneDetails?: SAPAvailabilityZoneDetailsRequest; +} + +/** Contains response data for the sAPAvailabilityZoneDetails operation. */ +export type SAPAvailabilityZoneDetailsResponse = SAPAvailabilityZoneDetailsResult; + +/** Optional parameters. */ +export interface SAPVirtualInstancesCreateOptionalParams + extends coreClient.OperationOptions { + /** The Virtual Instance for SAP request body. */ + body?: SAPVirtualInstance; + /** 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 create operation. */ +export type SAPVirtualInstancesCreateResponse = SAPVirtualInstance; + +/** Optional parameters. */ +export interface SAPVirtualInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SAPVirtualInstancesGetResponse = SAPVirtualInstance; + +/** Optional parameters. */ +export interface SAPVirtualInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** The Update Virtual Instance for SAP request body. */ + body?: UpdateSAPVirtualInstanceRequest; +} + +/** Contains response data for the update operation. */ +export type SAPVirtualInstancesUpdateResponse = SAPVirtualInstance; + +/** Optional parameters. */ +export interface SAPVirtualInstancesDeleteOptionalParams + 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 delete operation. */ +export type SAPVirtualInstancesDeleteResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface SAPVirtualInstancesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type SAPVirtualInstancesListByResourceGroupResponse = SAPVirtualInstanceList; + +/** Optional parameters. */ +export interface SAPVirtualInstancesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type SAPVirtualInstancesListBySubscriptionResponse = SAPVirtualInstanceList; + +/** Optional parameters. */ +export interface SAPVirtualInstancesStartOptionalParams + 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 start operation. */ +export type SAPVirtualInstancesStartResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface SAPVirtualInstancesStopOptionalParams + extends coreClient.OperationOptions { + /** The Virtual Instances for SAP stop request body. */ + body?: StopRequest; + /** 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 stop operation. */ +export type SAPVirtualInstancesStopResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface SAPVirtualInstancesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type SAPVirtualInstancesListByResourceGroupNextResponse = SAPVirtualInstanceList; + +/** Optional parameters. */ +export interface SAPVirtualInstancesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type SAPVirtualInstancesListBySubscriptionNextResponse = SAPVirtualInstanceList; + +/** Optional parameters. */ +export interface SAPCentralInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SAPCentralInstancesGetResponse = SAPCentralServerInstance; + +/** Optional parameters. */ +export interface SAPCentralInstancesCreateOptionalParams + extends coreClient.OperationOptions { + /** The SAP Central Server instance request body. */ + body?: SAPCentralServerInstance; + /** 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 create operation. */ +export type SAPCentralInstancesCreateResponse = SAPCentralServerInstance; + +/** Optional parameters. */ +export interface SAPCentralInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** The SAP Central Server instance request body. */ + body?: UpdateSAPCentralInstanceRequest; + /** 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 SAPCentralInstancesUpdateResponse = SAPCentralServerInstance; + +/** Optional parameters. */ +export interface SAPCentralInstancesDeleteOptionalParams + 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 delete operation. */ +export type SAPCentralInstancesDeleteResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface SAPCentralInstancesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SAPCentralInstancesListResponse = SAPCentralInstanceList; + +/** Optional parameters. */ +export interface SAPCentralInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SAPCentralInstancesListNextResponse = SAPCentralInstanceList; + +/** Optional parameters. */ +export interface SAPDatabaseInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SAPDatabaseInstancesGetResponse = SAPDatabaseInstance; + +/** Optional parameters. */ +export interface SAPDatabaseInstancesCreateOptionalParams + extends coreClient.OperationOptions { + /** The SAP Database Server instance request body. */ + body?: SAPDatabaseInstance; + /** 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 create operation. */ +export type SAPDatabaseInstancesCreateResponse = SAPDatabaseInstance; + +/** Optional parameters. */ +export interface SAPDatabaseInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** The SAP Database Server instance request body. */ + body?: UpdateSAPDatabaseInstanceRequest; + /** 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 SAPDatabaseInstancesUpdateResponse = SAPDatabaseInstance; + +/** Optional parameters. */ +export interface SAPDatabaseInstancesDeleteOptionalParams + 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 delete operation. */ +export type SAPDatabaseInstancesDeleteResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface SAPDatabaseInstancesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SAPDatabaseInstancesListResponse = SAPDatabaseInstanceList; + +/** Optional parameters. */ +export interface SAPDatabaseInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SAPDatabaseInstancesListNextResponse = SAPDatabaseInstanceList; + +/** Optional parameters. */ +export interface SAPApplicationServerInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SAPApplicationServerInstancesGetResponse = SAPApplicationServerInstance; + +/** Optional parameters. */ +export interface SAPApplicationServerInstancesCreateOptionalParams + extends coreClient.OperationOptions { + /** The SAP Application Server instance request body. */ + body?: SAPApplicationServerInstance; + /** 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 create operation. */ +export type SAPApplicationServerInstancesCreateResponse = SAPApplicationServerInstance; + +/** Optional parameters. */ +export interface SAPApplicationServerInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** The SAP Application Server instance request body. */ + body?: UpdateSAPApplicationInstanceRequest; + /** 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 SAPApplicationServerInstancesUpdateResponse = SAPApplicationServerInstance; + +/** Optional parameters. */ +export interface SAPApplicationServerInstancesDeleteOptionalParams + 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 delete operation. */ +export type SAPApplicationServerInstancesDeleteResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface SAPApplicationServerInstancesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SAPApplicationServerInstancesListResponse = SAPApplicationServerInstanceList; + +/** Optional parameters. */ +export interface SAPApplicationServerInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SAPApplicationServerInstancesListNextResponse = SAPApplicationServerInstanceList; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface MonitorsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MonitorsListResponse = MonitorListResult; + +/** Optional parameters. */ +export interface MonitorsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type MonitorsListByResourceGroupResponse = MonitorListResult; + +/** Optional parameters. */ +export interface MonitorsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MonitorsGetResponse = Monitor; + +/** Optional parameters. */ +export interface MonitorsCreateOptionalParams + 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 create operation. */ +export type MonitorsCreateResponse = Monitor; + +/** Optional parameters. */ +export interface MonitorsDeleteOptionalParams + 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 delete operation. */ +export type MonitorsDeleteResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface MonitorsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type MonitorsUpdateResponse = Monitor; + +/** Optional parameters. */ +export interface MonitorsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MonitorsListNextResponse = MonitorListResult; + +/** Optional parameters. */ +export interface MonitorsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type MonitorsListByResourceGroupNextResponse = MonitorListResult; + +/** Optional parameters. */ +export interface ProviderInstancesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ProviderInstancesListResponse = ProviderInstanceListResult; + +/** Optional parameters. */ +export interface ProviderInstancesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ProviderInstancesGetResponse = ProviderInstance; + +/** Optional parameters. */ +export interface ProviderInstancesCreateOptionalParams + 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 create operation. */ +export type ProviderInstancesCreateResponse = ProviderInstance; + +/** Optional parameters. */ +export interface ProviderInstancesDeleteOptionalParams + 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 delete operation. */ +export type ProviderInstancesDeleteResponse = OperationStatusResult; + +/** Optional parameters. */ +export interface ProviderInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ProviderInstancesListNextResponse = ProviderInstanceListResult; + +/** Optional parameters. */ +export interface SkusListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SkusListResponse = SkusListResult; + +/** Optional parameters. */ +export interface SkusListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SkusListNextResponse = SkusListResult; + +/** Optional parameters. */ +export interface WorkloadsClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/workloads/arm-workloads/src/models/mappers.ts b/sdk/workloads/arm-workloads/src/models/mappers.ts new file mode 100644 index 000000000000..73dae38e32ae --- /dev/null +++ b/sdk/workloads/arm-workloads/src/models/mappers.ts @@ -0,0 +1,4501 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const PhpWorkloadResourceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhpWorkloadResourceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhpWorkloadResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedRGConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedRGConfiguration", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const UserProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserProfile", + modelProperties: { + userName: { + serializedName: "userName", + required: true, + type: { + name: "String" + } + }, + sshPublicKey: { + serializedName: "sshPublicKey", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const NodeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NodeProfile", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + nodeSku: { + serializedName: "nodeSku", + required: true, + type: { + name: "String" + } + }, + osImage: { + serializedName: "osImage", + type: { + name: "Composite", + className: "OsImageProfile" + } + }, + osDisk: { + serializedName: "osDisk", + type: { + name: "Composite", + className: "DiskInfo" + } + }, + dataDisks: { + serializedName: "dataDisks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskInfo" + } + } + } + }, + nodeResourceIds: { + serializedName: "nodeResourceIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const OsImageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsImageProfile", + 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" + } + } + } + } +}; + +export const DiskInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiskInfo", + modelProperties: { + storageType: { + serializedName: "storageType", + required: true, + type: { + name: "Enum", + allowedValues: ["Premium_LRS", "Standard_LRS", "StandardSSD_LRS"] + } + }, + sizeInGB: { + serializedName: "sizeInGB", + type: { + name: "Number" + } + } + } + } +}; + +export const NetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + loadBalancerType: { + serializedName: "loadBalancerType", + required: true, + type: { + name: "String" + } + }, + loadBalancerSku: { + serializedName: "loadBalancerSku", + type: { + name: "String" + } + }, + loadBalancerTier: { + serializedName: "loadBalancerTier", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + }, + azureFrontDoorEnabled: { + serializedName: "azureFrontDoorEnabled", + type: { + name: "String" + } + }, + vNetResourceId: { + serializedName: "vNetResourceId", + readOnly: true, + type: { + name: "String" + } + }, + loadBalancerResourceId: { + serializedName: "loadBalancerResourceId", + readOnly: true, + type: { + name: "String" + } + }, + azureFrontDoorResourceId: { + serializedName: "azureFrontDoorResourceId", + readOnly: true, + type: { + name: "String" + } + }, + frontEndPublicIpResourceId: { + serializedName: "frontEndPublicIpResourceId", + readOnly: true, + type: { + name: "String" + } + }, + outboundPublicIpResourceIds: { + serializedName: "outboundPublicIpResourceIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DatabaseProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseProfile", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + serverName: { + serializedName: "serverName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + required: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + required: true, + type: { + name: "Enum", + allowedValues: ["Burstable", "GeneralPurpose", "MemoryOptimized"] + } + }, + haEnabled: { + serializedName: "haEnabled", + type: { + name: "String" + } + }, + storageSku: { + serializedName: "storageSku", + type: { + name: "String" + } + }, + storageInGB: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "storageInGB", + type: { + name: "Number" + } + }, + storageIops: { + serializedName: "storageIops", + type: { + name: "Number" + } + }, + backupRetentionDays: { + serializedName: "backupRetentionDays", + type: { + name: "Number" + } + }, + sslEnforcementEnabled: { + serializedName: "sslEnforcementEnabled", + type: { + name: "String" + } + }, + serverResourceId: { + serializedName: "serverResourceId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SiteProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SiteProfile", + modelProperties: { + domainName: { + serializedName: "domainName", + type: { + name: "String" + } + } + } + } +}; + +export const FileshareProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileshareProfile", + modelProperties: { + shareType: { + serializedName: "shareType", + required: true, + type: { + name: "String" + } + }, + storageType: { + serializedName: "storageType", + required: true, + type: { + name: "String" + } + }, + shareSizeInGB: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "shareSizeInGB", + type: { + name: "Number" + } + }, + storageResourceId: { + serializedName: "storageResourceId", + readOnly: true, + type: { + name: "String" + } + }, + shareName: { + serializedName: "shareName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PhpProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhpProfile", + modelProperties: { + version: { + serializedName: "version", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CacheProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheProfile", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + skuName: { + serializedName: "skuName", + required: true, + type: { + name: "String" + } + }, + family: { + serializedName: "family", + required: true, + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + required: true, + type: { + name: "Number" + } + }, + cacheResourceId: { + serializedName: "cacheResourceId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const BackupProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupProfile", + modelProperties: { + backupEnabled: { + serializedName: "backupEnabled", + required: true, + type: { + name: "String" + } + }, + vaultResourceId: { + serializedName: "vaultResourceId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Sku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "Enum", + allowedValues: ["Free", "Basic", "Standard", "Premium"] + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const UserAssignedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedServiceIdentity", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const PatchResourceRequestBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchResourceRequestBody", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "PatchResourceRequestBodyIdentity" + } + } + } + } +}; + +export const WordpressInstanceResourceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WordpressInstanceResourceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WordpressInstanceResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SAPSizingRecommendationRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPSizingRecommendationRequest", + modelProperties: { + appLocation: { + serializedName: "appLocation", + required: true, + type: { + name: "String" + } + }, + environment: { + serializedName: "environment", + required: true, + type: { + name: "String" + } + }, + sapProduct: { + serializedName: "sapProduct", + required: true, + type: { + name: "String" + } + }, + deploymentType: { + serializedName: "deploymentType", + required: true, + type: { + name: "String" + } + }, + saps: { + serializedName: "saps", + required: true, + type: { + name: "Number" + } + }, + dbMemory: { + serializedName: "dbMemory", + required: true, + type: { + name: "Number" + } + }, + databaseType: { + serializedName: "databaseType", + required: true, + type: { + name: "String" + } + }, + dbScaleMethod: { + serializedName: "dbScaleMethod", + type: { + name: "String" + } + }, + highAvailabilityType: { + serializedName: "highAvailabilityType", + type: { + name: "String" + } + } + } + } +}; + +export const SAPSizingRecommendationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPSizingRecommendationResult", + uberParent: "SAPSizingRecommendationResult", + polymorphicDiscriminator: { + serializedName: "deploymentType", + clientName: "deploymentType" + }, + modelProperties: { + deploymentType: { + serializedName: "deploymentType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SAPSupportedSkusRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPSupportedSkusRequest", + modelProperties: { + appLocation: { + serializedName: "appLocation", + required: true, + type: { + name: "String" + } + }, + environment: { + serializedName: "environment", + required: true, + type: { + name: "String" + } + }, + sapProduct: { + serializedName: "sapProduct", + required: true, + type: { + name: "String" + } + }, + deploymentType: { + serializedName: "deploymentType", + required: true, + type: { + name: "String" + } + }, + databaseType: { + serializedName: "databaseType", + required: true, + type: { + name: "String" + } + }, + highAvailabilityType: { + serializedName: "highAvailabilityType", + type: { + name: "String" + } + } + } + } +}; + +export const SAPSupportedResourceSkusResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPSupportedResourceSkusResult", + modelProperties: { + supportedSkus: { + serializedName: "supportedSkus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPSupportedSku" + } + } + } + } + } + } +}; + +export const SAPSupportedSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPSupportedSku", + modelProperties: { + vmSku: { + serializedName: "vmSku", + type: { + name: "String" + } + }, + isAppServerCertified: { + serializedName: "isAppServerCertified", + type: { + name: "Boolean" + } + }, + isDatabaseCertified: { + serializedName: "isDatabaseCertified", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SAPDiskConfigurationsRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPDiskConfigurationsRequest", + modelProperties: { + appLocation: { + serializedName: "appLocation", + required: true, + type: { + name: "String" + } + }, + environment: { + serializedName: "environment", + required: true, + type: { + name: "String" + } + }, + sapProduct: { + serializedName: "sapProduct", + required: true, + type: { + name: "String" + } + }, + databaseType: { + serializedName: "databaseType", + required: true, + type: { + name: "String" + } + }, + deploymentType: { + serializedName: "deploymentType", + required: true, + type: { + name: "String" + } + }, + dbVmSku: { + serializedName: "dbVmSku", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SAPDiskConfigurationsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPDiskConfigurationsResult", + modelProperties: { + diskConfigurations: { + serializedName: "diskConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPDiskConfiguration" + } + } + } + } + } + } +}; + +export const SAPDiskConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPDiskConfiguration", + modelProperties: { + volume: { + serializedName: "volume", + type: { + name: "String" + } + }, + diskType: { + serializedName: "diskType", + type: { + name: "String" + } + }, + diskCount: { + serializedName: "diskCount", + type: { + name: "Number" + } + }, + diskSizeGB: { + serializedName: "diskSizeGB", + type: { + name: "Number" + } + }, + diskIopsReadWrite: { + serializedName: "diskIopsReadWrite", + type: { + name: "Number" + } + }, + diskMBpsReadWrite: { + serializedName: "diskMBpsReadWrite", + type: { + name: "Number" + } + }, + diskStorageType: { + serializedName: "diskStorageType", + type: { + name: "String" + } + } + } + } +}; + +export const SAPAvailabilityZoneDetailsRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPAvailabilityZoneDetailsRequest", + modelProperties: { + appLocation: { + serializedName: "appLocation", + required: true, + type: { + name: "String" + } + }, + sapProduct: { + serializedName: "sapProduct", + required: true, + type: { + name: "String" + } + }, + databaseType: { + serializedName: "databaseType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SAPAvailabilityZoneDetailsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPAvailabilityZoneDetailsResult", + modelProperties: { + availabilityZonePairs: { + serializedName: "availabilityZonePairs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPAvailabilityZonePair" + } + } + } + } + } + } +}; + +export const SAPAvailabilityZonePair: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPAvailabilityZonePair", + modelProperties: { + zoneA: { + serializedName: "zoneA", + type: { + name: "Number" + } + }, + zoneB: { + serializedName: "zoneB", + type: { + name: "Number" + } + } + } + } +}; + +export const SAPConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPConfiguration", + uberParent: "SAPConfiguration", + polymorphicDiscriminator: { + serializedName: "configurationType", + clientName: "configurationType" + }, + modelProperties: { + configurationType: { + serializedName: "configurationType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SAPVirtualInstanceError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPVirtualInstanceError", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ErrorDefinition" + } + } + } + } +}; + +export const ErrorDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDefinition", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDefinition" + } + } + } + } + } + } +}; + +export const UpdateSAPVirtualInstanceRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSAPVirtualInstanceRequest", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "UserAssignedServiceIdentity" + } + } + } + } +}; + +export const OperationStatusResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationStatusResult", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + percentComplete: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + operations: { + serializedName: "operations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationStatusResult" + } + } + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const SAPVirtualInstanceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPVirtualInstanceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPVirtualInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const MessageServerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MessageServerProperties", + modelProperties: { + msPort: { + serializedName: "msPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + internalMsPort: { + serializedName: "internalMsPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + httpPort: { + serializedName: "httpPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + httpsPort: { + serializedName: "httpsPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + hostname: { + serializedName: "hostname", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + readOnly: true, + type: { + name: "String" + } + }, + health: { + serializedName: "health", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const EnqueueServerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnqueueServerProperties", + modelProperties: { + hostname: { + serializedName: "hostname", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + readOnly: true, + type: { + name: "String" + } + }, + port: { + serializedName: "port", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + health: { + serializedName: "health", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GatewayServerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayServerProperties", + modelProperties: { + port: { + serializedName: "port", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + health: { + serializedName: "health", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const EnqueueReplicationServerProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnqueueReplicationServerProperties", + modelProperties: { + ersVersion: { + serializedName: "ersVersion", + readOnly: true, + type: { + name: "String" + } + }, + instanceNo: { + serializedName: "instanceNo", + readOnly: true, + type: { + name: "String" + } + }, + hostname: { + serializedName: "hostname", + readOnly: true, + type: { + name: "String" + } + }, + kernelVersion: { + serializedName: "kernelVersion", + readOnly: true, + type: { + name: "String" + } + }, + kernelPatch: { + serializedName: "kernelPatch", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + readOnly: true, + type: { + name: "String" + } + }, + health: { + serializedName: "health", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CentralServerVmDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CentralServerVmDetails", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + virtualMachineId: { + serializedName: "virtualMachineId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const UpdateSAPCentralInstanceRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSAPCentralInstanceRequest", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const SAPCentralInstanceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPCentralInstanceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPCentralServerInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseVmDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseVmDetails", + modelProperties: { + virtualMachineId: { + serializedName: "virtualMachineId", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const UpdateSAPDatabaseInstanceRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSAPDatabaseInstanceRequest", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const SAPDatabaseInstanceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPDatabaseInstanceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPDatabaseInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateSAPApplicationInstanceRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateSAPApplicationInstanceRequest", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const SAPApplicationServerInstanceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPApplicationServerInstanceList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SAPApplicationServerInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StopRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StopRequest", + modelProperties: { + hardStop: { + defaultValue: false, + serializedName: "hardStop", + type: { + name: "Boolean" + } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MonitorListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MonitorListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Monitor" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + }, + innerError: { + serializedName: "innerError", + type: { + name: "Composite", + className: "ErrorInnerError" + } + } + } + } +}; + +export const ErrorInnerError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorInnerError", + modelProperties: { + innerError: { + serializedName: "innerError", + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + } +}; + +export const Tags: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Tags", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ProviderInstanceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProviderInstanceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProviderInstance" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProviderSpecificProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProviderSpecificProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: { + serializedName: "providerType", + clientName: "providerType" + }, + modelProperties: { + providerType: { + serializedName: "providerType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SkusListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkusListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuDefinition" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SkuDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuDefinition", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + locations: { + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locationInfo: { + serializedName: "locationInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuLocationAndZones" + } + } + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + costs: { + serializedName: "costs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCost" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCapability" + } + } + } + }, + restrictions: { + serializedName: "restrictions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuRestriction" + } + } + } + } + } + } +}; + +export const SkuLocationAndZones: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuLocationAndZones", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + zones: { + serializedName: "zones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zoneDetails: { + serializedName: "zoneDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuZoneDetail" + } + } + } + }, + extendedLocations: { + serializedName: "extendedLocations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const SkuZoneDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuZoneDetail", + modelProperties: { + zones: { + serializedName: "zones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCapability" + } + } + } + } + } + } +}; + +export const SkuCapability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuCapability", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const SkuCost: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuCost", + modelProperties: { + meterId: { + serializedName: "meterId", + type: { + name: "String" + } + }, + quantity: { + serializedName: "quantity", + type: { + name: "Number" + } + }, + extendedUnit: { + serializedName: "extendedUnit", + type: { + name: "String" + } + } + } + } +}; + +export const SkuRestriction: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuRestriction", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + values: { + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + restrictionInfo: { + serializedName: "restrictionInfo", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + reasonCode: { + serializedName: "reasonCode", + type: { + name: "String" + } + } + } + } +}; + +export const ImageReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageReference", + 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" + } + }, + sharedGalleryImageId: { + serializedName: "sharedGalleryImageId", + type: { + name: "String" + } + } + } + } +}; + +export const OSConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSConfiguration", + uberParent: "OSConfiguration", + polymorphicDiscriminator: { + serializedName: "osType", + clientName: "osType" + }, + modelProperties: { + osType: { + serializedName: "osType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SshPublicKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshPublicKey", + modelProperties: { + keyData: { + serializedName: "keyData", + type: { + name: "String" + } + } + } + } +}; + +export const SshConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshConfiguration", + modelProperties: { + publicKeys: { + serializedName: "publicKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SshPublicKey" + } + } + } + } + } + } +}; + +export const SshKeyPair: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshKeyPair", + modelProperties: { + publicKey: { + serializedName: "publicKey", + type: { + name: "String" + } + }, + privateKey: { + serializedName: "privateKey", + type: { + name: "String" + } + } + } + } +}; + +export const OSProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSProfile", + modelProperties: { + adminUsername: { + serializedName: "adminUsername", + type: { + name: "String" + } + }, + adminPassword: { + serializedName: "adminPassword", + type: { + name: "String" + } + }, + osConfiguration: { + serializedName: "osConfiguration", + type: { + name: "Composite", + className: "OSConfiguration" + } + } + } + } +}; + +export const VirtualMachineConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualMachineConfiguration", + modelProperties: { + vmSize: { + serializedName: "vmSize", + required: true, + type: { + name: "String" + } + }, + imageReference: { + serializedName: "imageReference", + type: { + name: "Composite", + className: "ImageReference" + } + }, + osProfile: { + serializedName: "osProfile", + type: { + name: "Composite", + className: "OSProfile" + } + } + } + } +}; + +export const NetworkConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkConfiguration", + modelProperties: { + isSecondaryIpEnabled: { + defaultValue: false, + serializedName: "isSecondaryIpEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const InfrastructureConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InfrastructureConfiguration", + uberParent: "InfrastructureConfiguration", + polymorphicDiscriminator: { + serializedName: "deploymentType", + clientName: "deploymentType" + }, + modelProperties: { + deploymentType: { + serializedName: "deploymentType", + required: true, + type: { + name: "String" + } + }, + appResourceGroup: { + serializedName: "appResourceGroup", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CentralServerConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CentralServerConfiguration", + modelProperties: { + subnetId: { + serializedName: "subnetId", + required: true, + type: { + name: "String" + } + }, + virtualMachineConfiguration: { + serializedName: "virtualMachineConfiguration", + type: { + name: "Composite", + className: "VirtualMachineConfiguration" + } + }, + instanceCount: { + serializedName: "instanceCount", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const DatabaseConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseConfiguration", + modelProperties: { + databaseType: { + serializedName: "databaseType", + type: { + name: "String" + } + }, + subnetId: { + serializedName: "subnetId", + required: true, + type: { + name: "String" + } + }, + virtualMachineConfiguration: { + serializedName: "virtualMachineConfiguration", + type: { + name: "Composite", + className: "VirtualMachineConfiguration" + } + }, + instanceCount: { + serializedName: "instanceCount", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ApplicationServerConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationServerConfiguration", + modelProperties: { + subnetId: { + serializedName: "subnetId", + required: true, + type: { + name: "String" + } + }, + virtualMachineConfiguration: { + serializedName: "virtualMachineConfiguration", + type: { + name: "Composite", + className: "VirtualMachineConfiguration" + } + }, + instanceCount: { + serializedName: "instanceCount", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const HighAvailabilityConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HighAvailabilityConfiguration", + modelProperties: { + highAvailabilityType: { + serializedName: "highAvailabilityType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SoftwareConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SoftwareConfiguration", + uberParent: "SoftwareConfiguration", + polymorphicDiscriminator: { + serializedName: "softwareInstallationType", + clientName: "softwareInstallationType" + }, + modelProperties: { + softwareInstallationType: { + serializedName: "softwareInstallationType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const HighAvailabilitySoftwareConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HighAvailabilitySoftwareConfiguration", + modelProperties: { + fencingClientId: { + serializedName: "fencingClientId", + required: true, + type: { + name: "String" + } + }, + fencingClientPassword: { + serializedName: "fencingClientPassword", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const OsSapConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OsSapConfiguration", + modelProperties: { + deployerVmPackages: { + serializedName: "deployerVmPackages", + type: { + name: "Composite", + className: "DeployerVmPackages" + } + }, + sapFqdn: { + serializedName: "sapFqdn", + type: { + name: "String" + } + } + } + } +}; + +export const DeployerVmPackages: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeployerVmPackages", + modelProperties: { + url: { + serializedName: "url", + type: { + name: "String" + } + }, + storageAccountId: { + serializedName: "storageAccountId", + type: { + name: "String" + } + } + } + } +}; + +export const OperationsDisplayDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationsDisplayDefinition", + modelProperties: { + provider: { + serializedName: "provider", + required: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + required: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const OperationsDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationsDefinition", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationsDefinitionDisplay" + } + }, + actionType: { + serializedName: "actionType", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "any" + } + } + } + } +}; + +export const OperationsDefinitionArrayResponseWithContinuation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationsDefinitionArrayResponseWithContinuation", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationsDefinition" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RestrictionInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestrictionInfo", + modelProperties: { + locations: { + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zones: { + serializedName: "zones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SkuCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuCapacity", + modelProperties: { + minimum: { + serializedName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + type: { + name: "Number" + } + }, + default: { + serializedName: "default", + type: { + name: "Number" + } + }, + scaleType: { + serializedName: "scaleType", + type: { + name: "String" + } + } + } + } +}; + +export const VmssNodesProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmssNodesProfile", + modelProperties: { + ...NodeProfile.type.modelProperties, + autoScaleMinCount: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "autoScaleMinCount", + type: { + name: "Number" + } + }, + autoScaleMaxCount: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "autoScaleMaxCount", + type: { + name: "Number" + } + } + } + } +}; + +export const SearchProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SearchProfile", + modelProperties: { + ...NodeProfile.type.modelProperties, + searchType: { + serializedName: "searchType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const PhpWorkloadResourceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhpWorkloadResourceIdentity", + modelProperties: { + ...UserAssignedServiceIdentity.type.modelProperties + } + } +}; + +export const PatchResourceRequestBodyIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchResourceRequestBodyIdentity", + modelProperties: { + ...UserAssignedServiceIdentity.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const OperationsContent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationsContent", + modelProperties: { + ...Resource.type.modelProperties, + namePropertiesName: { + serializedName: "properties.name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "properties.isDataAction", + type: { + name: "Boolean" + } + }, + origin: { + serializedName: "properties.origin", + type: { + name: "String" + } + }, + display: { + serializedName: "properties.display", + type: { + name: "Composite", + className: "OperationsDefinitionDisplay" + } + }, + actionType: { + serializedName: "properties.actionType", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties.properties", + type: { + name: "any" + } + } + } + } +}; + +export const SingleServerRecommendationResult: coreClient.CompositeMapper = { + serializedName: "SingleServer", + type: { + name: "Composite", + className: "SingleServerRecommendationResult", + uberParent: "SAPSizingRecommendationResult", + polymorphicDiscriminator: + SAPSizingRecommendationResult.type.polymorphicDiscriminator, + modelProperties: { + ...SAPSizingRecommendationResult.type.modelProperties, + vmSku: { + serializedName: "vmSku", + type: { + name: "String" + } + } + } + } +}; + +export const ThreeTierRecommendationResult: coreClient.CompositeMapper = { + serializedName: "ThreeTier", + type: { + name: "Composite", + className: "ThreeTierRecommendationResult", + uberParent: "SAPSizingRecommendationResult", + polymorphicDiscriminator: + SAPSizingRecommendationResult.type.polymorphicDiscriminator, + modelProperties: { + ...SAPSizingRecommendationResult.type.modelProperties, + dbVmSku: { + serializedName: "dbVmSku", + type: { + name: "String" + } + }, + databaseInstanceCount: { + serializedName: "databaseInstanceCount", + type: { + name: "Number" + } + }, + centralServerVmSku: { + serializedName: "centralServerVmSku", + type: { + name: "String" + } + }, + centralServerInstanceCount: { + serializedName: "centralServerInstanceCount", + type: { + name: "Number" + } + }, + applicationServerVmSku: { + serializedName: "applicationServerVmSku", + type: { + name: "String" + } + }, + applicationServerInstanceCount: { + serializedName: "applicationServerInstanceCount", + type: { + name: "Number" + } + } + } + } +}; + +export const DiscoveryConfiguration: coreClient.CompositeMapper = { + serializedName: "Discovery", + type: { + name: "Composite", + className: "DiscoveryConfiguration", + uberParent: "SAPConfiguration", + polymorphicDiscriminator: SAPConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...SAPConfiguration.type.modelProperties, + centralServerVmId: { + serializedName: "centralServerVmId", + type: { + name: "String" + } + }, + appLocation: { + serializedName: "appLocation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DeploymentConfiguration: coreClient.CompositeMapper = { + serializedName: "Deployment", + type: { + name: "Composite", + className: "DeploymentConfiguration", + uberParent: "SAPConfiguration", + polymorphicDiscriminator: SAPConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...SAPConfiguration.type.modelProperties, + appLocation: { + serializedName: "appLocation", + type: { + name: "String" + } + }, + infrastructureConfiguration: { + serializedName: "infrastructureConfiguration", + type: { + name: "Composite", + className: "InfrastructureConfiguration" + } + }, + softwareConfiguration: { + serializedName: "softwareConfiguration", + type: { + name: "Composite", + className: "SoftwareConfiguration" + } + } + } + } +}; + +export const DeploymentWithOSConfiguration: coreClient.CompositeMapper = { + serializedName: "DeploymentWithOSConfig", + type: { + name: "Composite", + className: "DeploymentWithOSConfiguration", + uberParent: "SAPConfiguration", + polymorphicDiscriminator: SAPConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...SAPConfiguration.type.modelProperties, + appLocation: { + serializedName: "appLocation", + type: { + name: "String" + } + }, + infrastructureConfiguration: { + serializedName: "infrastructureConfiguration", + type: { + name: "Composite", + className: "InfrastructureConfiguration" + } + }, + softwareConfiguration: { + serializedName: "softwareConfiguration", + type: { + name: "Composite", + className: "SoftwareConfiguration" + } + }, + osSapConfiguration: { + serializedName: "osSapConfiguration", + type: { + name: "Composite", + className: "OsSapConfiguration" + } + } + } + } +}; + +export const MonitorPropertiesErrors: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MonitorPropertiesErrors", + modelProperties: { + ...ErrorModel.type.modelProperties + } + } +}; + +export const ProviderInstancePropertiesErrors: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProviderInstancePropertiesErrors", + modelProperties: { + ...ErrorModel.type.modelProperties + } + } +}; + +export const HanaDbProviderInstanceProperties: coreClient.CompositeMapper = { + serializedName: "SapHana", + type: { + name: "Composite", + className: "HanaDbProviderInstanceProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: + ProviderSpecificProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProviderSpecificProperties.type.modelProperties, + hostname: { + serializedName: "hostname", + type: { + name: "String" + } + }, + dbName: { + serializedName: "dbName", + type: { + name: "String" + } + }, + sqlPort: { + serializedName: "sqlPort", + type: { + name: "String" + } + }, + instanceNumber: { + serializedName: "instanceNumber", + type: { + name: "String" + } + }, + dbUsername: { + serializedName: "dbUsername", + type: { + name: "String" + } + }, + dbPassword: { + serializedName: "dbPassword", + type: { + name: "String" + } + }, + dbPasswordUri: { + serializedName: "dbPasswordUri", + type: { + name: "String" + } + }, + dbSslCertificateUri: { + serializedName: "dbSslCertificateUri", + type: { + name: "String" + } + }, + sslHostNameInCertificate: { + serializedName: "sslHostNameInCertificate", + type: { + name: "String" + } + } + } + } +}; + +export const SapNetWeaverProviderInstanceProperties: coreClient.CompositeMapper = { + serializedName: "SapNetWeaver", + type: { + name: "Composite", + className: "SapNetWeaverProviderInstanceProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: + ProviderSpecificProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProviderSpecificProperties.type.modelProperties, + sapSid: { + serializedName: "sapSid", + type: { + name: "String" + } + }, + sapHostname: { + serializedName: "sapHostname", + type: { + name: "String" + } + }, + sapInstanceNr: { + serializedName: "sapInstanceNr", + type: { + name: "String" + } + }, + sapHostFileEntries: { + serializedName: "sapHostFileEntries", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + sapUsername: { + serializedName: "sapUsername", + type: { + name: "String" + } + }, + sapPassword: { + serializedName: "sapPassword", + type: { + name: "String" + } + }, + sapPasswordUri: { + serializedName: "sapPasswordUri", + type: { + name: "String" + } + }, + sapClientId: { + serializedName: "sapClientId", + type: { + name: "String" + } + }, + sapPortNumber: { + serializedName: "sapPortNumber", + type: { + name: "String" + } + }, + sapSslCertificateUri: { + serializedName: "sapSslCertificateUri", + type: { + name: "String" + } + } + } + } +}; + +export const PrometheusOSProviderInstanceProperties: coreClient.CompositeMapper = { + serializedName: "PrometheusOS", + type: { + name: "Composite", + className: "PrometheusOSProviderInstanceProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: + ProviderSpecificProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProviderSpecificProperties.type.modelProperties, + prometheusUrl: { + serializedName: "prometheusUrl", + type: { + name: "String" + } + } + } + } +}; + +export const DB2ProviderInstanceProperties: coreClient.CompositeMapper = { + serializedName: "Db2", + type: { + name: "Composite", + className: "DB2ProviderInstanceProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: + ProviderSpecificProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProviderSpecificProperties.type.modelProperties, + hostname: { + serializedName: "hostname", + type: { + name: "String" + } + }, + dbName: { + serializedName: "dbName", + type: { + name: "String" + } + }, + dbPort: { + serializedName: "dbPort", + type: { + name: "String" + } + }, + dbUsername: { + serializedName: "dbUsername", + type: { + name: "String" + } + }, + dbPassword: { + serializedName: "dbPassword", + type: { + name: "String" + } + }, + dbPasswordUri: { + serializedName: "dbPasswordUri", + type: { + name: "String" + } + }, + sapSid: { + serializedName: "sapSid", + type: { + name: "String" + } + } + } + } +}; + +export const PrometheusHaClusterProviderInstanceProperties: coreClient.CompositeMapper = { + serializedName: "PrometheusHaCluster", + type: { + name: "Composite", + className: "PrometheusHaClusterProviderInstanceProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: + ProviderSpecificProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProviderSpecificProperties.type.modelProperties, + prometheusUrl: { + serializedName: "prometheusUrl", + type: { + name: "String" + } + }, + hostname: { + serializedName: "hostname", + type: { + name: "String" + } + }, + sid: { + serializedName: "sid", + type: { + name: "String" + } + }, + clusterName: { + serializedName: "clusterName", + type: { + name: "String" + } + } + } + } +}; + +export const MsSqlServerProviderInstanceProperties: coreClient.CompositeMapper = { + serializedName: "MsSqlServer", + type: { + name: "Composite", + className: "MsSqlServerProviderInstanceProperties", + uberParent: "ProviderSpecificProperties", + polymorphicDiscriminator: + ProviderSpecificProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ProviderSpecificProperties.type.modelProperties, + hostname: { + serializedName: "hostname", + type: { + name: "String" + } + }, + dbPort: { + serializedName: "dbPort", + type: { + name: "String" + } + }, + dbUsername: { + serializedName: "dbUsername", + type: { + name: "String" + } + }, + dbPassword: { + serializedName: "dbPassword", + type: { + name: "String" + } + }, + dbPasswordUri: { + serializedName: "dbPasswordUri", + type: { + name: "String" + } + }, + sapSid: { + serializedName: "sapSid", + type: { + name: "String" + } + } + } + } +}; + +export const WindowsConfiguration: coreClient.CompositeMapper = { + serializedName: "Windows", + type: { + name: "Composite", + className: "WindowsConfiguration", + uberParent: "OSConfiguration", + polymorphicDiscriminator: OSConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...OSConfiguration.type.modelProperties + } + } +}; + +export const LinuxConfiguration: coreClient.CompositeMapper = { + serializedName: "Linux", + type: { + name: "Composite", + className: "LinuxConfiguration", + uberParent: "OSConfiguration", + polymorphicDiscriminator: OSConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...OSConfiguration.type.modelProperties, + disablePasswordAuthentication: { + serializedName: "disablePasswordAuthentication", + type: { + name: "Boolean" + } + }, + ssh: { + serializedName: "ssh", + type: { + name: "Composite", + className: "SshConfiguration" + } + }, + sshKeyPair: { + serializedName: "sshKeyPair", + type: { + name: "Composite", + className: "SshKeyPair" + } + } + } + } +}; + +export const SingleServerConfiguration: coreClient.CompositeMapper = { + serializedName: "SingleServer", + type: { + name: "Composite", + className: "SingleServerConfiguration", + uberParent: "InfrastructureConfiguration", + polymorphicDiscriminator: + InfrastructureConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...InfrastructureConfiguration.type.modelProperties, + networkConfiguration: { + serializedName: "networkConfiguration", + type: { + name: "Composite", + className: "NetworkConfiguration" + } + }, + databaseType: { + serializedName: "databaseType", + type: { + name: "String" + } + }, + subnetId: { + serializedName: "subnetId", + required: true, + type: { + name: "String" + } + }, + virtualMachineConfiguration: { + serializedName: "virtualMachineConfiguration", + type: { + name: "Composite", + className: "VirtualMachineConfiguration" + } + } + } + } +}; + +export const ThreeTierConfiguration: coreClient.CompositeMapper = { + serializedName: "ThreeTier", + type: { + name: "Composite", + className: "ThreeTierConfiguration", + uberParent: "InfrastructureConfiguration", + polymorphicDiscriminator: + InfrastructureConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...InfrastructureConfiguration.type.modelProperties, + networkConfiguration: { + serializedName: "networkConfiguration", + type: { + name: "Composite", + className: "NetworkConfiguration" + } + }, + centralServer: { + serializedName: "centralServer", + type: { + name: "Composite", + className: "CentralServerConfiguration" + } + }, + applicationServer: { + serializedName: "applicationServer", + type: { + name: "Composite", + className: "ApplicationServerConfiguration" + } + }, + databaseServer: { + serializedName: "databaseServer", + type: { + name: "Composite", + className: "DatabaseConfiguration" + } + }, + highAvailabilityConfig: { + serializedName: "highAvailabilityConfig", + type: { + name: "Composite", + className: "HighAvailabilityConfiguration" + } + } + } + } +}; + +export const ServiceInitiatedSoftwareConfiguration: coreClient.CompositeMapper = { + serializedName: "ServiceInitiated", + type: { + name: "Composite", + className: "ServiceInitiatedSoftwareConfiguration", + uberParent: "SoftwareConfiguration", + polymorphicDiscriminator: + SoftwareConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...SoftwareConfiguration.type.modelProperties, + bomUrl: { + serializedName: "bomUrl", + required: true, + type: { + name: "String" + } + }, + softwareVersion: { + serializedName: "softwareVersion", + required: true, + type: { + name: "String" + } + }, + sapBitsStorageAccountId: { + serializedName: "sapBitsStorageAccountId", + required: true, + type: { + name: "String" + } + }, + sapFqdn: { + serializedName: "sapFqdn", + required: true, + type: { + name: "String" + } + }, + sshPrivateKey: { + serializedName: "sshPrivateKey", + required: true, + type: { + name: "String" + } + }, + highAvailabilitySoftwareConfiguration: { + serializedName: "highAvailabilitySoftwareConfiguration", + type: { + name: "Composite", + className: "HighAvailabilitySoftwareConfiguration" + } + } + } + } +}; + +export const SAPInstallWithoutOSConfigSoftwareConfiguration: coreClient.CompositeMapper = { + serializedName: "SAPInstallWithoutOSConfig", + type: { + name: "Composite", + className: "SAPInstallWithoutOSConfigSoftwareConfiguration", + uberParent: "SoftwareConfiguration", + polymorphicDiscriminator: + SoftwareConfiguration.type.polymorphicDiscriminator, + modelProperties: { + ...SoftwareConfiguration.type.modelProperties, + bomUrl: { + serializedName: "bomUrl", + required: true, + type: { + name: "String" + } + }, + sapBitsStorageAccountId: { + serializedName: "sapBitsStorageAccountId", + required: true, + type: { + name: "String" + } + }, + softwareVersion: { + serializedName: "softwareVersion", + required: true, + type: { + name: "String" + } + }, + highAvailabilitySoftwareConfiguration: { + serializedName: "highAvailabilitySoftwareConfiguration", + type: { + name: "Composite", + className: "HighAvailabilitySoftwareConfiguration" + } + } + } + } +}; + +export const OperationsDefinitionDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationsDefinitionDisplay", + modelProperties: { + ...OperationsDisplayDefinition.type.modelProperties + } + } +}; + +export const PhpWorkloadResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhpWorkloadResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + kind: { + serializedName: "kind", + required: true, + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "PhpWorkloadResourceIdentity" + } + }, + appLocation: { + serializedName: "properties.appLocation", + type: { + name: "String" + } + }, + managedResourceGroupConfiguration: { + serializedName: "properties.managedResourceGroupConfiguration", + type: { + name: "Composite", + className: "ManagedRGConfiguration" + } + }, + adminUserProfile: { + serializedName: "properties.adminUserProfile", + type: { + name: "Composite", + className: "UserProfile" + } + }, + webNodesProfile: { + serializedName: "properties.webNodesProfile", + type: { + name: "Composite", + className: "VmssNodesProfile" + } + }, + controllerProfile: { + serializedName: "properties.controllerProfile", + type: { + name: "Composite", + className: "NodeProfile" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + }, + databaseProfile: { + serializedName: "properties.databaseProfile", + type: { + name: "Composite", + className: "DatabaseProfile" + } + }, + siteProfile: { + serializedName: "properties.siteProfile", + type: { + name: "Composite", + className: "SiteProfile" + } + }, + fileshareProfile: { + serializedName: "properties.fileshareProfile", + type: { + name: "Composite", + className: "FileshareProfile" + } + }, + phpProfile: { + serializedName: "properties.phpProfile", + type: { + name: "Composite", + className: "PhpProfile" + } + }, + searchProfile: { + serializedName: "properties.searchProfile", + type: { + name: "Composite", + className: "SearchProfile" + } + }, + cacheProfile: { + serializedName: "properties.cacheProfile", + type: { + name: "Composite", + className: "CacheProfile" + } + }, + backupProfile: { + serializedName: "properties.backupProfile", + type: { + name: "Composite", + className: "BackupProfile" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SAPVirtualInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPVirtualInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "UserAssignedServiceIdentity" + } + }, + environment: { + serializedName: "properties.environment", + required: true, + type: { + name: "String" + } + }, + sapProduct: { + serializedName: "properties.sapProduct", + required: true, + type: { + name: "String" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "SAPConfiguration" + } + }, + managedResourceGroupConfiguration: { + serializedName: "properties.managedResourceGroupConfiguration", + type: { + name: "Composite", + className: "ManagedRGConfiguration" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + health: { + serializedName: "properties.health", + readOnly: true, + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Composite", + className: "SAPVirtualInstanceError" + } + } + } + } +}; + +export const SAPCentralServerInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPCentralServerInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + instanceNo: { + serializedName: "properties.instanceNo", + readOnly: true, + type: { + name: "String" + } + }, + subnet: { + serializedName: "properties.subnet", + readOnly: true, + type: { + name: "String" + } + }, + messageServerProperties: { + serializedName: "properties.messageServerProperties", + type: { + name: "Composite", + className: "MessageServerProperties" + } + }, + enqueueServerProperties: { + serializedName: "properties.enqueueServerProperties", + type: { + name: "Composite", + className: "EnqueueServerProperties" + } + }, + gatewayServerProperties: { + serializedName: "properties.gatewayServerProperties", + type: { + name: "Composite", + className: "GatewayServerProperties" + } + }, + enqueueReplicationServerProperties: { + serializedName: "properties.enqueueReplicationServerProperties", + type: { + name: "Composite", + className: "EnqueueReplicationServerProperties" + } + }, + kernelVersion: { + serializedName: "properties.kernelVersion", + readOnly: true, + nullable: true, + type: { + name: "String" + } + }, + kernelPatch: { + serializedName: "properties.kernelPatch", + readOnly: true, + nullable: true, + type: { + name: "String" + } + }, + vmDetails: { + serializedName: "properties.vmDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CentralServerVmDetails" + } + } + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + health: { + serializedName: "properties.health", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Composite", + className: "SAPVirtualInstanceError" + } + } + } + } +}; + +export const SAPDatabaseInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPDatabaseInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + subnet: { + serializedName: "properties.subnet", + readOnly: true, + type: { + name: "String" + } + }, + databaseSid: { + serializedName: "properties.databaseSid", + readOnly: true, + type: { + name: "String" + } + }, + databaseType: { + serializedName: "properties.databaseType", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "properties.ipAddress", + readOnly: true, + type: { + name: "String" + } + }, + vmDetails: { + serializedName: "properties.vmDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseVmDetails" + } + } + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Composite", + className: "SAPVirtualInstanceError" + } + } + } + } +}; + +export const SAPApplicationServerInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SAPApplicationServerInstance", + modelProperties: { + ...TrackedResource.type.modelProperties, + instanceNo: { + serializedName: "properties.instanceNo", + readOnly: true, + type: { + name: "String" + } + }, + subnet: { + serializedName: "properties.subnet", + readOnly: true, + type: { + name: "String" + } + }, + hostname: { + serializedName: "properties.hostname", + readOnly: true, + type: { + name: "String" + } + }, + kernelVersion: { + serializedName: "properties.kernelVersion", + readOnly: true, + type: { + name: "String" + } + }, + kernelPatch: { + serializedName: "properties.kernelPatch", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "properties.ipAddress", + readOnly: true, + type: { + name: "String" + } + }, + gatewayPort: { + serializedName: "properties.gatewayPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + icmHttpPort: { + serializedName: "properties.icmHttpPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + icmHttpsPort: { + serializedName: "properties.icmHttpsPort", + readOnly: true, + nullable: true, + type: { + name: "Number" + } + }, + virtualMachineId: { + serializedName: "properties.virtualMachineId", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + health: { + serializedName: "properties.health", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Composite", + className: "SAPVirtualInstanceError" + } + } + } + } +}; + +export const Monitor: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Monitor", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Composite", + className: "MonitorPropertiesErrors" + } + }, + appLocation: { + serializedName: "properties.appLocation", + type: { + name: "String" + } + }, + routingPreference: { + serializedName: "properties.routingPreference", + type: { + name: "String" + } + }, + managedResourceGroupConfiguration: { + serializedName: "properties.managedResourceGroupConfiguration", + type: { + name: "Composite", + className: "ManagedRGConfiguration" + } + }, + logAnalyticsWorkspaceArmId: { + serializedName: "properties.logAnalyticsWorkspaceArmId", + type: { + name: "String" + } + }, + monitorSubnet: { + serializedName: "properties.monitorSubnet", + type: { + name: "String" + } + }, + msiArmId: { + serializedName: "properties.msiArmId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WordpressInstanceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WordpressInstanceResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + databaseUser: { + serializedName: "properties.databaseUser", + type: { + name: "String" + } + }, + siteUrl: { + serializedName: "properties.siteUrl", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ProviderInstance: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProviderInstance", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + errors: { + serializedName: "properties.errors", + type: { + name: "Composite", + className: "ProviderInstancePropertiesErrors" + } + }, + providerSettings: { + serializedName: "properties.providerSettings", + type: { + name: "Composite", + className: "ProviderSpecificProperties" + } + } + } + } +}; + +export let discriminators = { + SAPSizingRecommendationResult: SAPSizingRecommendationResult, + SAPConfiguration: SAPConfiguration, + ProviderSpecificProperties: ProviderSpecificProperties, + OSConfiguration: OSConfiguration, + InfrastructureConfiguration: InfrastructureConfiguration, + SoftwareConfiguration: SoftwareConfiguration, + "SAPSizingRecommendationResult.SingleServer": SingleServerRecommendationResult, + "SAPSizingRecommendationResult.ThreeTier": ThreeTierRecommendationResult, + "SAPConfiguration.Discovery": DiscoveryConfiguration, + "SAPConfiguration.Deployment": DeploymentConfiguration, + "SAPConfiguration.DeploymentWithOSConfig": DeploymentWithOSConfiguration, + "ProviderSpecificProperties.SapHana": HanaDbProviderInstanceProperties, + "ProviderSpecificProperties.SapNetWeaver": SapNetWeaverProviderInstanceProperties, + "ProviderSpecificProperties.PrometheusOS": PrometheusOSProviderInstanceProperties, + "ProviderSpecificProperties.Db2": DB2ProviderInstanceProperties, + "ProviderSpecificProperties.PrometheusHaCluster": PrometheusHaClusterProviderInstanceProperties, + "ProviderSpecificProperties.MsSqlServer": MsSqlServerProviderInstanceProperties, + "OSConfiguration.Windows": WindowsConfiguration, + "OSConfiguration.Linux": LinuxConfiguration, + "InfrastructureConfiguration.SingleServer": SingleServerConfiguration, + "InfrastructureConfiguration.ThreeTier": ThreeTierConfiguration, + "SoftwareConfiguration.ServiceInitiated": ServiceInitiatedSoftwareConfiguration, + "SoftwareConfiguration.SAPInstallWithoutOSConfig": SAPInstallWithoutOSConfigSoftwareConfiguration +}; diff --git a/sdk/workloads/arm-workloads/src/models/parameters.ts b/sdk/workloads/arm-workloads/src/models/parameters.ts new file mode 100644 index 000000000000..2ad53cc95df3 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/models/parameters.ts @@ -0,0 +1,322 @@ +/* + * 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 { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + PhpWorkloadResource as PhpWorkloadResourceMapper, + PatchResourceRequestBody as PatchResourceRequestBodyMapper, + WordpressInstanceResource as WordpressInstanceResourceMapper, + SAPSizingRecommendationRequest as SAPSizingRecommendationRequestMapper, + SAPSupportedSkusRequest as SAPSupportedSkusRequestMapper, + SAPDiskConfigurationsRequest as SAPDiskConfigurationsRequestMapper, + SAPAvailabilityZoneDetailsRequest as SAPAvailabilityZoneDetailsRequestMapper, + SAPVirtualInstance as SAPVirtualInstanceMapper, + UpdateSAPVirtualInstanceRequest as UpdateSAPVirtualInstanceRequestMapper, + StopRequest as StopRequestMapper, + SAPCentralServerInstance as SAPCentralServerInstanceMapper, + UpdateSAPCentralInstanceRequest as UpdateSAPCentralInstanceRequestMapper, + SAPDatabaseInstance as SAPDatabaseInstanceMapper, + UpdateSAPDatabaseInstanceRequest as UpdateSAPDatabaseInstanceRequestMapper, + SAPApplicationServerInstance as SAPApplicationServerInstanceMapper, + UpdateSAPApplicationInstanceRequest as UpdateSAPApplicationInstanceRequestMapper, + Monitor as MonitorMapper, + Tags as TagsMapper, + ProviderInstance as ProviderInstanceMapper +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-12-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const phpWorkloadName: OperationURLParameter = { + parameterPath: "phpWorkloadName", + mapper: { + serializedName: "phpWorkloadName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const phpWorkloadResource: OperationParameter = { + parameterPath: "phpWorkloadResource", + mapper: PhpWorkloadResourceMapper +}; + +export const resourcePatchRequestBody: OperationParameter = { + parameterPath: "resourcePatchRequestBody", + mapper: PatchResourceRequestBodyMapper +}; + +export const deleteInfra: OperationQueryParameter = { + parameterPath: ["options", "deleteInfra"], + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "delete-infra", + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const wordpressInstanceResource: OperationParameter = { + parameterPath: "wordpressInstanceResource", + mapper: WordpressInstanceResourceMapper +}; + +export const sAPSizingRecommendation: OperationParameter = { + parameterPath: ["options", "sAPSizingRecommendation"], + mapper: SAPSizingRecommendationRequestMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; + +export const sAPSupportedSku: OperationParameter = { + parameterPath: ["options", "sAPSupportedSku"], + mapper: SAPSupportedSkusRequestMapper +}; + +export const sAPDiskConfigurations: OperationParameter = { + parameterPath: ["options", "sAPDiskConfigurations"], + mapper: SAPDiskConfigurationsRequestMapper +}; + +export const sAPAvailabilityZoneDetails: OperationParameter = { + parameterPath: ["options", "sAPAvailabilityZoneDetails"], + mapper: SAPAvailabilityZoneDetailsRequestMapper +}; + +export const body: OperationParameter = { + parameterPath: ["options", "body"], + mapper: SAPVirtualInstanceMapper +}; + +export const sapVirtualInstanceName: OperationURLParameter = { + parameterPath: "sapVirtualInstanceName", + mapper: { + serializedName: "sapVirtualInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const body1: OperationParameter = { + parameterPath: ["options", "body"], + mapper: UpdateSAPVirtualInstanceRequestMapper +}; + +export const body2: OperationParameter = { + parameterPath: ["options", "body"], + mapper: StopRequestMapper +}; + +export const centralInstanceName: OperationURLParameter = { + parameterPath: "centralInstanceName", + mapper: { + serializedName: "centralInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const body3: OperationParameter = { + parameterPath: ["options", "body"], + mapper: SAPCentralServerInstanceMapper +}; + +export const body4: OperationParameter = { + parameterPath: ["options", "body"], + mapper: UpdateSAPCentralInstanceRequestMapper +}; + +export const databaseInstanceName: OperationURLParameter = { + parameterPath: "databaseInstanceName", + mapper: { + serializedName: "databaseInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const body5: OperationParameter = { + parameterPath: ["options", "body"], + mapper: SAPDatabaseInstanceMapper +}; + +export const body6: OperationParameter = { + parameterPath: ["options", "body"], + mapper: UpdateSAPDatabaseInstanceRequestMapper +}; + +export const applicationInstanceName: OperationURLParameter = { + parameterPath: "applicationInstanceName", + mapper: { + serializedName: "applicationInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const body7: OperationParameter = { + parameterPath: ["options", "body"], + mapper: SAPApplicationServerInstanceMapper +}; + +export const body8: OperationParameter = { + parameterPath: ["options", "body"], + mapper: UpdateSAPApplicationInstanceRequestMapper +}; + +export const monitorName: OperationURLParameter = { + parameterPath: "monitorName", + mapper: { + serializedName: "monitorName", + required: true, + type: { + name: "String" + } + } +}; + +export const monitorParameter: OperationParameter = { + parameterPath: "monitorParameter", + mapper: MonitorMapper +}; + +export const tagsParameter: OperationParameter = { + parameterPath: "tagsParameter", + mapper: TagsMapper +}; + +export const providerInstanceName: OperationURLParameter = { + parameterPath: "providerInstanceName", + mapper: { + serializedName: "providerInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const providerInstanceParameter: OperationParameter = { + parameterPath: "providerInstanceParameter", + mapper: ProviderInstanceMapper +}; diff --git a/sdk/workloads/arm-workloads/src/operations/index.ts b/sdk/workloads/arm-workloads/src/operations/index.ts new file mode 100644 index 000000000000..2160f4f94b82 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/index.ts @@ -0,0 +1,18 @@ +/* + * 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 "./phpWorkloads"; +export * from "./wordpressInstances"; +export * from "./sAPVirtualInstances"; +export * from "./sAPCentralInstances"; +export * from "./sAPDatabaseInstances"; +export * from "./sAPApplicationServerInstances"; +export * from "./operations"; +export * from "./monitors"; +export * from "./providerInstances"; +export * from "./skus"; diff --git a/sdk/workloads/arm-workloads/src/operations/monitors.ts b/sdk/workloads/arm-workloads/src/operations/monitors.ts new file mode 100644 index 000000000000..fcd615930b07 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/monitors.ts @@ -0,0 +1,613 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Monitors } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Monitor, + MonitorsListNextOptionalParams, + MonitorsListOptionalParams, + MonitorsListByResourceGroupNextOptionalParams, + MonitorsListByResourceGroupOptionalParams, + MonitorsListResponse, + MonitorsListByResourceGroupResponse, + MonitorsGetOptionalParams, + MonitorsGetResponse, + MonitorsCreateOptionalParams, + MonitorsCreateResponse, + MonitorsDeleteOptionalParams, + MonitorsDeleteResponse, + Tags, + MonitorsUpdateOptionalParams, + MonitorsUpdateResponse, + MonitorsListNextResponse, + MonitorsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Monitors operations. */ +export class MonitorsImpl implements Monitors { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class Monitors class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Gets a list of SAP monitors in the specified subscription. The operations returns various properties + * of each SAP monitor. + * @param options The options parameters. + */ + public list( + options?: MonitorsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: MonitorsListOptionalParams + ): 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?: MonitorsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of SAP monitors in the specified resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: MonitorsListByResourceGroupOptionalParams + ): 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?: MonitorsListByResourceGroupOptionalParams + ): 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?: MonitorsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of SAP monitors in the specified subscription. The operations returns various properties + * of each SAP monitor. + * @param options The options parameters. + */ + private _list( + options?: MonitorsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Gets a list of SAP monitors in the specified resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: MonitorsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + monitorName: string, + options?: MonitorsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, options }, + getOperationSpec + ); + } + + /** + * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param monitorParameter Request body representing a SAP monitor + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + monitorName: string, + monitorParameter: Monitor, + options?: MonitorsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MonitorsCreateResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, monitorName, monitorParameter, options }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param monitorParameter Request body representing a SAP monitor + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + monitorName: string, + monitorParameter: Monitor, + options?: MonitorsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + monitorName, + monitorParameter, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + monitorName: string, + options?: MonitorsDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MonitorsDeleteResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, monitorName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + monitorName: string, + options?: MonitorsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + monitorName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP + * monitor name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param tagsParameter Request body that only contains the new Tags field + * @param options The options parameters. + */ + update( + resourceGroupName: string, + monitorName: string, + tagsParameter: Tags, + options?: MonitorsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, tagsParameter, options }, + updateOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: MonitorsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: MonitorsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/monitors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Monitor + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Monitor + }, + 201: { + bodyMapper: Mappers.Monitor + }, + 202: { + bodyMapper: Mappers.Monitor + }, + 204: { + bodyMapper: Mappers.Monitor + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.monitorParameter, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Monitor + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.tagsParameter, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitorListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/operations.ts b/sdk/workloads/arm-workloads/src/operations/operations.ts new file mode 100644 index 000000000000..1b82714897ee --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/operations.ts @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists all the available API operations under this PR + * @param options The options parameters. + */ + 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 || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all the available API operations under this PR + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Workloads/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/phpWorkloads.ts b/sdk/workloads/arm-workloads/src/operations/phpWorkloads.ts new file mode 100644 index 000000000000..3e1dd65a0243 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/phpWorkloads.ts @@ -0,0 +1,600 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PhpWorkloads } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + PhpWorkloadResource, + PhpWorkloadsListBySubscriptionNextOptionalParams, + PhpWorkloadsListBySubscriptionOptionalParams, + PhpWorkloadsListByResourceGroupNextOptionalParams, + PhpWorkloadsListByResourceGroupOptionalParams, + PhpWorkloadsListBySubscriptionResponse, + PhpWorkloadsListByResourceGroupResponse, + PhpWorkloadsGetOptionalParams, + PhpWorkloadsGetResponse, + PhpWorkloadsCreateOrUpdateOptionalParams, + PhpWorkloadsCreateOrUpdateResponse, + PatchResourceRequestBody, + PhpWorkloadsUpdateOptionalParams, + PhpWorkloadsUpdateResponse, + PhpWorkloadsDeleteOptionalParams, + PhpWorkloadsListBySubscriptionNextResponse, + PhpWorkloadsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing PhpWorkloads operations. */ +export class PhpWorkloadsImpl implements PhpWorkloads { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class PhpWorkloads class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists PHP workload resources for a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: PhpWorkloadsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: PhpWorkloadsListBySubscriptionOptionalParams + ): 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?: PhpWorkloadsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Lists PHP workload resources in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: PhpWorkloadsListByResourceGroupOptionalParams + ): 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?: PhpWorkloadsListByResourceGroupOptionalParams + ): 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?: PhpWorkloadsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists PHP workload resources for a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: PhpWorkloadsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Lists PHP workload resources in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: PhpWorkloadsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Gets the PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + phpWorkloadName: string, + options?: PhpWorkloadsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, phpWorkloadName, options }, + getOperationSpec + ); + } + + /** + * Create or updated PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param phpWorkloadResource Resource create or update request payload + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + phpWorkloadName: string, + phpWorkloadResource: PhpWorkloadResource, + options?: PhpWorkloadsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PhpWorkloadsCreateOrUpdateResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, phpWorkloadName, phpWorkloadResource, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or updated PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param phpWorkloadResource Resource create or update request payload + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + phpWorkloadName: string, + phpWorkloadResource: PhpWorkloadResource, + options?: PhpWorkloadsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + phpWorkloadName, + phpWorkloadResource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param resourcePatchRequestBody Workload resource update data + * @param options The options parameters. + */ + update( + resourceGroupName: string, + phpWorkloadName: string, + resourcePatchRequestBody: PatchResourceRequestBody, + options?: PhpWorkloadsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, phpWorkloadName, resourcePatchRequestBody, options }, + updateOperationSpec + ); + } + + /** + * Delete PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + phpWorkloadName: string, + options?: PhpWorkloadsDeleteOptionalParams + ): 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 LroImpl( + sendOperation, + { resourceGroupName, phpWorkloadName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + phpWorkloadName: string, + options?: PhpWorkloadsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + phpWorkloadName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: PhpWorkloadsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: PhpWorkloadsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/phpWorkloads", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResource + }, + 201: { + bodyMapper: Mappers.PhpWorkloadResource + }, + 202: { + bodyMapper: Mappers.PhpWorkloadResource + }, + 204: { + bodyMapper: Mappers.PhpWorkloadResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.phpWorkloadResource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.resourcePatchRequestBody, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.deleteInfra], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PhpWorkloadResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/providerInstances.ts b/sdk/workloads/arm-workloads/src/operations/providerInstances.ts new file mode 100644 index 000000000000..9ae7b7892b06 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/providerInstances.ts @@ -0,0 +1,496 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ProviderInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ProviderInstance, + ProviderInstancesListNextOptionalParams, + ProviderInstancesListOptionalParams, + ProviderInstancesListResponse, + ProviderInstancesGetOptionalParams, + ProviderInstancesGetResponse, + ProviderInstancesCreateOptionalParams, + ProviderInstancesCreateResponse, + ProviderInstancesDeleteOptionalParams, + ProviderInstancesDeleteResponse, + ProviderInstancesListNextResponse +} from "../models"; + +/// +/** Class containing ProviderInstances operations. */ +export class ProviderInstancesImpl implements ProviderInstances { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class ProviderInstances class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + monitorName: string, + options?: ProviderInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, monitorName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, monitorName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + monitorName: string, + options?: ProviderInstancesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, monitorName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + monitorName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + monitorName: string, + options?: ProviderInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + monitorName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + monitorName: string, + options?: ProviderInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, options }, + listOperationSpec + ); + } + + /** + * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor + * name, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + options?: ProviderInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, providerInstanceName, options }, + getOperationSpec + ); + } + + /** + * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + providerInstanceParameter: ProviderInstance, + options?: ProviderInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ProviderInstancesCreateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + monitorName, + providerInstanceName, + providerInstanceParameter, + options + }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + providerInstanceParameter: ProviderInstance, + options?: ProviderInstancesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + monitorName, + providerInstanceName, + providerInstanceParameter, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + options?: ProviderInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ProviderInstancesDeleteResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, monitorName, providerInstanceName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + options?: ProviderInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + monitorName, + providerInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + monitorName: string, + nextLink: string, + options?: ProviderInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, monitorName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/providerInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProviderInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/providerInstances/{providerInstanceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProviderInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName, + Parameters.providerInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/providerInstances/{providerInstanceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ProviderInstance + }, + 201: { + bodyMapper: Mappers.ProviderInstance + }, + 202: { + bodyMapper: Mappers.ProviderInstance + }, + 204: { + bodyMapper: Mappers.ProviderInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.providerInstanceParameter, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName, + Parameters.providerInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/providerInstances/{providerInstanceName}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.monitorName, + Parameters.providerInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProviderInstanceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.monitorName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/sAPApplicationServerInstances.ts b/sdk/workloads/arm-workloads/src/operations/sAPApplicationServerInstances.ts new file mode 100644 index 000000000000..74b9f1de1e97 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/sAPApplicationServerInstances.ts @@ -0,0 +1,645 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SAPApplicationServerInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SAPApplicationServerInstance, + SAPApplicationServerInstancesListNextOptionalParams, + SAPApplicationServerInstancesListOptionalParams, + SAPApplicationServerInstancesGetOptionalParams, + SAPApplicationServerInstancesGetResponse, + SAPApplicationServerInstancesCreateOptionalParams, + SAPApplicationServerInstancesCreateResponse, + SAPApplicationServerInstancesUpdateOptionalParams, + SAPApplicationServerInstancesUpdateResponse, + SAPApplicationServerInstancesDeleteOptionalParams, + SAPApplicationServerInstancesDeleteResponse, + SAPApplicationServerInstancesListResponse, + SAPApplicationServerInstancesListNextResponse +} from "../models"; + +/// +/** Class containing SAPApplicationServerInstances operations. */ +export class SAPApplicationServerInstancesImpl + implements SAPApplicationServerInstances { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class SAPApplicationServerInstances class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists the SAP Application server Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPApplicationServerInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + sapVirtualInstanceName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPApplicationServerInstancesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + sapVirtualInstanceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + sapVirtualInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPApplicationServerInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + sapVirtualInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets the SAP Application Server Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + }, + getOperationSpec + ); + } + + /** + * Puts the SAP Application Server Instance.

This will be used by service only. PUT by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPApplicationServerInstancesCreateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the SAP Application Server Instance.

This will be used by service only. PUT by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Puts the SAP Application Server Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPApplicationServerInstancesUpdateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the SAP Application Server Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the SAP Application Server Instance.

This operation will be used by service only. + * Delete by end user will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPApplicationServerInstancesDeleteResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the SAP Application Server Instance.

This operation will be used by service only. + * Delete by end user will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + sapVirtualInstanceName, + applicationInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists the SAP Application server Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPApplicationServerInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + sapVirtualInstanceName: string, + nextLink: string, + options?: SAPApplicationServerInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.applicationInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + 201: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + 202: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + 204: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.applicationInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + 201: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + 202: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + 204: { + bodyMapper: Mappers.SAPApplicationServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body8, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.applicationInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.applicationInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPApplicationServerInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPApplicationServerInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/sAPCentralInstances.ts b/sdk/workloads/arm-workloads/src/operations/sAPCentralInstances.ts new file mode 100644 index 000000000000..47e472c8abfb --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/sAPCentralInstances.ts @@ -0,0 +1,651 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SAPCentralInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SAPCentralServerInstance, + SAPCentralInstancesListNextOptionalParams, + SAPCentralInstancesListOptionalParams, + SAPCentralInstancesGetOptionalParams, + SAPCentralInstancesGetResponse, + SAPCentralInstancesCreateOptionalParams, + SAPCentralInstancesCreateResponse, + SAPCentralInstancesUpdateOptionalParams, + SAPCentralInstancesUpdateResponse, + SAPCentralInstancesDeleteOptionalParams, + SAPCentralInstancesDeleteResponse, + SAPCentralInstancesListResponse, + SAPCentralInstancesListNextResponse +} from "../models"; + +/// +/** Class containing SAPCentralInstances operations. */ +export class SAPCentralInstancesImpl implements SAPCentralInstances { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class SAPCentralInstances class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists the SAP Central Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPCentralInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + sapVirtualInstanceName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPCentralInstancesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + sapVirtualInstanceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + sapVirtualInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPCentralInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + sapVirtualInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets the SAP Central Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + }, + getOperationSpec + ); + } + + /** + * Puts the SAP Central Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPCentralInstancesCreateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the SAP Central Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates the SAP Central Instance.

This can be used to update tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPCentralInstancesUpdateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates the SAP Central Instance.

This can be used to update tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the SAP Central Instance.

This will be used by service only. Delete by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPCentralInstancesDeleteResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the SAP Central Instance.

This will be used by service only. Delete by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + sapVirtualInstanceName, + centralInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists the SAP Central Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPCentralInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + sapVirtualInstanceName: string, + nextLink: string, + options?: SAPCentralInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.centralInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + 201: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + 202: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + 204: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.centralInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + 201: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + 202: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + 204: { + bodyMapper: Mappers.SAPCentralServerInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.centralInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.centralInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPCentralInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPCentralInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/sAPDatabaseInstances.ts b/sdk/workloads/arm-workloads/src/operations/sAPDatabaseInstances.ts new file mode 100644 index 000000000000..c31481c2e976 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/sAPDatabaseInstances.ts @@ -0,0 +1,651 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SAPDatabaseInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SAPDatabaseInstance, + SAPDatabaseInstancesListNextOptionalParams, + SAPDatabaseInstancesListOptionalParams, + SAPDatabaseInstancesGetOptionalParams, + SAPDatabaseInstancesGetResponse, + SAPDatabaseInstancesCreateOptionalParams, + SAPDatabaseInstancesCreateResponse, + SAPDatabaseInstancesUpdateOptionalParams, + SAPDatabaseInstancesUpdateResponse, + SAPDatabaseInstancesDeleteOptionalParams, + SAPDatabaseInstancesDeleteResponse, + SAPDatabaseInstancesListResponse, + SAPDatabaseInstancesListNextResponse +} from "../models"; + +/// +/** Class containing SAPDatabaseInstances operations. */ +export class SAPDatabaseInstancesImpl implements SAPDatabaseInstances { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class SAPDatabaseInstances class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists the SAP Database Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPDatabaseInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + sapVirtualInstanceName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPDatabaseInstancesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + sapVirtualInstanceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + sapVirtualInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPDatabaseInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + sapVirtualInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets the SAP Database Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + }, + getOperationSpec + ); + } + + /** + * Puts the SAP Database Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPDatabaseInstancesCreateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the SAP Database Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Puts the SAP Database Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPDatabaseInstancesUpdateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Puts the SAP Database Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the SAP Database Instance.

This will be used by service only. Delete by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPDatabaseInstancesDeleteResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the SAP Database Instance.

This will be used by service only. Delete by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + sapVirtualInstanceName, + databaseInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists the SAP Database Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPDatabaseInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + sapVirtualInstanceName: string, + nextLink: string, + options?: SAPDatabaseInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.databaseInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + 201: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + 202: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + 204: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.databaseInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + 201: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + 202: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + 204: { + bodyMapper: Mappers.SAPDatabaseInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body6, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.databaseInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName, + Parameters.databaseInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPDatabaseInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPDatabaseInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/sAPVirtualInstances.ts b/sdk/workloads/arm-workloads/src/operations/sAPVirtualInstances.ts new file mode 100644 index 000000000000..08fc70946440 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/sAPVirtualInstances.ts @@ -0,0 +1,850 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SAPVirtualInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SAPVirtualInstance, + SAPVirtualInstancesListByResourceGroupNextOptionalParams, + SAPVirtualInstancesListByResourceGroupOptionalParams, + SAPVirtualInstancesListBySubscriptionNextOptionalParams, + SAPVirtualInstancesListBySubscriptionOptionalParams, + SAPVirtualInstancesCreateOptionalParams, + SAPVirtualInstancesCreateResponse, + SAPVirtualInstancesGetOptionalParams, + SAPVirtualInstancesGetResponse, + SAPVirtualInstancesUpdateOptionalParams, + SAPVirtualInstancesUpdateResponse, + SAPVirtualInstancesDeleteOptionalParams, + SAPVirtualInstancesDeleteResponse, + SAPVirtualInstancesListByResourceGroupResponse, + SAPVirtualInstancesListBySubscriptionResponse, + SAPVirtualInstancesStartOptionalParams, + SAPVirtualInstancesStartResponse, + SAPVirtualInstancesStopOptionalParams, + SAPVirtualInstancesStopResponse, + SAPVirtualInstancesListByResourceGroupNextResponse, + SAPVirtualInstancesListBySubscriptionNextResponse +} from "../models"; + +/// +/** Class containing SAPVirtualInstances operations. */ +export class SAPVirtualInstancesImpl implements SAPVirtualInstances { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class SAPVirtualInstances class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Gets all Virtual Instances for SAP in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: SAPVirtualInstancesListByResourceGroupOptionalParams + ): 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?: SAPVirtualInstancesListByResourceGroupOptionalParams + ): 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?: SAPVirtualInstancesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets all Virtual Instances for SAP in the subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: SAPVirtualInstancesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: SAPVirtualInstancesListBySubscriptionOptionalParams + ): 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?: SAPVirtualInstancesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Creates an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesCreateResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, sapVirtualInstanceName, options }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, options }, + getOperationSpec + ); + } + + /** + * Updates an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sapVirtualInstanceName, options }, + updateOperationSpec + ); + } + + /** + * Deletes an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesDeleteResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, sapVirtualInstanceName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets all Virtual Instances for SAP in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: SAPVirtualInstancesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Gets all Virtual Instances for SAP in the subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: SAPVirtualInstancesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Starts the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginStart( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStartOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesStartResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, sapVirtualInstanceName, options }, + startOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Starts the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Stops the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginStop( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStopOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesStopResponse + > + > { + 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 LroImpl( + sendOperation, + { resourceGroupName, sapVirtualInstanceName, options }, + stopOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Stops the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + async beginStopAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStopOptionalParams + ): Promise { + const poller = await this.beginStop( + resourceGroupName, + sapVirtualInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: SAPVirtualInstancesListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: SAPVirtualInstancesListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstance + }, + 201: { + bodyMapper: Mappers.SAPVirtualInstance + }, + 202: { + bodyMapper: Mappers.SAPVirtualInstance + }, + 204: { + bodyMapper: Mappers.SAPVirtualInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", + httpMethod: "DELETE", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + 201: { + bodyMapper: Mappers.OperationStatusResult + }, + 202: { + bodyMapper: Mappers.OperationStatusResult + }, + 204: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.body2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sapVirtualInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SAPVirtualInstanceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/skus.ts b/sdk/workloads/arm-workloads/src/operations/skus.ts new file mode 100644 index 000000000000..0b1a579b42c5 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/skus.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Skus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { + SkuDefinition, + SkusListNextOptionalParams, + SkusListOptionalParams, + SkusListResponse, + SkusListNextResponse +} from "../models"; + +/// +/** Class containing Skus operations. */ +export class SkusImpl implements Skus { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class Skus class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists all the available SKUs under this PR + * @param options The options parameters. + */ + public list( + options?: SkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: SkusListOptionalParams + ): 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?: SkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Lists all the available SKUs under this PR + * @param options The options parameters. + */ + private _list(options?: SkusListOptionalParams): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: SkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SkusListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operations/wordpressInstances.ts b/sdk/workloads/arm-workloads/src/operations/wordpressInstances.ts new file mode 100644 index 000000000000..e52a460dfd88 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operations/wordpressInstances.ts @@ -0,0 +1,396 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { WordpressInstances } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WorkloadsClient } from "../workloadsClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + WordpressInstanceResource, + WordpressInstancesListNextOptionalParams, + WordpressInstancesListOptionalParams, + WordpressInstancesListResponse, + WordpressInstancesGetOptionalParams, + WordpressInstancesGetResponse, + WordpressInstancesCreateOrUpdateOptionalParams, + WordpressInstancesCreateOrUpdateResponse, + WordpressInstancesDeleteOptionalParams, + WordpressInstancesListNextResponse +} from "../models"; + +/// +/** Class containing WordpressInstances operations. */ +export class WordpressInstancesImpl implements WordpressInstances { + private readonly client: WorkloadsClient; + + /** + * Initialize a new instance of the class WordpressInstances class. + * @param client Reference to the service client + */ + constructor(client: WorkloadsClient) { + this.client = client; + } + + /** + * Lists WordPress instance resources under a phpWorkload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + phpWorkloadName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, phpWorkloadName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, phpWorkloadName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + phpWorkloadName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + phpWorkloadName, + options + )) { + yield* page; + } + } + + /** + * Lists WordPress instance resources under a phpWorkload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, phpWorkloadName, options }, + listOperationSpec + ); + } + + /** + * Gets the WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, phpWorkloadName, options }, + getOperationSpec + ); + } + + /** + * Create or updated WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param wordpressInstanceResource Resource create or update request payload + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + phpWorkloadName: string, + wordpressInstanceResource: WordpressInstanceResource, + options?: WordpressInstancesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + WordpressInstancesCreateOrUpdateResponse + > + > { + 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 LroImpl( + sendOperation, + { + resourceGroupName, + phpWorkloadName, + wordpressInstanceResource, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or updated WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param wordpressInstanceResource Resource create or update request payload + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + phpWorkloadName: string, + wordpressInstanceResource: WordpressInstanceResource, + options?: WordpressInstancesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + phpWorkloadName, + wordpressInstanceResource, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, phpWorkloadName, options }, + deleteOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + phpWorkloadName: string, + nextLink: string, + options?: WordpressInstancesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, phpWorkloadName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WordpressInstanceResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WordpressInstanceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.WordpressInstanceResource + }, + 201: { + bodyMapper: Mappers.WordpressInstanceResource + }, + 202: { + bodyMapper: Mappers.WordpressInstanceResource + }, + 204: { + bodyMapper: Mappers.WordpressInstanceResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.wordpressInstanceResource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WordpressInstanceResourceList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.phpWorkloadName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/index.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..2160f4f94b82 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/index.ts @@ -0,0 +1,18 @@ +/* + * 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 "./phpWorkloads"; +export * from "./wordpressInstances"; +export * from "./sAPVirtualInstances"; +export * from "./sAPCentralInstances"; +export * from "./sAPDatabaseInstances"; +export * from "./sAPApplicationServerInstances"; +export * from "./operations"; +export * from "./monitors"; +export * from "./providerInstances"; +export * from "./skus"; diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/monitors.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/monitors.ts new file mode 100644 index 000000000000..4099dc073123 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/monitors.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Monitor, + MonitorsListOptionalParams, + MonitorsListByResourceGroupOptionalParams, + MonitorsGetOptionalParams, + MonitorsGetResponse, + MonitorsCreateOptionalParams, + MonitorsCreateResponse, + MonitorsDeleteOptionalParams, + MonitorsDeleteResponse, + Tags, + MonitorsUpdateOptionalParams, + MonitorsUpdateResponse +} from "../models"; + +/// +/** Interface representing a Monitors. */ +export interface Monitors { + /** + * Gets a list of SAP monitors in the specified subscription. The operations returns various properties + * of each SAP monitor. + * @param options The options parameters. + */ + list( + options?: MonitorsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of SAP monitors in the specified resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: MonitorsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + monitorName: string, + options?: MonitorsGetOptionalParams + ): Promise; + /** + * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param monitorParameter Request body representing a SAP monitor + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + monitorName: string, + monitorParameter: Monitor, + options?: MonitorsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MonitorsCreateResponse + > + >; + /** + * Creates a SAP monitor for the specified subscription, resource group, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param monitorParameter Request body representing a SAP monitor + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + monitorName: string, + monitorParameter: Monitor, + options?: MonitorsCreateOptionalParams + ): Promise; + /** + * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + monitorName: string, + options?: MonitorsDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MonitorsDeleteResponse + > + >; + /** + * Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + monitorName: string, + options?: MonitorsDeleteOptionalParams + ): Promise; + /** + * Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP + * monitor name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param tagsParameter Request body that only contains the new Tags field + * @param options The options parameters. + */ + update( + resourceGroupName: string, + monitorName: string, + tagsParameter: Tags, + options?: MonitorsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/operations.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..bc801633d203 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * Lists all the available API operations under this PR + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/phpWorkloads.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/phpWorkloads.ts new file mode 100644 index 000000000000..37e5e770c568 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/phpWorkloads.ts @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + PhpWorkloadResource, + PhpWorkloadsListBySubscriptionOptionalParams, + PhpWorkloadsListByResourceGroupOptionalParams, + PhpWorkloadsGetOptionalParams, + PhpWorkloadsGetResponse, + PhpWorkloadsCreateOrUpdateOptionalParams, + PhpWorkloadsCreateOrUpdateResponse, + PatchResourceRequestBody, + PhpWorkloadsUpdateOptionalParams, + PhpWorkloadsUpdateResponse, + PhpWorkloadsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PhpWorkloads. */ +export interface PhpWorkloads { + /** + * Lists PHP workload resources for a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: PhpWorkloadsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists PHP workload resources in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: PhpWorkloadsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + phpWorkloadName: string, + options?: PhpWorkloadsGetOptionalParams + ): Promise; + /** + * Create or updated PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param phpWorkloadResource Resource create or update request payload + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + phpWorkloadName: string, + phpWorkloadResource: PhpWorkloadResource, + options?: PhpWorkloadsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + PhpWorkloadsCreateOrUpdateResponse + > + >; + /** + * Create or updated PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param phpWorkloadResource Resource create or update request payload + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + phpWorkloadName: string, + phpWorkloadResource: PhpWorkloadResource, + options?: PhpWorkloadsCreateOrUpdateOptionalParams + ): Promise; + /** + * Update PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param resourcePatchRequestBody Workload resource update data + * @param options The options parameters. + */ + update( + resourceGroupName: string, + phpWorkloadName: string, + resourcePatchRequestBody: PatchResourceRequestBody, + options?: PhpWorkloadsUpdateOptionalParams + ): Promise; + /** + * Delete PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + phpWorkloadName: string, + options?: PhpWorkloadsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete PHP workload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + phpWorkloadName: string, + options?: PhpWorkloadsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/providerInstances.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/providerInstances.ts new file mode 100644 index 000000000000..97051ab6641a --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/providerInstances.ts @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ProviderInstance, + ProviderInstancesListOptionalParams, + ProviderInstancesGetOptionalParams, + ProviderInstancesGetResponse, + ProviderInstancesCreateOptionalParams, + ProviderInstancesCreateResponse, + ProviderInstancesDeleteOptionalParams, + ProviderInstancesDeleteResponse +} from "../models"; + +/// +/** Interface representing a ProviderInstances. */ +export interface ProviderInstances { + /** + * Gets a list of provider instances in the specified SAP monitor. The operations returns various + * properties of each provider instances. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + monitorName: string, + options?: ProviderInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets properties of a provider instance for the specified subscription, resource group, SAP monitor + * name, and resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + options?: ProviderInstancesGetOptionalParams + ): Promise; + /** + * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + providerInstanceParameter: ProviderInstance, + options?: ProviderInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ProviderInstancesCreateResponse + > + >; + /** + * Creates a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param providerInstanceParameter Request body representing a provider instance + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + providerInstanceParameter: ProviderInstance, + options?: ProviderInstancesCreateOptionalParams + ): Promise; + /** + * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + options?: ProviderInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ProviderInstancesDeleteResponse + > + >; + /** + * Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and + * resource name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the SAP monitor resource. + * @param providerInstanceName Name of the provider instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + monitorName: string, + providerInstanceName: string, + options?: ProviderInstancesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPApplicationServerInstances.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPApplicationServerInstances.ts new file mode 100644 index 000000000000..98006245f13f --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPApplicationServerInstances.ts @@ -0,0 +1,148 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SAPApplicationServerInstance, + SAPApplicationServerInstancesListOptionalParams, + SAPApplicationServerInstancesGetOptionalParams, + SAPApplicationServerInstancesGetResponse, + SAPApplicationServerInstancesCreateOptionalParams, + SAPApplicationServerInstancesCreateResponse, + SAPApplicationServerInstancesUpdateOptionalParams, + SAPApplicationServerInstancesUpdateResponse, + SAPApplicationServerInstancesDeleteOptionalParams, + SAPApplicationServerInstancesDeleteResponse +} from "../models"; + +/// +/** Interface representing a SAPApplicationServerInstances. */ +export interface SAPApplicationServerInstances { + /** + * Lists the SAP Application server Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPApplicationServerInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the SAP Application Server Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesGetOptionalParams + ): Promise; + /** + * Puts the SAP Application Server Instance.

This will be used by service only. PUT by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPApplicationServerInstancesCreateResponse + > + >; + /** + * Puts the SAP Application Server Instance.

This will be used by service only. PUT by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesCreateOptionalParams + ): Promise; + /** + * Puts the SAP Application Server Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPApplicationServerInstancesUpdateResponse + > + >; + /** + * Puts the SAP Application Server Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesUpdateOptionalParams + ): Promise; + /** + * Deletes the SAP Application Server Instance.

This operation will be used by service only. + * Delete by end user will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPApplicationServerInstancesDeleteResponse + > + >; + /** + * Deletes the SAP Application Server Instance.

This operation will be used by service only. + * Delete by end user will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param applicationInstanceName The name of SAP Application Server instance. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + applicationInstanceName: string, + options?: SAPApplicationServerInstancesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPCentralInstances.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPCentralInstances.ts new file mode 100644 index 000000000000..f4bbf79e871f --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPCentralInstances.ts @@ -0,0 +1,155 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SAPCentralServerInstance, + SAPCentralInstancesListOptionalParams, + SAPCentralInstancesGetOptionalParams, + SAPCentralInstancesGetResponse, + SAPCentralInstancesCreateOptionalParams, + SAPCentralInstancesCreateResponse, + SAPCentralInstancesUpdateOptionalParams, + SAPCentralInstancesUpdateResponse, + SAPCentralInstancesDeleteOptionalParams, + SAPCentralInstancesDeleteResponse +} from "../models"; + +/// +/** Interface representing a SAPCentralInstances. */ +export interface SAPCentralInstances { + /** + * Lists the SAP Central Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPCentralInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the SAP Central Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesGetOptionalParams + ): Promise; + /** + * Puts the SAP Central Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPCentralInstancesCreateResponse + > + >; + /** + * Puts the SAP Central Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesCreateOptionalParams + ): Promise; + /** + * Updates the SAP Central Instance.

This can be used to update tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPCentralInstancesUpdateResponse + > + >; + /** + * Updates the SAP Central Instance.

This can be used to update tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesUpdateOptionalParams + ): Promise; + /** + * Deletes the SAP Central Instance.

This will be used by service only. Delete by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPCentralInstancesDeleteResponse + > + >; + /** + * Deletes the SAP Central Instance.

This will be used by service only. Delete by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param centralInstanceName Central Instance name string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + centralInstanceName: string, + options?: SAPCentralInstancesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPDatabaseInstances.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPDatabaseInstances.ts new file mode 100644 index 000000000000..9ca030c5cdd9 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPDatabaseInstances.ts @@ -0,0 +1,155 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SAPDatabaseInstance, + SAPDatabaseInstancesListOptionalParams, + SAPDatabaseInstancesGetOptionalParams, + SAPDatabaseInstancesGetResponse, + SAPDatabaseInstancesCreateOptionalParams, + SAPDatabaseInstancesCreateResponse, + SAPDatabaseInstancesUpdateOptionalParams, + SAPDatabaseInstancesUpdateResponse, + SAPDatabaseInstancesDeleteOptionalParams, + SAPDatabaseInstancesDeleteResponse +} from "../models"; + +/// +/** Interface representing a SAPDatabaseInstances. */ +export interface SAPDatabaseInstances { + /** + * Lists the SAP Database Instances in an SVI. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPDatabaseInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the SAP Database Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesGetOptionalParams + ): Promise; + /** + * Puts the SAP Database Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPDatabaseInstancesCreateResponse + > + >; + /** + * Puts the SAP Database Instance.

This will be used by service only. PUT by end user will + * return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesCreateOptionalParams + ): Promise; + /** + * Puts the SAP Database Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPDatabaseInstancesUpdateResponse + > + >; + /** + * Puts the SAP Database Instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesUpdateOptionalParams + ): Promise; + /** + * Deletes the SAP Database Instance.

This will be used by service only. Delete by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPDatabaseInstancesDeleteResponse + > + >; + /** + * Deletes the SAP Database Instance.

This will be used by service only. Delete by end user + * will return a Bad Request error. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param databaseInstanceName Database Instance string modeled as parameter for auto generation to + * work correctly. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + databaseInstanceName: string, + options?: SAPDatabaseInstancesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPVirtualInstances.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPVirtualInstances.ts new file mode 100644 index 000000000000..adda750fb8f5 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/sAPVirtualInstances.ts @@ -0,0 +1,178 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SAPVirtualInstance, + SAPVirtualInstancesListByResourceGroupOptionalParams, + SAPVirtualInstancesListBySubscriptionOptionalParams, + SAPVirtualInstancesCreateOptionalParams, + SAPVirtualInstancesCreateResponse, + SAPVirtualInstancesGetOptionalParams, + SAPVirtualInstancesGetResponse, + SAPVirtualInstancesUpdateOptionalParams, + SAPVirtualInstancesUpdateResponse, + SAPVirtualInstancesDeleteOptionalParams, + SAPVirtualInstancesDeleteResponse, + SAPVirtualInstancesStartOptionalParams, + SAPVirtualInstancesStartResponse, + SAPVirtualInstancesStopOptionalParams, + SAPVirtualInstancesStopResponse +} from "../models"; + +/// +/** Interface representing a SAPVirtualInstances. */ +export interface SAPVirtualInstances { + /** + * Gets all Virtual Instances for SAP in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: SAPVirtualInstancesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets all Virtual Instances for SAP in the subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: SAPVirtualInstancesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesCreateResponse + > + >; + /** + * Creates an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesCreateOptionalParams + ): Promise; + /** + * Gets an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesGetOptionalParams + ): Promise; + /** + * Updates an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesUpdateOptionalParams + ): Promise; + /** + * Deletes an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesDeleteResponse + > + >; + /** + * Deletes an Virtual Instance for SAP. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesDeleteOptionalParams + ): Promise; + /** + * Starts the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStartOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesStartResponse + > + >; + /** + * Starts the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStartOptionalParams + ): Promise; + /** + * Stops the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginStop( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStopOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SAPVirtualInstancesStopResponse + > + >; + /** + * Stops the SAP System. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sapVirtualInstanceName The name of the Virtual Instances for SAP. + * @param options The options parameters. + */ + beginStopAndWait( + resourceGroupName: string, + sapVirtualInstanceName: string, + options?: SAPVirtualInstancesStopOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/skus.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/skus.ts new file mode 100644 index 000000000000..d845b154f13a --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/skus.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SkuDefinition, SkusListOptionalParams } from "../models"; + +/// +/** Interface representing a Skus. */ +export interface Skus { + /** + * Lists all the available SKUs under this PR + * @param options The options parameters. + */ + list( + options?: SkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/workloads/arm-workloads/src/operationsInterfaces/wordpressInstances.ts b/sdk/workloads/arm-workloads/src/operationsInterfaces/wordpressInstances.ts new file mode 100644 index 000000000000..c2b211e3708f --- /dev/null +++ b/sdk/workloads/arm-workloads/src/operationsInterfaces/wordpressInstances.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + WordpressInstanceResource, + WordpressInstancesListOptionalParams, + WordpressInstancesGetOptionalParams, + WordpressInstancesGetResponse, + WordpressInstancesCreateOrUpdateOptionalParams, + WordpressInstancesCreateOrUpdateResponse, + WordpressInstancesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a WordpressInstances. */ +export interface WordpressInstances { + /** + * Lists WordPress instance resources under a phpWorkload resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + list( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesGetOptionalParams + ): Promise; + /** + * Create or updated WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param wordpressInstanceResource Resource create or update request payload + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + phpWorkloadName: string, + wordpressInstanceResource: WordpressInstanceResource, + options?: WordpressInstancesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + WordpressInstancesCreateOrUpdateResponse + > + >; + /** + * Create or updated WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param wordpressInstanceResource Resource create or update request payload + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + phpWorkloadName: string, + wordpressInstanceResource: WordpressInstanceResource, + options?: WordpressInstancesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete WordPress instance resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param phpWorkloadName Php workload name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + phpWorkloadName: string, + options?: WordpressInstancesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/workloads/arm-workloads/src/workloadsClient.ts b/sdk/workloads/arm-workloads/src/workloadsClient.ts new file mode 100644 index 000000000000..ff8ac0f24191 --- /dev/null +++ b/sdk/workloads/arm-workloads/src/workloadsClient.ts @@ -0,0 +1,343 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { + PhpWorkloadsImpl, + WordpressInstancesImpl, + SAPVirtualInstancesImpl, + SAPCentralInstancesImpl, + SAPDatabaseInstancesImpl, + SAPApplicationServerInstancesImpl, + OperationsImpl, + MonitorsImpl, + ProviderInstancesImpl, + SkusImpl +} from "./operations"; +import { + PhpWorkloads, + WordpressInstances, + SAPVirtualInstances, + SAPCentralInstances, + SAPDatabaseInstances, + SAPApplicationServerInstances, + Operations, + Monitors, + ProviderInstances, + Skus +} from "./operationsInterfaces"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; +import { + WorkloadsClientOptionalParams, + SAPSizingRecommendationsOptionalParams, + SAPSizingRecommendationsResponse, + SAPSupportedSkuOptionalParams, + SAPSupportedSkuResponse, + SAPDiskConfigurationsOptionalParams, + SAPDiskConfigurationsResponse, + SAPAvailabilityZoneDetailsOptionalParams, + SAPAvailabilityZoneDetailsResponse +} from "./models"; + +export class WorkloadsClient extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the WorkloadsClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: WorkloadsClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: WorkloadsClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-workloads/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-12-01-preview"; + this.phpWorkloads = new PhpWorkloadsImpl(this); + this.wordpressInstances = new WordpressInstancesImpl(this); + this.sAPVirtualInstances = new SAPVirtualInstancesImpl(this); + this.sAPCentralInstances = new SAPCentralInstancesImpl(this); + this.sAPDatabaseInstances = new SAPDatabaseInstancesImpl(this); + this.sAPApplicationServerInstances = new SAPApplicationServerInstancesImpl( + this + ); + this.operations = new OperationsImpl(this); + this.monitors = new MonitorsImpl(this); + this.providerInstances = new ProviderInstancesImpl(this); + this.skus = new SkusImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + /** + * Get SAP sizing recommendations. + * @param location The name of Azure region. + * @param options The options parameters. + */ + sAPSizingRecommendations( + location: string, + options?: SAPSizingRecommendationsOptionalParams + ): Promise { + return this.sendOperationRequest( + { location, options }, + sAPSizingRecommendationsOperationSpec + ); + } + + /** + * Get SAP supported SKUs. + * @param location The name of Azure region. + * @param options The options parameters. + */ + sAPSupportedSku( + location: string, + options?: SAPSupportedSkuOptionalParams + ): Promise { + return this.sendOperationRequest( + { location, options }, + sAPSupportedSkuOperationSpec + ); + } + + /** + * Get SAP Disk Configurations. + * @param location The name of Azure region. + * @param options The options parameters. + */ + sAPDiskConfigurations( + location: string, + options?: SAPDiskConfigurationsOptionalParams + ): Promise { + return this.sendOperationRequest( + { location, options }, + sAPDiskConfigurationsOperationSpec + ); + } + + /** + * Get SAP Availability Zone Details. + * @param location The name of Azure region. + * @param options The options parameters. + */ + sAPAvailabilityZoneDetails( + location: string, + options?: SAPAvailabilityZoneDetailsOptionalParams + ): Promise { + return this.sendOperationRequest( + { location, options }, + sAPAvailabilityZoneDetailsOperationSpec + ); + } + + phpWorkloads: PhpWorkloads; + wordpressInstances: WordpressInstances; + sAPVirtualInstances: SAPVirtualInstances; + sAPCentralInstances: SAPCentralInstances; + sAPDatabaseInstances: SAPDatabaseInstances; + sAPApplicationServerInstances: SAPApplicationServerInstances; + operations: Operations; + monitors: Monitors; + providerInstances: ProviderInstances; + skus: Skus; +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const sAPSizingRecommendationsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SAPSizingRecommendationResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.sAPSizingRecommendation, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const sAPSupportedSkuOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SAPSupportedResourceSkusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.sAPSupportedSku, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const sAPDiskConfigurationsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SAPDiskConfigurationsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.sAPDiskConfigurations, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const sAPAvailabilityZoneDetailsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SAPAvailabilityZoneDetailsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.sAPAvailabilityZoneDetails, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/workloads/arm-workloads/test/sampleTest.ts b/sdk/workloads/arm-workloads/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/workloads/arm-workloads/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/workloads/arm-workloads/tsconfig.json b/sdk/workloads/arm-workloads/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/workloads/arm-workloads/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/workloads/ci.mgmt.yml b/sdk/workloads/ci.mgmt.yml new file mode 100644 index 000000000000..3635a94a42a9 --- /dev/null +++ b/sdk/workloads/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/workloads/arm-workloads + - sdk/workloads/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/workloads/arm-workloads + - sdk/workloads/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: workloads + Artifacts: + - name: azure-arm-workloads + safeName: azurearmworkloads + \ No newline at end of file