diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9dd459cf5563..0dfa5c9c1908 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -106,6 +106,7 @@ specifiers: '@rush-temp/arm-hanaonazure': file:./projects/arm-hanaonazure.tgz '@rush-temp/arm-hardwaresecuritymodules': file:./projects/arm-hardwaresecuritymodules.tgz '@rush-temp/arm-hdinsight': file:./projects/arm-hdinsight.tgz + '@rush-temp/arm-hdinsightonaks': file:./projects/arm-hdinsightonaks.tgz '@rush-temp/arm-healthbot': file:./projects/arm-healthbot.tgz '@rush-temp/arm-healthcareapis': file:./projects/arm-healthcareapis.tgz '@rush-temp/arm-hybridcompute': file:./projects/arm-hybridcompute.tgz @@ -457,6 +458,7 @@ dependencies: '@rush-temp/arm-hanaonazure': file:projects/arm-hanaonazure.tgz '@rush-temp/arm-hardwaresecuritymodules': file:projects/arm-hardwaresecuritymodules.tgz '@rush-temp/arm-hdinsight': file:projects/arm-hdinsight.tgz + '@rush-temp/arm-hdinsightonaks': file:projects/arm-hdinsightonaks.tgz '@rush-temp/arm-healthbot': file:projects/arm-healthbot.tgz '@rush-temp/arm-healthcareapis': file:projects/arm-healthcareapis.tgz '@rush-temp/arm-hybridcompute': file:projects/arm-hybridcompute.tgz @@ -4803,7 +4805,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230727 + typescript: 5.2.0-dev.20230728 dev: false /duplexer3/0.1.5: @@ -10300,8 +10302,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230727: - resolution: {integrity: sha512-HTNqxwU5roYnvWrrdTxKLREZ+fygKOpf7q2DAhfZntqgyQNxZzZdDypigMS8tNmeQN2X/ohbNzX9PnhHoCCmfw==} + /typescript/5.2.0-dev.20230728: + resolution: {integrity: sha512-pI6gdSexHd/ESfy6Vwmd6bdId1UIYl1fkE8d2o/n/frQCeD6oupH93WTh0syCk3mYMpnx++flvR1X2WHJS1oVg==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -14066,6 +14068,34 @@ packages: - supports-color dev: false + file:projects/arm-hdinsightonaks.tgz: + resolution: {integrity: sha512-DNFrFxWz6OMK9WTXDNA+ZuUF9OlOx5y0KK41NhmOF+DHj3dkhGd0dCfhxf7rHtjVN+nr9+zRlh76/Ho66Dc8BA==, tarball: file:projects/arm-hdinsightonaks.tgz} + name: '@rush-temp/arm-hdinsightonaks' + version: 0.0.0 + dependencies: + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.36.3_@types+node@14.18.54 + '@rollup/plugin-commonjs': 24.1.0_rollup@2.79.1 + '@rollup/plugin-json': 6.0.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.5 + '@types/node': 14.18.54 + chai: 4.3.7 + cross-env: 7.0.3 + dotenv: 16.3.1 + mkdirp: 2.1.6 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 2.79.1 + rollup-plugin-sourcemaps: 0.6.3_dmbj5memikchm63lpeyt6ukdau + tslib: 2.6.1 + typescript: 5.0.4 + uglify-js: 3.17.4 + transitivePeerDependencies: + - supports-color + dev: false + file:projects/arm-healthbot.tgz: resolution: {integrity: sha512-AhsFUruhBEylGQuR3pCyRsb8peidBTO5R+fQG1GPHC5X5ULvjYBr/VjyCyGw6wUncL7mEI+ZAjeD1HRGT5+DGw==, tarball: file:projects/arm-healthbot.tgz} name: '@rush-temp/arm-healthbot' @@ -16757,7 +16787,7 @@ packages: dev: false file:projects/arm-sql.tgz: - resolution: {integrity: sha512-EpSU2v4ZtF6cBet3xtDZP6CVKFpIueokt1QWq2L94nDbejTY0apqrB5ld7Y1wMFd2eCjkWdyOemcoMU3aiEpng==, tarball: file:projects/arm-sql.tgz} + resolution: {integrity: sha512-JPKp259J5nN+vVi2wzvaIMG+pNlhqHdbjgBFZtF9W1gs3cBR9RX6ZLdzc1FU4ETQ5incWZTpV0+hr/9cWQ7pYg==, tarball: file:projects/arm-sql.tgz} name: '@rush-temp/arm-sql' version: 0.0.0 dependencies: @@ -21689,7 +21719,7 @@ packages: dev: false file:projects/synapse-artifacts.tgz: - resolution: {integrity: sha512-a3t9WQAwAL4yGTrCNEjWwLy1F8WZvlCUJH/gvTvAByCDQFyMxXnzHnmwjyfX6mqwMwMI1xrg21friMobdmRM6A==, tarball: file:projects/synapse-artifacts.tgz} + resolution: {integrity: sha512-dH+gWGwhkEd1ZO/50EEX8BpsXZ+rFqXznGGCIhIW9Q5tbi21QsY2/0k13eGQxRHJjPvKrYRmVSTs926Ll3feKQ==, tarball: file:projects/synapse-artifacts.tgz} name: '@rush-temp/synapse-artifacts' version: 0.0.0 dependencies: diff --git a/rush.json b/rush.json index f2625bb096c8..f71e6cfbef8c 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. @@ -2039,6 +2039,11 @@ "packageName": "@azure/arm-quantum", "projectFolder": "sdk/quantum/arm-quantum", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-hdinsightonaks", + "projectFolder": "sdk/hdinsight/arm-hdinsightonaks", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsightonaks/CHANGELOG.md b/sdk/hdinsight/arm-hdinsightonaks/CHANGELOG.md new file mode 100644 index 000000000000..588a50e1a6e0 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-07-28) + +The package of @azure/arm-hdinsightonaks 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/hdinsight/arm-hdinsightonaks/LICENSE b/sdk/hdinsight/arm-hdinsightonaks/LICENSE new file mode 100644 index 000000000000..3a1d9b6f24f7 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 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/hdinsight/arm-hdinsightonaks/README.md b/sdk/hdinsight/arm-hdinsightonaks/README.md new file mode 100644 index 000000000000..dd556421e8e6 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/README.md @@ -0,0 +1,109 @@ +# Azure HDInsightOnAksManagement client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure HDInsightOnAksManagement client. + +HDInsight On Aks Management Client + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightonaks) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-hdinsightonaks) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-hdinsightonaks?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://github.com/nodejs/release#release-schedule) +- 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-hdinsightonaks` package + +Install the Azure HDInsightOnAksManagement client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-hdinsightonaks +``` + +### Create and authenticate a `HDInsightOnAksManagementClient` + +To create a client object to access the Azure HDInsightOnAksManagement API, you will need the `endpoint` of your Azure HDInsightOnAksManagement resource and a `credential`. The Azure HDInsightOnAksManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure HDInsightOnAksManagement 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 HDInsightOnAksManagement** 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 { HDInsightOnAksManagementClient } = require("@azure/arm-hdinsightonaks"); +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 HDInsightOnAksManagementClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new HDInsightOnAksManagementClient(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 + +### HDInsightOnAksManagementClient + +`HDInsightOnAksManagementClient` is the primary interface for developers using the Azure HDInsightOnAksManagement client library. Explore the methods on this client object to understand the different features of the Azure HDInsightOnAksManagement 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%2Fhdinsight%2Farm-hdinsightonaks%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/hdinsight/arm-hdinsightonaks/_meta.json b/sdk/hdinsight/arm-hdinsightonaks/_meta.json new file mode 100644 index 000000000000..87416cd58355 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "b67cb7d51e2981de51e93092f45803f6ec11cb46", + "readme": "specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md --use=@autorest/typescript@^6.0.4", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" +} \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsightonaks/api-extractor.json b/sdk/hdinsight/arm-hdinsightonaks/api-extractor.json new file mode 100644 index 000000000000..b3ac658d8022 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/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-hdinsightonaks.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/hdinsight/arm-hdinsightonaks/package.json b/sdk/hdinsight/arm-hdinsightonaks/package.json new file mode 100644 index 000000000000..8db29282d8ff --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/package.json @@ -0,0 +1,115 @@ +{ + "name": "@azure/arm-hdinsightonaks", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for HDInsightOnAksManagementClient.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=14.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.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-hdinsightonaks.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "mkdirp": "^2.1.2", + "rollup": "^2.66.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "typescript": "~5.0.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "dotenv": "^16.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "mocha": "^7.1.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^14.0.0", + "@azure/dev-tool": "^1.0.0" + }, + "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" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/hDInsightOnAksManagementClient.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightonaks" +} \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsightonaks/review/arm-hdinsightonaks.api.md b/sdk/hdinsight/arm-hdinsightonaks/review/arm-hdinsightonaks.api.md new file mode 100644 index 000000000000..40cf13b2e91d --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/review/arm-hdinsightonaks.api.md @@ -0,0 +1,1172 @@ +## API Report File for "@azure/arm-hdinsightonaks" + +> 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 { OperationState } from '@azure/core-lro'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type Action = string; + +// @public +export type ActionType = string; + +// @public +export interface AksClusterProfile { + aksClusterAgentPoolIdentityProfile?: AksClusterProfileAksClusterAgentPoolIdentityProfile; + aksClusterResourceId?: string; + readonly aksVersion?: string; +} + +// @public +export interface AksClusterProfileAksClusterAgentPoolIdentityProfile extends IdentityProfile { +} + +// @public +export interface AuthorizationProfile { + groupIds?: string[]; + userIds?: string[]; +} + +// @public +export interface AutoscaleProfile { + autoscaleType?: AutoscaleType; + enabled: boolean; + gracefulDecommissionTimeout?: number; + loadBasedConfig?: LoadBasedConfig; + scheduleBasedConfig?: ScheduleBasedConfig; +} + +// @public +export type AutoscaleType = string; + +// @public +export interface AvailableClusterPoolVersions { + listByLocation(location: string, options?: AvailableClusterPoolVersionsListByLocationOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AvailableClusterPoolVersionsListByLocationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableClusterPoolVersionsListByLocationNextResponse = ClusterPoolVersionsListResult; + +// @public +export interface AvailableClusterPoolVersionsListByLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableClusterPoolVersionsListByLocationResponse = ClusterPoolVersionsListResult; + +// @public +export interface AvailableClusterVersions { + listByLocation(location: string, options?: AvailableClusterVersionsListByLocationOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AvailableClusterVersionsListByLocationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableClusterVersionsListByLocationNextResponse = ClusterVersionsListResult; + +// @public +export interface AvailableClusterVersionsListByLocationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableClusterVersionsListByLocationResponse = ClusterVersionsListResult; + +// @public +export interface CatalogOptions { + hive?: HiveCatalogOption[]; +} + +// @public +export interface Cluster extends TrackedResource { + clusterProfile?: ClusterProfile; + clusterType?: string; + computeProfile?: ComputeProfile; + readonly deploymentId?: string; + readonly provisioningState?: ProvisioningStatus; + readonly status?: string; +} + +// @public (undocumented) +export interface ClusterComponentsItem { + // (undocumented) + name?: string; + // (undocumented) + version?: string; +} + +// @public +export interface ClusterConfigFile { + content?: string; + encoding?: ContentEncoding; + fileName: string; + path?: string; + values?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ClusterInstanceViewProperties { + serviceStatuses: ServiceStatus[]; + status: ClusterInstanceViewPropertiesStatus; +} + +// @public +export interface ClusterInstanceViewPropertiesStatus extends ClusterInstanceViewStatus { +} + +// @public +export interface ClusterInstanceViewResult { + name: string; + serviceStatuses: ServiceStatus[]; + status: ClusterInstanceViewPropertiesStatus; +} + +// @public +export interface ClusterInstanceViewResultProperties extends ClusterInstanceViewProperties { +} + +// @public +export interface ClusterInstanceViewsResult { + readonly nextLink?: string; + value?: ClusterInstanceViewResult[]; +} + +// @public +export interface ClusterInstanceViewStatus { + message?: string; + ready: string; + reason?: string; +} + +// @public +export interface ClusterJob extends ProxyResource { + properties: ClusterJobPropertiesUnion; +} + +// @public +export interface ClusterJobList { + nextLink?: string; + value: ClusterJob[]; +} + +// @public +export interface ClusterJobProperties { + jobType: "FlinkJob"; +} + +// @public (undocumented) +export type ClusterJobPropertiesUnion = ClusterJobProperties | FlinkJobProperties; + +// @public +export interface ClusterJobs { + beginRunJob(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterJob: ClusterJob, options?: ClusterJobsRunJobOptionalParams): Promise, ClusterJobsRunJobResponse>>; + beginRunJobAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterJob: ClusterJob, options?: ClusterJobsRunJobOptionalParams): Promise; + list(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClusterJobsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ClusterJobsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterJobsListNextResponse = ClusterJobList; + +// @public +export interface ClusterJobsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterJobsListResponse = ClusterJobList; + +// @public +export interface ClusterJobsRunJobHeaders { + location?: string; +} + +// @public +export interface ClusterJobsRunJobOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClusterJobsRunJobResponse = ClusterJob; + +// @public +export interface ClusterListResult { + readonly nextLink?: string; + value?: Cluster[]; +} + +// @public +export interface ClusterLogAnalyticsApplicationLogs { + stdErrorEnabled?: boolean; + stdOutEnabled?: boolean; +} + +// @public +export interface ClusterLogAnalyticsProfile { + applicationLogs?: ClusterLogAnalyticsApplicationLogs; + enabled: boolean; + metricsEnabled?: boolean; +} + +// @public +export interface ClusterPatch extends TrackedResource { + clusterProfile?: UpdatableClusterProfile; +} + +// @public +export interface ClusterPool extends TrackedResource { + readonly aksClusterProfile?: ClusterPoolResourcePropertiesAksClusterProfile; + readonly aksManagedResourceGroupName?: string; + clusterPoolProfile?: ClusterPoolResourcePropertiesClusterPoolProfile; + computeProfile?: ClusterPoolResourcePropertiesComputeProfile; + readonly deploymentId?: string; + logAnalyticsProfile?: ClusterPoolResourcePropertiesLogAnalyticsProfile; + managedResourceGroupName?: string; + networkProfile?: ClusterPoolResourcePropertiesNetworkProfile; + readonly provisioningState?: ProvisioningStatus; + readonly status?: string; +} + +// @public +export interface ClusterPoolComputeProfile { + count?: number; + vmSize: string; +} + +// @public +export interface ClusterPoolListResult { + readonly nextLink?: string; + value?: ClusterPool[]; +} + +// @public +export interface ClusterPoolLogAnalyticsProfile { + enabled: boolean; + workspaceId?: string; +} + +// @public +export interface ClusterPoolNetworkProfile { + subnetId: string; +} + +// @public +export interface ClusterPoolProfile { + clusterPoolVersion: string; +} + +// @public +export interface ClusterPoolResourcePropertiesAksClusterProfile extends AksClusterProfile { +} + +// @public +export interface ClusterPoolResourcePropertiesClusterPoolProfile extends ClusterPoolProfile { +} + +// @public +export interface ClusterPoolResourcePropertiesComputeProfile extends ClusterPoolComputeProfile { +} + +// @public +export interface ClusterPoolResourcePropertiesLogAnalyticsProfile extends ClusterPoolLogAnalyticsProfile { +} + +// @public +export interface ClusterPoolResourcePropertiesNetworkProfile extends ClusterPoolNetworkProfile { +} + +// @public +export interface ClusterPools { + beginCreateOrUpdate(resourceGroupName: string, clusterPoolName: string, clusterPool: ClusterPool, options?: ClusterPoolsCreateOrUpdateOptionalParams): Promise, ClusterPoolsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, clusterPoolName: string, clusterPool: ClusterPool, options?: ClusterPoolsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, clusterPoolName: string, options?: ClusterPoolsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, clusterPoolName: string, options?: ClusterPoolsDeleteOptionalParams): Promise; + beginUpdateTags(resourceGroupName: string, clusterPoolName: string, clusterPoolTags: TagsObject, options?: ClusterPoolsUpdateTagsOptionalParams): Promise, ClusterPoolsUpdateTagsResponse>>; + beginUpdateTagsAndWait(resourceGroupName: string, clusterPoolName: string, clusterPoolTags: TagsObject, options?: ClusterPoolsUpdateTagsOptionalParams): Promise; + get(resourceGroupName: string, clusterPoolName: string, options?: ClusterPoolsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ClusterPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ClusterPoolsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ClusterPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClusterPoolsCreateOrUpdateResponse = ClusterPool; + +// @public +export interface ClusterPoolsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ClusterPoolsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClusterPoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterPoolsGetResponse = ClusterPool; + +// @public +export interface ClusterPoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterPoolsListByResourceGroupNextResponse = ClusterPoolListResult; + +// @public +export interface ClusterPoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterPoolsListByResourceGroupResponse = ClusterPoolListResult; + +// @public +export interface ClusterPoolsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterPoolsListBySubscriptionNextResponse = ClusterPoolListResult; + +// @public +export interface ClusterPoolsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClusterPoolsListBySubscriptionResponse = ClusterPoolListResult; + +// @public +export interface ClusterPoolsUpdateTagsHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ClusterPoolsUpdateTagsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClusterPoolsUpdateTagsResponse = ClusterPool; + +// @public +export interface ClusterPoolVersion extends ProxyResource { + aksVersion?: string; + clusterPoolVersion?: string; + isPreview?: boolean; +} + +// @public +export interface ClusterPoolVersionsListResult { + readonly nextLink?: string; + value?: ClusterPoolVersion[]; +} + +// @public +export interface ClusterProfile { + authorizationProfile: AuthorizationProfile; + autoscaleProfile?: AutoscaleProfile; + clusterVersion: string; + readonly components?: ClusterComponentsItem[]; + readonly connectivityProfile?: ConnectivityProfile; + flinkProfile?: FlinkProfile; + identityProfile: IdentityProfile; + kafkaProfile?: { + [propertyName: string]: any; + }; + llapProfile?: { + [propertyName: string]: any; + }; + logAnalyticsProfile?: ClusterLogAnalyticsProfile; + ossVersion: string; + prometheusProfile?: ClusterPrometheusProfile; + scriptActionProfiles?: ScriptActionProfile[]; + secretsProfile?: SecretsProfile; + serviceConfigsProfiles?: ClusterServiceConfigsProfile[]; + sparkProfile?: SparkProfile; + sshProfile?: SshProfile; + stubProfile?: { + [propertyName: string]: any; + }; + trinoProfile?: TrinoProfile; +} + +// @public +export interface ClusterPrometheusProfile { + enabled: boolean; +} + +// @public +export interface ClusterResizeData extends TrackedResource { + targetWorkerNodeCount?: number; +} + +// @public +export interface Clusters { + beginCreate(resourceGroupName: string, clusterPoolName: string, clusterName: string, hDInsightCluster: Cluster, options?: ClustersCreateOptionalParams): Promise, ClustersCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, hDInsightCluster: Cluster, options?: ClustersCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; + beginResize(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterResizeRequest: ClusterResizeData, options?: ClustersResizeOptionalParams): Promise, ClustersResizeResponse>>; + beginResizeAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterResizeRequest: ClusterResizeData, options?: ClustersResizeOptionalParams): Promise; + beginUpdate(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterPatchRequest: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterPatchRequest: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise; + get(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; + getInstanceView(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClustersGetInstanceViewOptionalParams): Promise; + listByClusterPoolName(resourceGroupName: string, clusterPoolName: string, options?: ClustersListByClusterPoolNameOptionalParams): PagedAsyncIterableIterator; + listInstanceViews(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClustersListInstanceViewsOptionalParams): PagedAsyncIterableIterator; + listServiceConfigs(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClustersListServiceConfigsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ClustersCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClustersCreateResponse = Cluster; + +// @public +export interface ClustersDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ClusterServiceConfig { + component: string; + files: ClusterConfigFile[]; +} + +// @public +export interface ClusterServiceConfigsProfile { + configs: ClusterServiceConfig[]; + serviceName: string; +} + +// @public +export interface ClustersGetInstanceViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersGetInstanceViewResponse = ClusterInstanceViewResult; + +// @public +export interface ClustersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersGetResponse = Cluster; + +// @public +export interface ClustersListByClusterPoolNameNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersListByClusterPoolNameNextResponse = ClusterListResult; + +// @public +export interface ClustersListByClusterPoolNameOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersListByClusterPoolNameResponse = ClusterListResult; + +// @public +export interface ClustersListInstanceViewsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersListInstanceViewsNextResponse = ClusterInstanceViewsResult; + +// @public +export interface ClustersListInstanceViewsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersListInstanceViewsResponse = ClusterInstanceViewsResult; + +// @public +export interface ClustersListServiceConfigsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersListServiceConfigsNextResponse = ServiceConfigListResult; + +// @public +export interface ClustersListServiceConfigsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ClustersListServiceConfigsResponse = ServiceConfigListResult; + +// @public +export interface ClustersResizeHeaders { + location?: string; +} + +// @public +export interface ClustersResizeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClustersResizeResponse = Cluster; + +// @public +export interface ClustersUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ClustersUpdateResponse = Cluster; + +// @public +export interface ClusterVersion extends ProxyResource { + clusterPoolVersion?: string; + clusterType?: string; + clusterVersion?: string; + readonly components?: ClusterComponentsItem[]; + isPreview?: boolean; + ossVersion?: string; +} + +// @public +export interface ClusterVersionsListResult { + readonly nextLink?: string; + value?: ClusterVersion[]; +} + +// @public +export type ComparisonOperator = string; + +// @public +export interface ComparisonRule { + operator: ComparisonOperator; + threshold: number; +} + +// @public +export interface ComputeProfile { + nodes: NodeProfile[]; +} + +// @public +export interface ComputeResourceDefinition { + cpu: number; + memory: number; +} + +// @public +export interface ConnectivityProfile { + ssh?: SshConnectivityEndpoint[]; + web: ConnectivityProfileWeb; +} + +// @public +export interface ConnectivityProfileWeb extends WebConnectivityEndpoint { +} + +// @public +export type ContentEncoding = string; + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface FlinkCatalogOptions { + hive?: FlinkHiveCatalogOption; +} + +// @public +export interface FlinkHiveCatalogOption { + metastoreDbConnectionPasswordSecret: string; + metastoreDbConnectionURL: string; + metastoreDbConnectionUserName: string; +} + +// @public +export interface FlinkJobProperties extends ClusterJobProperties { + action?: Action; + readonly actionResult?: string; + args?: string; + entryClass?: string; + flinkConfiguration?: { + [propertyName: string]: string; + }; + jarName?: string; + readonly jobId?: string; + jobJarDirectory?: string; + jobName: string; + readonly jobOutput?: string; + jobType: "FlinkJob"; + readonly lastSavePoint?: string; + savePointName?: string; + readonly status?: string; +} + +// @public +export interface FlinkProfile { + catalogOptions?: FlinkCatalogOptions; + historyServer?: ComputeResourceDefinition; + jobManager: ComputeResourceDefinition; + numReplicas?: number; + storage: FlinkStorageProfile; + taskManager: ComputeResourceDefinition; +} + +// @public +export interface FlinkStorageProfile { + storagekey?: string; + storageUri: string; +} + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public (undocumented) +export class HDInsightOnAksManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HDInsightOnAksManagementClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + availableClusterPoolVersions: AvailableClusterPoolVersions; + // (undocumented) + availableClusterVersions: AvailableClusterVersions; + // (undocumented) + clusterJobs: ClusterJobs; + // (undocumented) + clusterPools: ClusterPools; + // (undocumented) + clusters: Clusters; + // (undocumented) + locations: Locations; + // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface HDInsightOnAksManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface HiveCatalogOption { + catalogName: string; + metastoreDbConnectionPasswordSecret: string; + metastoreDbConnectionURL: string; + metastoreDbConnectionUserName: string; + metastoreWarehouseDir: string; +} + +// @public +export interface IdentityProfile { + msiClientId: string; + msiObjectId: string; + msiResourceId: string; +} + +// @public +export type JobType = string; + +// @public +export type KeyVaultObjectType = string; + +// @public +export enum KnownAction { + Cancel = "CANCEL", + Delete = "DELETE", + ListSavepoint = "LIST_SAVEPOINT", + NEW = "NEW", + Savepoint = "SAVEPOINT", + Start = "START", + StatelessUpdate = "STATELESS_UPDATE", + Stop = "STOP", + Update = "UPDATE" +} + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownAutoscaleType { + LoadBased = "LoadBased", + ScheduleBased = "ScheduleBased" +} + +// @public +export enum KnownComparisonOperator { + GreaterThan = "greaterThan", + GreaterThanOrEqual = "greaterThanOrEqual", + LessThan = "lessThan", + LessThanOrEqual = "lessThanOrEqual" +} + +// @public +export enum KnownContentEncoding { + Base64 = "Base64", + None = "None" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownJobType { + FlinkJob = "FlinkJob" +} + +// @public +export enum KnownKeyVaultObjectType { + Certificate = "Certificate", + Key = "Key", + Secret = "Secret" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownProvisioningStatus { + Accepted = "Accepted", + Canceled = "Canceled", + Failed = "Failed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownScaleActionType { + Scaledown = "scaledown", + Scaleup = "scaleup" +} + +// @public +export enum KnownScheduleDay { + Friday = "Friday", + Monday = "Monday", + Saturday = "Saturday", + Sunday = "Sunday", + Thursday = "Thursday", + Tuesday = "Tuesday", + Wednesday = "Wednesday" +} + +// @public +export interface LoadBasedConfig { + cooldownPeriod?: number; + maxNodes: number; + minNodes: number; + pollInterval?: number; + scalingRules: ScalingRule[]; +} + +// @public +export interface Locations { + checkNameAvailability(location: string, nameAvailabilityParameters: NameAvailabilityParameters, options?: LocationsCheckNameAvailabilityOptionalParams): Promise; +} + +// @public +export interface LocationsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LocationsCheckNameAvailabilityResponse = NameAvailabilityResult; + +// @public +export interface NameAvailabilityParameters { + name?: string; + type?: string; +} + +// @public +export interface NameAvailabilityResult { + message?: string; + nameAvailable?: boolean; + reason?: string; +} + +// @public +export interface NodeProfile { + count: number; + type: string; + vmSize: string; +} + +// @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 interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @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 type Origin = string; + +// @public +export type ProvisioningStatus = string; + +// @public +export interface ProxyResource extends Resource { +} + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export type ScaleActionType = string; + +// @public +export interface ScalingRule { + actionType: ScaleActionType; + comparisonRule: ComparisonRule; + evaluationCount: number; + scalingMetric: string; +} + +// @public +export interface Schedule { + count: number; + days: ScheduleDay[]; + endTime: string; + startTime: string; +} + +// @public +export interface ScheduleBasedConfig { + defaultCount: number; + schedules: Schedule[]; + timeZone: string; +} + +// @public +export type ScheduleDay = string; + +// @public +export interface ScriptActionProfile { + name: string; + parameters?: string; + services: string[]; + shouldPersist?: boolean; + timeoutInMinutes?: number; + type: string; + url: string; +} + +// @public +export interface SecretReference { + keyVaultObjectName: string; + referenceName: string; + type: KeyVaultObjectType; + version?: string; +} + +// @public +export interface SecretsProfile { + keyVaultResourceId: string; + secrets?: SecretReference[]; +} + +// @public +export interface ServiceConfigListResult { + readonly nextLink?: string; + value?: ServiceConfigResult[]; +} + +// @public +export interface ServiceConfigListResultProperties { + componentName: string; + content?: string; + customKeys?: { + [propertyName: string]: string; + }; + defaultKeys?: { + [propertyName: string]: ServiceConfigListResultValueEntity; + }; + fileName: string; + path?: string; + serviceName: string; + type?: string; +} + +// @public +export interface ServiceConfigListResultValueEntity { + description?: string; + value: string; +} + +// @public +export interface ServiceConfigResult { + componentName?: string; + content?: string; + customKeys?: { + [propertyName: string]: string; + }; + defaultKeys?: { + [propertyName: string]: ServiceConfigListResultValueEntity; + }; + fileName?: string; + path?: string; + serviceName?: string; + type?: string; +} + +// @public +export interface ServiceConfigResultProperties extends ServiceConfigListResultProperties { +} + +// @public +export interface ServiceStatus { + kind: string; + message?: string; + ready: string; +} + +// @public +export interface SparkMetastoreSpec { + dbName?: string; + dbPasswordSecretName: string; + dbServerHost: string; + dbUserName: string; + keyVaultId: string; + thriftUrl?: string; +} + +// @public +export interface SparkProfile { + defaultStorageUrl?: string; + metastoreSpec?: SparkMetastoreSpec; + userPluginsSpec?: SparkUserPlugins; +} + +// @public +export interface SparkUserPlugin { + path: string; +} + +// @public +export interface SparkUserPlugins { + plugins?: SparkUserPlugin[]; +} + +// @public +export interface SshConnectivityEndpoint { + endpoint: string; +} + +// @public +export interface SshProfile { + count: number; + readonly podPrefix?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TagsObject { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface TrinoCoordinator { + enable?: boolean; + highAvailabilityEnabled?: boolean; + port?: number; + suspend?: boolean; +} + +// @public +export interface TrinoProfile { + catalogOptions?: CatalogOptions; + coordinator?: TrinoCoordinator; + userPluginsSpec?: TrinoUserPlugins; + userTelemetrySpec?: TrinoUserTelemetry; + worker?: TrinoWorker; +} + +// @public +export interface TrinoTelemetryConfig { + hivecatalogName?: string; + hivecatalogSchema?: string; + partitionRetentionInDays?: number; + path?: string; +} + +// @public +export interface TrinoUserPlugin { + enabled?: boolean; + name?: string; + path?: string; +} + +// @public +export interface TrinoUserPlugins { + plugins?: TrinoUserPlugin[]; +} + +// @public +export interface TrinoUserTelemetry { + storage?: TrinoTelemetryConfig; +} + +// @public +export interface TrinoWorker { + enable?: boolean; + port?: number; + suspend?: boolean; +} + +// @public +export interface UpdatableClusterProfile { + authorizationProfile?: AuthorizationProfile; + autoscaleProfile?: AutoscaleProfile; + logAnalyticsProfile?: ClusterLogAnalyticsProfile; + prometheusProfile?: ClusterPrometheusProfile; + scriptActionProfiles?: ScriptActionProfile[]; + serviceConfigsProfiles?: ClusterServiceConfigsProfile[]; + sshProfile?: SshProfile; +} + +// @public +export interface WebConnectivityEndpoint { + fqdn: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/hdinsight/arm-hdinsightonaks/rollup.config.js b/sdk/hdinsight/arm-hdinsightonaks/rollup.config.js new file mode 100644 index 000000000000..3f89d7309da5 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/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/hdinsight/arm-hdinsightonaks/sample.env b/sdk/hdinsight/arm-hdinsightonaks/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/hDInsightOnAksManagementClient.ts b/sdk/hdinsight/arm-hdinsightonaks/src/hDInsightOnAksManagementClient.ts new file mode 100644 index 000000000000..74542dd0400b --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/hDInsightOnAksManagementClient.ts @@ -0,0 +1,170 @@ +/* + * 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 { + ClusterPoolsImpl, + ClustersImpl, + ClusterJobsImpl, + LocationsImpl, + OperationsImpl, + AvailableClusterPoolVersionsImpl, + AvailableClusterVersionsImpl +} from "./operations"; +import { + ClusterPools, + Clusters, + ClusterJobs, + Locations, + Operations, + AvailableClusterPoolVersions, + AvailableClusterVersions +} from "./operationsInterfaces"; +import { HDInsightOnAksManagementClientOptionalParams } from "./models"; + +export class HDInsightOnAksManagementClient extends coreClient.ServiceClient { + $host: string; + subscriptionId: string; + apiVersion: string; + + /** + * Initializes a new instance of the HDInsightOnAksManagementClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: HDInsightOnAksManagementClientOptionalParams + ) { + 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: HDInsightOnAksManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-hdinsightonaks/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: + options.endpoint ?? options.baseUri ?? "https://management.azure.com" + }; + super(optionsWithDefaults); + + let bearerTokenAuthenticationPolicyFound: boolean = false; + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.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 || "2023-06-01-preview"; + this.clusterPools = new ClusterPoolsImpl(this); + this.clusters = new ClustersImpl(this); + this.clusterJobs = new ClusterJobsImpl(this); + this.locations = new LocationsImpl(this); + this.operations = new OperationsImpl(this); + this.availableClusterPoolVersions = new AvailableClusterPoolVersionsImpl( + this + ); + this.availableClusterVersions = new AvailableClusterVersionsImpl(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 "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + clusterPools: ClusterPools; + clusters: Clusters; + clusterJobs: ClusterJobs; + locations: Locations; + operations: Operations; + availableClusterPoolVersions: AvailableClusterPoolVersions; + availableClusterVersions: AvailableClusterVersions; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/index.ts b/sdk/hdinsight/arm-hdinsightonaks/src/index.ts new file mode 100644 index 000000000000..15c4f6cf17b4 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { HDInsightOnAksManagementClient } from "./hDInsightOnAksManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/lroImpl.ts b/sdk/hdinsight/arm-hdinsightonaks/src/lroImpl.ts new file mode 100644 index 000000000000..dd803cd5e28c --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/models/index.ts b/sdk/hdinsight/arm-hdinsightonaks/src/models/index.ts new file mode 100644 index 000000000000..9fa3f8cf60ce --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/models/index.ts @@ -0,0 +1,1639 @@ +/* + * 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 ClusterJobPropertiesUnion = + | ClusterJobProperties + | FlinkJobProperties; + +/** Cluster pool profile. */ +export interface ClusterPoolProfile { + /** Cluster pool version is a 2-part version. */ + clusterPoolVersion: string; +} + +/** Cluster pool compute profile. */ +export interface ClusterPoolComputeProfile { + /** The virtual machine SKU. */ + vmSize: string; + /** The number of virtual machines. */ + count?: number; +} + +/** Properties of the cluster pool underlying AKS cluster. */ +export interface AksClusterProfile { + /** ARM Resource ID of the AKS cluster */ + aksClusterResourceId?: string; + /** Identity properties of the AKS cluster agentpool MSI */ + aksClusterAgentPoolIdentityProfile?: AksClusterProfileAksClusterAgentPoolIdentityProfile; + /** + * AKS control plane and default node pool version of this ClusterPool + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly aksVersion?: string; +} + +/** Identity Profile with details of an MSI. */ +export interface IdentityProfile { + /** ResourceId of the MSI. */ + msiResourceId: string; + /** ClientId of the MSI. */ + msiClientId: string; + /** ObjectId of the MSI. */ + msiObjectId: string; +} + +/** Cluster pool networking configuration. */ +export interface ClusterPoolNetworkProfile { + /** Cluster pool subnet resource id. */ + subnetId: string; +} + +/** Cluster pool log analytics profile used to enable or disable OMS agent for AKS cluster. */ +export interface ClusterPoolLogAnalyticsProfile { + /** True if log analytics is enabled for cluster pool, otherwise false. */ + enabled: boolean; + /** Log analytics workspace to associate with the OMS agent. */ + workspaceId?: 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. E.g. "/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; +} + +/** Tags object for patch operations. */ +export interface TagsObject { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** The list cluster pools operation response. */ +export interface ClusterPoolListResult { + /** The list of cluster pools. */ + value?: ClusterPool[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The list cluster operation response. */ +export interface ClusterListResult { + /** The list of clusters. */ + value?: Cluster[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The compute profile. */ +export interface ComputeProfile { + /** The nodes definitions. */ + nodes: NodeProfile[]; +} + +/** The node profile. */ +export interface NodeProfile { + /** The node type. */ + type: string; + /** The virtual machine SKU. */ + vmSize: string; + /** The number of virtual machines. */ + count: number; +} + +/** Cluster profile. */ +export interface ClusterProfile { + /** Version with 3/4 part. */ + clusterVersion: string; + /** Version with three part. */ + ossVersion: string; + /** + * Component list of this cluster type and version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly components?: ClusterComponentsItem[]; + /** Identity Profile with details of an MSI. */ + identityProfile: IdentityProfile; + /** Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. */ + authorizationProfile: AuthorizationProfile; + /** The cluster secret profile. */ + secretsProfile?: SecretsProfile; + /** The service configs profiles. */ + serviceConfigsProfiles?: ClusterServiceConfigsProfile[]; + /** + * Cluster connectivity profile. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectivityProfile?: ConnectivityProfile; + /** Cluster log analytics profile to enable or disable OMS agent for cluster. */ + logAnalyticsProfile?: ClusterLogAnalyticsProfile; + /** Cluster Prometheus profile. */ + prometheusProfile?: ClusterPrometheusProfile; + /** Ssh profile for the cluster. */ + sshProfile?: SshProfile; + /** This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. */ + autoscaleProfile?: AutoscaleProfile; + /** Kafka cluster profile. */ + kafkaProfile?: { [propertyName: string]: any }; + /** Trino Cluster profile. */ + trinoProfile?: TrinoProfile; + /** LLAP cluster profile. */ + llapProfile?: { [propertyName: string]: any }; + /** The Flink cluster profile. */ + flinkProfile?: FlinkProfile; + /** The spark cluster profile. */ + sparkProfile?: SparkProfile; + /** Stub cluster profile. */ + stubProfile?: { [propertyName: string]: any }; + /** The script action profile list. */ + scriptActionProfiles?: ScriptActionProfile[]; +} + +export interface ClusterComponentsItem { + name?: string; + version?: string; +} + +/** Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. */ +export interface AuthorizationProfile { + /** AAD user Ids authorized for data plane access. */ + userIds?: string[]; + /** AAD group Ids authorized for data plane access. */ + groupIds?: string[]; +} + +/** The cluster secret profile. */ +export interface SecretsProfile { + /** Name of the user Key Vault where all the cluster specific user secrets are stored. */ + keyVaultResourceId: string; + /** Properties of Key Vault secret. */ + secrets?: SecretReference[]; +} + +/** Secret reference and corresponding properties of a key vault secret. */ +export interface SecretReference { + /** Reference name of the secret to be used in service configs. */ + referenceName: string; + /** Type of key vault object: secret, key or certificate. */ + type: KeyVaultObjectType; + /** Version of the secret in key vault. */ + version?: string; + /** Object identifier name of the secret in key vault. */ + keyVaultObjectName: string; +} + +/** Cluster service configs. */ +export interface ClusterServiceConfigsProfile { + /** Name of the service the configurations should apply to. */ + serviceName: string; + /** List of service configs. */ + configs: ClusterServiceConfig[]; +} + +/** Cluster configs per component. */ +export interface ClusterServiceConfig { + /** Name of the component the config files should apply to. */ + component: string; + /** List of Config Files. */ + files: ClusterConfigFile[]; +} + +/** Cluster configuration files. */ +export interface ClusterConfigFile { + /** Configuration file name. */ + fileName: string; + /** Free form content of the entire configuration file. */ + content?: string; + /** This property indicates if the content is encoded and is case-insensitive. Please set the value to base64 if the content is base64 encoded. Set it to none or skip it if the content is plain text. */ + encoding?: ContentEncoding; + /** Path of the config file if content is specified. */ + path?: string; + /** + * List of key value pairs + * where key represents a valid service configuration name and value represents the value of the config. + */ + values?: { [propertyName: string]: string }; +} + +/** Cluster connectivity profile. */ +export interface ConnectivityProfile { + /** Web connectivity endpoint details. */ + web: ConnectivityProfileWeb; + /** List of SSH connectivity endpoints. */ + ssh?: SshConnectivityEndpoint[]; +} + +/** Web connectivity endpoint details. */ +export interface WebConnectivityEndpoint { + /** Web connectivity endpoint. */ + fqdn: string; +} + +/** SSH connectivity endpoint details. */ +export interface SshConnectivityEndpoint { + /** SSH connectivity endpoint. */ + endpoint: string; +} + +/** Cluster log analytics profile to enable or disable OMS agent for cluster. */ +export interface ClusterLogAnalyticsProfile { + /** True if log analytics is enabled for the cluster, otherwise false. */ + enabled: boolean; + /** Collection of logs to be enabled or disabled for log analytics. */ + applicationLogs?: ClusterLogAnalyticsApplicationLogs; + /** True if metrics are enabled, otherwise false. */ + metricsEnabled?: boolean; +} + +/** Collection of logs to be enabled or disabled for log analytics. */ +export interface ClusterLogAnalyticsApplicationLogs { + /** True if stdout is enabled, otherwise false. */ + stdOutEnabled?: boolean; + /** True if stderror is enabled, otherwise false. */ + stdErrorEnabled?: boolean; +} + +/** Cluster Prometheus profile. */ +export interface ClusterPrometheusProfile { + /** Enable Prometheus for cluster or not. */ + enabled: boolean; +} + +/** Ssh profile for the cluster. */ +export interface SshProfile { + /** Number of ssh pods per cluster. */ + count: number; + /** + * Prefix of the pod names. Pod number will be appended to the prefix. The ingress URLs for the pods will be available at //- + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly podPrefix?: string; +} + +/** This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. */ +export interface AutoscaleProfile { + /** This indicates whether auto scale is enabled on HDInsight on AKS cluster. */ + enabled: boolean; + /** This property is for graceful decommission timeout; It has a default setting of 3600 seconds before forced shutdown takes place. This is the maximal time to wait for running containers and applications to complete before transition a DECOMMISSIONING node into DECOMMISSIONED. The default value is 3600 seconds. Negative value (like -1) is handled as infinite timeout. */ + gracefulDecommissionTimeout?: number; + /** User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. */ + autoscaleType?: AutoscaleType; + /** Profiles of schedule based Autoscale. */ + scheduleBasedConfig?: ScheduleBasedConfig; + /** Profiles of load based Autoscale. */ + loadBasedConfig?: LoadBasedConfig; +} + +/** Profile of schedule based Autoscale. */ +export interface ScheduleBasedConfig { + /** User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration. */ + timeZone: string; + /** Setting default node count of current schedule configuration. Default node count specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale down) */ + defaultCount: number; + /** This specifies the schedules where scheduled based Autoscale to be enabled, the user has a choice to set multiple rules within the schedule across days and times (start/end). */ + schedules: Schedule[]; +} + +/** Schedule definition. */ +export interface Schedule { + /** User has to set the start time of current schedule configuration, format like 10:30 (HH:MM). */ + startTime: string; + /** User has to set the end time of current schedule configuration, format like 10:30 (HH:MM). */ + endTime: string; + /** User has to set the node count anticipated at end of the scaling operation of the set current schedule configuration, format is integer. */ + count: number; + /** User has to set the days where schedule has to be set for autoscale operation. */ + days: ScheduleDay[]; +} + +/** Profile of load based Autoscale. */ +export interface LoadBasedConfig { + /** User needs to set the minimum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes. */ + minNodes: number; + /** User needs to set the maximum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes. */ + maxNodes: number; + /** User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation. */ + pollInterval?: number; + /** This is a cool down period, this is a time period in seconds, which determines the amount of time that must elapse between a scaling activity started by a rule and the start of the next scaling activity, regardless of the rule that triggers it. The default value is 300 seconds. */ + cooldownPeriod?: number; + /** The scaling rules. */ + scalingRules: ScalingRule[]; +} + +/** The scaling rule. */ +export interface ScalingRule { + /** The action type. */ + actionType: ScaleActionType; + /** This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered. */ + evaluationCount: number; + /** Metrics name for individual workloads. For example: cpu */ + scalingMetric: string; + /** The comparison rule. */ + comparisonRule: ComparisonRule; +} + +/** The comparison rule. */ +export interface ComparisonRule { + /** The comparison operator. */ + operator: ComparisonOperator; + /** Threshold setting. */ + threshold: number; +} + +/** Trino Cluster profile. */ +export interface TrinoProfile { + /** Trino cluster catalog options. */ + catalogOptions?: CatalogOptions; + /** Trino Coordinator. */ + coordinator?: TrinoCoordinator; + /** Trino user plugins spec */ + userPluginsSpec?: TrinoUserPlugins; + /** User telemetry */ + userTelemetrySpec?: TrinoUserTelemetry; + /** Trino worker. */ + worker?: TrinoWorker; +} + +/** Trino cluster catalog options. */ +export interface CatalogOptions { + /** hive catalog options. */ + hive?: HiveCatalogOption[]; +} + +/** Hive Catalog Option */ +export interface HiveCatalogOption { + /** Name of trino catalog which should use specified hive metastore. */ + catalogName: string; + /** Secret reference name from secretsProfile.secrets containing password for database connection. */ + metastoreDbConnectionPasswordSecret: string; + /** Connection string for hive metastore database. */ + metastoreDbConnectionURL: string; + /** User name for database connection. */ + metastoreDbConnectionUserName: string; + /** Metastore root directory URI, format: abfs[s]://@.dfs.core.windows.net/. More details: https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri */ + metastoreWarehouseDir: string; +} + +/** Trino Coordinator. */ +export interface TrinoCoordinator { + /** The flag that if enable coordinator HA, uses multiple coordinator replicas with auto failover, one per each head node. Default: true. */ + highAvailabilityEnabled?: boolean; + /** The flag that if enable debug or not. */ + enable?: boolean; + /** The debug port. */ + port?: number; + /** The flag that if suspend debug or not. */ + suspend?: boolean; +} + +/** Trino user plugins spec */ +export interface TrinoUserPlugins { + /** Trino user plugins. */ + plugins?: TrinoUserPlugin[]; +} + +/** Trino user plugin. */ +export interface TrinoUserPlugin { + /** Denotes whether the plugin is active or not. */ + enabled?: boolean; + /** This field maps to the sub-directory in trino plugins location, that will contain all the plugins under path. */ + name?: string; + /** Fully qualified path to the folder containing the plugins. */ + path?: string; +} + +/** User telemetry */ +export interface TrinoUserTelemetry { + /** Trino user telemetry definition. */ + storage?: TrinoTelemetryConfig; +} + +/** Trino user telemetry definition. */ +export interface TrinoTelemetryConfig { + /** Hive Catalog name used to mount external tables on the logs written by trino, if not specified there tables are not created. */ + hivecatalogName?: string; + /** Schema of the above catalog to use, to mount query logs as external tables, if not specified tables will be mounted under schema trinologs. */ + hivecatalogSchema?: string; + /** Retention period for query log table partitions, this doesn't have any affect on actual data. */ + partitionRetentionInDays?: number; + /** Azure storage location of the blobs. */ + path?: string; +} + +/** Trino worker. */ +export interface TrinoWorker { + /** The flag that if enable debug or not. */ + enable?: boolean; + /** The debug port. */ + port?: number; + /** The flag that if suspend debug or not. */ + suspend?: boolean; +} + +/** The Flink cluster profile. */ +export interface FlinkProfile { + /** The storage profile */ + storage: FlinkStorageProfile; + /** The number of task managers. */ + numReplicas?: number; + /** Job Manager container/ process CPU and memory requirements */ + jobManager: ComputeResourceDefinition; + /** History Server container/ process CPU and memory requirements */ + historyServer?: ComputeResourceDefinition; + /** Task Manager container/ process CPU and memory requirements */ + taskManager: ComputeResourceDefinition; + /** Flink cluster catalog options. */ + catalogOptions?: FlinkCatalogOptions; +} + +/** The storage profile */ +export interface FlinkStorageProfile { + /** Storage account uri which is used for savepoint and checkpoint state. */ + storageUri: string; + /** Storage key is only required for wasb(s) storage. */ + storagekey?: string; +} + +/** The cpu and memory requirement definition. */ +export interface ComputeResourceDefinition { + /** The required CPU. */ + cpu: number; + /** The required memory in MB, Container memory will be 110 percentile */ + memory: number; +} + +/** Flink cluster catalog options. */ +export interface FlinkCatalogOptions { + /** Hive Catalog Option for Flink cluster. */ + hive?: FlinkHiveCatalogOption; +} + +/** Hive Catalog Option for Flink cluster. */ +export interface FlinkHiveCatalogOption { + /** Secret reference name from secretsProfile.secrets containing password for database connection. */ + metastoreDbConnectionPasswordSecret: string; + /** Connection string for hive metastore database. */ + metastoreDbConnectionURL: string; + /** User name for database connection. */ + metastoreDbConnectionUserName: string; +} + +/** The spark cluster profile. */ +export interface SparkProfile { + /** The default storage URL. */ + defaultStorageUrl?: string; + /** The metastore specification for Spark cluster. */ + metastoreSpec?: SparkMetastoreSpec; + /** Spark user plugins spec */ + userPluginsSpec?: SparkUserPlugins; +} + +/** The metastore specification for Spark cluster. */ +export interface SparkMetastoreSpec { + /** The database server host. */ + dbServerHost: string; + /** The database name. */ + dbName?: string; + /** The database user name. */ + dbUserName: string; + /** The secret name which contains the database user password. */ + dbPasswordSecretName: string; + /** The key vault resource id. */ + keyVaultId: string; + /** The thrift url. */ + thriftUrl?: string; +} + +/** Spark user plugins spec */ +export interface SparkUserPlugins { + /** Spark user plugins. */ + plugins?: SparkUserPlugin[]; +} + +/** Spark user plugin. */ +export interface SparkUserPlugin { + /** Fully qualified path to the folder containing the plugins. */ + path: string; +} + +/** The script action profile. */ +export interface ScriptActionProfile { + /** Type of the script action. Supported type is bash scripts. */ + type: string; + /** Script name. */ + name: string; + /** Url of the script file. */ + url: string; + /** Additional parameters for the script action. It should be space-separated list of arguments required for script execution. */ + parameters?: string; + /** List of services to apply the script action. */ + services: string[]; + /** Timeout duration for the script action in minutes. */ + timeoutInMinutes?: number; + /** Specify if the script should persist on the cluster. */ + shouldPersist?: boolean; +} + +/** Cluster resource patch properties. */ +export interface UpdatableClusterProfile { + /** The service configs profiles. */ + serviceConfigsProfiles?: ClusterServiceConfigsProfile[]; + /** Ssh profile for the cluster. */ + sshProfile?: SshProfile; + /** This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. */ + autoscaleProfile?: AutoscaleProfile; + /** Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. */ + authorizationProfile?: AuthorizationProfile; + /** Cluster log analytics profile to enable or disable OMS agent for cluster. */ + logAnalyticsProfile?: ClusterLogAnalyticsProfile; + /** Cluster Prometheus profile. */ + prometheusProfile?: ClusterPrometheusProfile; + /** The script action profile list. */ + scriptActionProfiles?: ScriptActionProfile[]; +} + +/** Properties of cluster job. */ +export interface ClusterJobProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobType: "FlinkJob"; +} + +/** Collection of cluster job. */ +export interface ClusterJobList { + /** Collection of cluster job. */ + value: ClusterJob[]; + /** The Url of next result page. */ + nextLink?: string; +} + +/** Cluster instance service configs api response. */ +export interface ServiceConfigListResult { + /** Cluster instance service config array. */ + value?: ServiceConfigResult[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Cluster instance service config. */ +export interface ServiceConfigResult { + /** Service Config Name. */ + serviceName?: string; + /** File Name. */ + fileName?: string; + /** Content in the service config file. */ + content?: string; + /** Component Name. */ + componentName?: string; + /** Config type. */ + type?: string; + /** Config file path. */ + path?: string; + /** The custom keys. */ + customKeys?: { [propertyName: string]: string }; + /** The default keys. */ + defaultKeys?: { [propertyName: string]: ServiceConfigListResultValueEntity }; +} + +/** Service config response. */ +export interface ServiceConfigListResultProperties { + /** Service Config Name. */ + serviceName: string; + /** File Name. */ + fileName: string; + /** Content in the service config file. */ + content?: string; + /** Component Name. */ + componentName: string; + /** Config type. */ + type?: string; + /** Config file path. */ + path?: string; + /** The custom keys. */ + customKeys?: { [propertyName: string]: string }; + /** The default keys. */ + defaultKeys?: { [propertyName: string]: ServiceConfigListResultValueEntity }; +} + +/** Default config details. */ +export interface ServiceConfigListResultValueEntity { + /** Config value. */ + value: string; + /** Config description. */ + description?: string; +} + +/** Details of check name availability request body. */ +export interface NameAvailabilityParameters { + /** Name for checking availability. */ + name?: string; + /** The resource type in Microsoft.HDInsight. */ + type?: string; +} + +/** Result of check name availability. */ +export interface NameAvailabilityResult { + /** Indicator of availability of the Microsoft.HDInsight resource name. */ + nameAvailable?: boolean; + /** The reason of unavailability. */ + reason?: string; + /** The error message of unavailability. */ + message?: string; +} + +/** The instance view of a HDInsight Cluster. */ +export interface ClusterInstanceViewsResult { + /** Cluster instance view array. */ + value?: ClusterInstanceViewResult[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Cluster Instance View. */ +export interface ClusterInstanceViewResult { + /** Name of the instance view. */ + name: string; + /** Status of the instance view. */ + status: ClusterInstanceViewPropertiesStatus; + /** List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. */ + serviceStatuses: ServiceStatus[]; +} + +/** Cluster Instance View Properties. */ +export interface ClusterInstanceViewProperties { + /** Status of the instance view. */ + status: ClusterInstanceViewPropertiesStatus; + /** List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. */ + serviceStatuses: ServiceStatus[]; +} + +/** Status of the instance view. */ +export interface ClusterInstanceViewStatus { + /** The cluster ready status */ + ready: string; + /** The status reason. */ + reason?: string; + /** The additional message. */ + message?: string; +} + +/** Describes the status of a service of a HDInsight on aks cluster. */ +export interface ServiceStatus { + /** Kind of the service. E.g. "Zookeeper". */ + kind: string; + /** Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or anything else. */ + ready: string; + /** A message describing the error if any. */ + message?: string; +} + +/** 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; +} + +/** Represents a list of cluster pool versions. */ +export interface ClusterPoolVersionsListResult { + /** The list of cluster pool versions. */ + value?: ClusterPoolVersion[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents a list of cluster versions. */ +export interface ClusterVersionsListResult { + /** The list of cluster versions. */ + value?: ClusterVersion[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** CLuster pool profile. */ +export interface ClusterPoolResourcePropertiesClusterPoolProfile + extends ClusterPoolProfile {} + +/** CLuster pool compute profile. */ +export interface ClusterPoolResourcePropertiesComputeProfile + extends ClusterPoolComputeProfile {} + +/** Properties of underlying AKS cluster. */ +export interface ClusterPoolResourcePropertiesAksClusterProfile + extends AksClusterProfile {} + +/** Identity properties of the AKS cluster agentpool MSI */ +export interface AksClusterProfileAksClusterAgentPoolIdentityProfile + extends IdentityProfile {} + +/** Cluster pool network profile. */ +export interface ClusterPoolResourcePropertiesNetworkProfile + extends ClusterPoolNetworkProfile {} + +/** Cluster pool log analytics profile to enable OMS agent for AKS cluster. */ +export interface ClusterPoolResourcePropertiesLogAnalyticsProfile + extends ClusterPoolLogAnalyticsProfile {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends 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 interface ProxyResource extends Resource {} + +/** Web connectivity endpoint details. */ +export interface ConnectivityProfileWeb extends WebConnectivityEndpoint {} + +/** Properties of flink job. */ +export interface FlinkJobProperties extends ClusterJobProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobType: "FlinkJob"; + /** Name of job */ + jobName: string; + /** A string property that specifies the directory where the job JAR is located. */ + jobJarDirectory?: string; + /** A string property that represents the name of the job JAR. */ + jarName?: string; + /** A string property that specifies the entry class for the Flink job. */ + entryClass?: string; + /** A string property representing additional JVM arguments for the Flink job. It should be space separated value. */ + args?: string; + /** A string property that represents the name of the savepoint for the Flink job */ + savePointName?: string; + /** A string property that indicates the action to be performed on the Flink job. It can have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE. */ + action?: Action; + /** Additional properties used to configure Flink jobs. It allows users to set properties such as parallelism and jobSavePointDirectory. It accepts additional key-value pairs as properties, where the keys are strings and the values are strings as well. */ + flinkConfiguration?: { [propertyName: string]: string }; + /** + * Unique id for identifying a job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobId?: string; + /** + * Status of job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Output of job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobOutput?: string; + /** + * Action result of job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionResult?: string; + /** + * The last savepoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastSavePoint?: string; +} + +/** Cluster instance service config properties. */ +export interface ServiceConfigResultProperties + extends ServiceConfigListResultProperties {} + +/** Properties of the instance view. */ +export interface ClusterInstanceViewResultProperties + extends ClusterInstanceViewProperties {} + +/** Status of the instance view. */ +export interface ClusterInstanceViewPropertiesStatus + extends ClusterInstanceViewStatus {} + +/** Cluster pool. */ +export interface ClusterPool extends TrackedResource { + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningStatus; + /** + * A unique id generated by the RP to identify the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentId?: string; + /** A resource group created by RP, to hold the resources created by RP on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name restriction. */ + managedResourceGroupName?: string; + /** + * A resource group created by AKS, to hold the infrastructure resources created by AKS on-behalf of customers. It is generated by cluster pool name and managed resource group name by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly aksManagedResourceGroupName?: string; + /** CLuster pool profile. */ + clusterPoolProfile?: ClusterPoolResourcePropertiesClusterPoolProfile; + /** CLuster pool compute profile. */ + computeProfile?: ClusterPoolResourcePropertiesComputeProfile; + /** + * Properties of underlying AKS cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly aksClusterProfile?: ClusterPoolResourcePropertiesAksClusterProfile; + /** Cluster pool network profile. */ + networkProfile?: ClusterPoolResourcePropertiesNetworkProfile; + /** Cluster pool log analytics profile to enable OMS agent for AKS cluster. */ + logAnalyticsProfile?: ClusterPoolResourcePropertiesLogAnalyticsProfile; + /** + * Business status of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; +} + +/** The cluster. */ +export interface Cluster extends TrackedResource { + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningStatus; + /** The type of cluster. */ + clusterType?: string; + /** + * A unique id generated by the RP to identify the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentId?: string; + /** The compute profile. */ + computeProfile?: ComputeProfile; + /** Cluster profile. */ + clusterProfile?: ClusterProfile; + /** + * Business status of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; +} + +/** The parameters for resizing a cluster. */ +export interface ClusterResizeData extends TrackedResource { + /** Target node count of worker node. */ + targetWorkerNodeCount?: number; +} + +/** The patch for a cluster. */ +export interface ClusterPatch extends TrackedResource { + /** Cluster resource patch properties. */ + clusterProfile?: UpdatableClusterProfile; +} + +/** Cluster job. */ +export interface ClusterJob extends ProxyResource { + /** Properties of cluster job. */ + properties: ClusterJobPropertiesUnion; +} + +/** Available cluster pool version. */ +export interface ClusterPoolVersion extends ProxyResource { + /** Cluster pool version is a 2-part version. */ + clusterPoolVersion?: string; + /** AKS version. */ + aksVersion?: string; + /** Indicate if this version is in preview or not. */ + isPreview?: boolean; +} + +/** Available cluster version. */ +export interface ClusterVersion extends ProxyResource { + /** The type of cluster. */ + clusterType?: string; + /** Version with three part. */ + clusterVersion?: string; + /** Version with three part. */ + ossVersion?: string; + /** The two part cluster pool version. If the cluster version is before cluster pool version on-board, the return value will be empty string */ + clusterPoolVersion?: string; + /** Indicate if this version is in preview or not. */ + isPreview?: boolean; + /** + * Component list of this cluster type and version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly components?: ClusterComponentsItem[]; +} + +/** Defines headers for ClusterPools_updateTags operation. */ +export interface ClusterPoolsUpdateTagsHeaders { + location?: string; +} + +/** Defines headers for ClusterPools_delete operation. */ +export interface ClusterPoolsDeleteHeaders { + location?: string; +} + +/** Defines headers for Clusters_resize operation. */ +export interface ClustersResizeHeaders { + /** URL to get the status of the resize operation. */ + location?: string; +} + +/** Defines headers for Clusters_update operation. */ +export interface ClustersUpdateHeaders { + location?: string; +} + +/** Defines headers for Clusters_delete operation. */ +export interface ClustersDeleteHeaders { + location?: string; +} + +/** Defines headers for ClusterJobs_runJob operation. */ +export interface ClusterJobsRunJobHeaders { + /** URL to get the status of the resize operation. */ + location?: string; +} + +/** Known values of {@link ProvisioningStatus} that the service accepts. */ +export enum KnownProvisioningStatus { + /** Accepted */ + Accepted = "Accepted", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for ProvisioningStatus. \ + * {@link KnownProvisioningStatus} can be used interchangeably with ProvisioningStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Accepted** \ + * **Succeeded** \ + * **Canceled** \ + * **Failed** + */ +export type ProvisioningStatus = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + 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 KeyVaultObjectType} that the service accepts. */ +export enum KnownKeyVaultObjectType { + /** Key */ + Key = "Key", + /** Secret */ + Secret = "Secret", + /** Certificate */ + Certificate = "Certificate" +} + +/** + * Defines values for KeyVaultObjectType. \ + * {@link KnownKeyVaultObjectType} can be used interchangeably with KeyVaultObjectType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Key** \ + * **Secret** \ + * **Certificate** + */ +export type KeyVaultObjectType = string; + +/** Known values of {@link ContentEncoding} that the service accepts. */ +export enum KnownContentEncoding { + /** Base64 */ + Base64 = "Base64", + /** None */ + None = "None" +} + +/** + * Defines values for ContentEncoding. \ + * {@link KnownContentEncoding} can be used interchangeably with ContentEncoding, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Base64** \ + * **None** + */ +export type ContentEncoding = string; + +/** Known values of {@link AutoscaleType} that the service accepts. */ +export enum KnownAutoscaleType { + /** ScheduleBased */ + ScheduleBased = "ScheduleBased", + /** LoadBased */ + LoadBased = "LoadBased" +} + +/** + * Defines values for AutoscaleType. \ + * {@link KnownAutoscaleType} can be used interchangeably with AutoscaleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ScheduleBased** \ + * **LoadBased** + */ +export type AutoscaleType = string; + +/** Known values of {@link ScheduleDay} that the service accepts. */ +export enum KnownScheduleDay { + /** Sunday */ + Sunday = "Sunday", + /** Monday */ + Monday = "Monday", + /** Tuesday */ + Tuesday = "Tuesday", + /** Wednesday */ + Wednesday = "Wednesday", + /** Thursday */ + Thursday = "Thursday", + /** Friday */ + Friday = "Friday", + /** Saturday */ + Saturday = "Saturday" +} + +/** + * Defines values for ScheduleDay. \ + * {@link KnownScheduleDay} can be used interchangeably with ScheduleDay, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Sunday** \ + * **Monday** \ + * **Tuesday** \ + * **Wednesday** \ + * **Thursday** \ + * **Friday** \ + * **Saturday** + */ +export type ScheduleDay = string; + +/** Known values of {@link ScaleActionType} that the service accepts. */ +export enum KnownScaleActionType { + /** Scaleup */ + Scaleup = "scaleup", + /** Scaledown */ + Scaledown = "scaledown" +} + +/** + * Defines values for ScaleActionType. \ + * {@link KnownScaleActionType} can be used interchangeably with ScaleActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **scaleup** \ + * **scaledown** + */ +export type ScaleActionType = string; + +/** Known values of {@link ComparisonOperator} that the service accepts. */ +export enum KnownComparisonOperator { + /** GreaterThan */ + GreaterThan = "greaterThan", + /** GreaterThanOrEqual */ + GreaterThanOrEqual = "greaterThanOrEqual", + /** LessThan */ + LessThan = "lessThan", + /** LessThanOrEqual */ + LessThanOrEqual = "lessThanOrEqual" +} + +/** + * Defines values for ComparisonOperator. \ + * {@link KnownComparisonOperator} can be used interchangeably with ComparisonOperator, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **greaterThan** \ + * **greaterThanOrEqual** \ + * **lessThan** \ + * **lessThanOrEqual** + */ +export type ComparisonOperator = string; + +/** Known values of {@link JobType} that the service accepts. */ +export enum KnownJobType { + /** FlinkJob */ + FlinkJob = "FlinkJob" +} + +/** + * Defines values for JobType. \ + * {@link KnownJobType} can be used interchangeably with JobType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FlinkJob** + */ +export type JobType = string; + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + 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 = "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 Action} that the service accepts. */ +export enum KnownAction { + /** NEW */ + NEW = "NEW", + /** Update */ + Update = "UPDATE", + /** StatelessUpdate */ + StatelessUpdate = "STATELESS_UPDATE", + /** Stop */ + Stop = "STOP", + /** Start */ + Start = "START", + /** Cancel */ + Cancel = "CANCEL", + /** Savepoint */ + Savepoint = "SAVEPOINT", + /** ListSavepoint */ + ListSavepoint = "LIST_SAVEPOINT", + /** Delete */ + Delete = "DELETE" +} + +/** + * Defines values for Action. \ + * {@link KnownAction} can be used interchangeably with Action, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NEW** \ + * **UPDATE** \ + * **STATELESS_UPDATE** \ + * **STOP** \ + * **START** \ + * **CANCEL** \ + * **SAVEPOINT** \ + * **LIST_SAVEPOINT** \ + * **DELETE** + */ +export type Action = string; + +/** Optional parameters. */ +export interface ClusterPoolsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ClusterPoolsGetResponse = ClusterPool; + +/** Optional parameters. */ +export interface ClusterPoolsCreateOrUpdateOptionalParams + 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 ClusterPoolsCreateOrUpdateResponse = ClusterPool; + +/** Optional parameters. */ +export interface ClusterPoolsUpdateTagsOptionalParams + 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 updateTags operation. */ +export type ClusterPoolsUpdateTagsResponse = ClusterPool; + +/** Optional parameters. */ +export interface ClusterPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ClusterPoolsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ClusterPoolsListBySubscriptionResponse = ClusterPoolListResult; + +/** Optional parameters. */ +export interface ClusterPoolsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ClusterPoolsListByResourceGroupResponse = ClusterPoolListResult; + +/** Optional parameters. */ +export interface ClusterPoolsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ClusterPoolsListBySubscriptionNextResponse = ClusterPoolListResult; + +/** Optional parameters. */ +export interface ClusterPoolsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ClusterPoolsListByResourceGroupNextResponse = ClusterPoolListResult; + +/** Optional parameters. */ +export interface ClustersListByClusterPoolNameOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByClusterPoolName operation. */ +export type ClustersListByClusterPoolNameResponse = ClusterListResult; + +/** Optional parameters. */ +export interface ClustersResizeOptionalParams + 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 resize operation. */ +export type ClustersResizeResponse = Cluster; + +/** Optional parameters. */ +export interface ClustersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ClustersGetResponse = Cluster; + +/** Optional parameters. */ +export interface ClustersCreateOptionalParams + 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 ClustersCreateResponse = Cluster; + +/** Optional parameters. */ +export interface ClustersUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ClustersUpdateResponse = Cluster; + +/** Optional parameters. */ +export interface ClustersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ClustersListServiceConfigsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listServiceConfigs operation. */ +export type ClustersListServiceConfigsResponse = ServiceConfigListResult; + +/** Optional parameters. */ +export interface ClustersListInstanceViewsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listInstanceViews operation. */ +export type ClustersListInstanceViewsResponse = ClusterInstanceViewsResult; + +/** Optional parameters. */ +export interface ClustersGetInstanceViewOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getInstanceView operation. */ +export type ClustersGetInstanceViewResponse = ClusterInstanceViewResult; + +/** Optional parameters. */ +export interface ClustersListByClusterPoolNameNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByClusterPoolNameNext operation. */ +export type ClustersListByClusterPoolNameNextResponse = ClusterListResult; + +/** Optional parameters. */ +export interface ClustersListServiceConfigsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listServiceConfigsNext operation. */ +export type ClustersListServiceConfigsNextResponse = ServiceConfigListResult; + +/** Optional parameters. */ +export interface ClustersListInstanceViewsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listInstanceViewsNext operation. */ +export type ClustersListInstanceViewsNextResponse = ClusterInstanceViewsResult; + +/** Optional parameters. */ +export interface ClusterJobsRunJobOptionalParams + 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 runJob operation. */ +export type ClusterJobsRunJobResponse = ClusterJob; + +/** Optional parameters. */ +export interface ClusterJobsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ClusterJobsListResponse = ClusterJobList; + +/** Optional parameters. */ +export interface ClusterJobsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ClusterJobsListNextResponse = ClusterJobList; + +/** Optional parameters. */ +export interface LocationsCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameAvailability operation. */ +export type LocationsCheckNameAvailabilityResponse = NameAvailabilityResult; + +/** 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 AvailableClusterPoolVersionsListByLocationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocation operation. */ +export type AvailableClusterPoolVersionsListByLocationResponse = ClusterPoolVersionsListResult; + +/** Optional parameters. */ +export interface AvailableClusterPoolVersionsListByLocationNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocationNext operation. */ +export type AvailableClusterPoolVersionsListByLocationNextResponse = ClusterPoolVersionsListResult; + +/** Optional parameters. */ +export interface AvailableClusterVersionsListByLocationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocation operation. */ +export type AvailableClusterVersionsListByLocationResponse = ClusterVersionsListResult; + +/** Optional parameters. */ +export interface AvailableClusterVersionsListByLocationNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocationNext operation. */ +export type AvailableClusterVersionsListByLocationNextResponse = ClusterVersionsListResult; + +/** Optional parameters. */ +export interface HDInsightOnAksManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/models/mappers.ts b/sdk/hdinsight/arm-hdinsightonaks/src/models/mappers.ts new file mode 100644 index 000000000000..7d781376e13f --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/models/mappers.ts @@ -0,0 +1,3148 @@ +/* + * 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 ClusterPoolProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolProfile", + modelProperties: { + clusterPoolVersion: { + constraints: { + Pattern: new RegExp("^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})$") + }, + serializedName: "clusterPoolVersion", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPoolComputeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolComputeProfile", + modelProperties: { + vmSize: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9_\\-]{0,256}$") + }, + serializedName: "vmSize", + required: true, + type: { + name: "String" + } + }, + count: { + defaultValue: 3, + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 3 + }, + serializedName: "count", + type: { + name: "Number" + } + } + } + } +}; + +export const AksClusterProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AksClusterProfile", + modelProperties: { + aksClusterResourceId: { + serializedName: "aksClusterResourceId", + type: { + name: "String" + } + }, + aksClusterAgentPoolIdentityProfile: { + serializedName: "aksClusterAgentPoolIdentityProfile", + type: { + name: "Composite", + className: "AksClusterProfileAksClusterAgentPoolIdentityProfile" + } + }, + aksVersion: { + serializedName: "aksVersion", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IdentityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentityProfile", + modelProperties: { + msiResourceId: { + serializedName: "msiResourceId", + required: true, + type: { + name: "String" + } + }, + msiClientId: { + constraints: { + Pattern: new RegExp( + "^[{(]?[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}[)}]?$" + ) + }, + serializedName: "msiClientId", + required: true, + type: { + name: "String" + } + }, + msiObjectId: { + constraints: { + Pattern: new RegExp( + "^[{(]?[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}[)}]?$" + ) + }, + serializedName: "msiObjectId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPoolNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolNetworkProfile", + modelProperties: { + subnetId: { + serializedName: "subnetId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPoolLogAnalyticsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolLogAnalyticsProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + workspaceId: { + serializedName: "workspaceId", + type: { + name: "String" + } + } + } + } +}; + +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 TagsObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsObject", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ClusterPoolListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ComputeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeProfile", + modelProperties: { + nodes: { + serializedName: "nodes", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NodeProfile" + } + } + } + } + } + } +}; + +export const NodeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NodeProfile", + modelProperties: { + type: { + constraints: { + Pattern: new RegExp("^(head|Head|HEAD|worker|Worker|WORKER)$") + }, + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + vmSize: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9_\\-]{0,256}$") + }, + serializedName: "vmSize", + required: true, + type: { + name: "String" + } + }, + count: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "count", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterProfile", + modelProperties: { + clusterVersion: { + constraints: { + Pattern: new RegExp( + "^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})(?:\\.(0|[1-9][0-9]{0,18}))?$" + ) + }, + serializedName: "clusterVersion", + required: true, + type: { + name: "String" + } + }, + ossVersion: { + constraints: { + Pattern: new RegExp( + "^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})$" + ) + }, + serializedName: "ossVersion", + required: true, + type: { + name: "String" + } + }, + components: { + serializedName: "components", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterComponentsItem" + } + } + } + }, + identityProfile: { + serializedName: "identityProfile", + type: { + name: "Composite", + className: "IdentityProfile" + } + }, + authorizationProfile: { + serializedName: "authorizationProfile", + type: { + name: "Composite", + className: "AuthorizationProfile" + } + }, + secretsProfile: { + serializedName: "secretsProfile", + type: { + name: "Composite", + className: "SecretsProfile" + } + }, + serviceConfigsProfiles: { + serializedName: "serviceConfigsProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterServiceConfigsProfile" + } + } + } + }, + connectivityProfile: { + serializedName: "connectivityProfile", + type: { + name: "Composite", + className: "ConnectivityProfile" + } + }, + logAnalyticsProfile: { + serializedName: "logAnalyticsProfile", + type: { + name: "Composite", + className: "ClusterLogAnalyticsProfile" + } + }, + prometheusProfile: { + serializedName: "prometheusProfile", + type: { + name: "Composite", + className: "ClusterPrometheusProfile" + } + }, + sshProfile: { + serializedName: "sshProfile", + type: { + name: "Composite", + className: "SshProfile" + } + }, + autoscaleProfile: { + serializedName: "autoscaleProfile", + type: { + name: "Composite", + className: "AutoscaleProfile" + } + }, + kafkaProfile: { + serializedName: "kafkaProfile", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + trinoProfile: { + serializedName: "trinoProfile", + type: { + name: "Composite", + className: "TrinoProfile" + } + }, + llapProfile: { + serializedName: "llapProfile", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + flinkProfile: { + serializedName: "flinkProfile", + type: { + name: "Composite", + className: "FlinkProfile" + } + }, + sparkProfile: { + serializedName: "sparkProfile", + type: { + name: "Composite", + className: "SparkProfile" + } + }, + stubProfile: { + serializedName: "stubProfile", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + scriptActionProfiles: { + serializedName: "scriptActionProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptActionProfile" + } + } + } + } + } + } +}; + +export const ClusterComponentsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterComponentsItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const AuthorizationProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthorizationProfile", + modelProperties: { + userIds: { + serializedName: "userIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + groupIds: { + serializedName: "groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SecretsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsProfile", + modelProperties: { + keyVaultResourceId: { + serializedName: "keyVaultResourceId", + required: true, + type: { + name: "String" + } + }, + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecretReference" + } + } + } + } + } + } +}; + +export const SecretReference: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretReference", + modelProperties: { + referenceName: { + serializedName: "referenceName", + required: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + keyVaultObjectName: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{1,126}$") + }, + serializedName: "keyVaultObjectName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterServiceConfigsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterServiceConfigsProfile", + modelProperties: { + serviceName: { + serializedName: "serviceName", + required: true, + type: { + name: "String" + } + }, + configs: { + serializedName: "configs", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterServiceConfig" + } + } + } + } + } + } +}; + +export const ClusterServiceConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterServiceConfig", + modelProperties: { + component: { + serializedName: "component", + required: true, + type: { + name: "String" + } + }, + files: { + serializedName: "files", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterConfigFile" + } + } + } + } + } + } +}; + +export const ClusterConfigFile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterConfigFile", + modelProperties: { + fileName: { + serializedName: "fileName", + required: true, + type: { + name: "String" + } + }, + content: { + serializedName: "content", + type: { + name: "String" + } + }, + encoding: { + serializedName: "encoding", + type: { + name: "String" + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + }, + values: { + serializedName: "values", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ConnectivityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectivityProfile", + modelProperties: { + web: { + serializedName: "web", + type: { + name: "Composite", + className: "ConnectivityProfileWeb" + } + }, + ssh: { + serializedName: "ssh", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SshConnectivityEndpoint" + } + } + } + } + } + } +}; + +export const WebConnectivityEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebConnectivityEndpoint", + modelProperties: { + fqdn: { + serializedName: "fqdn", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SshConnectivityEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshConnectivityEndpoint", + modelProperties: { + endpoint: { + serializedName: "endpoint", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterLogAnalyticsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterLogAnalyticsProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + applicationLogs: { + serializedName: "applicationLogs", + type: { + name: "Composite", + className: "ClusterLogAnalyticsApplicationLogs" + } + }, + metricsEnabled: { + serializedName: "metricsEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ClusterLogAnalyticsApplicationLogs: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterLogAnalyticsApplicationLogs", + modelProperties: { + stdOutEnabled: { + serializedName: "stdOutEnabled", + type: { + name: "Boolean" + } + }, + stdErrorEnabled: { + serializedName: "stdErrorEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ClusterPrometheusProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPrometheusProfile", + modelProperties: { + enabled: { + defaultValue: false, + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const SshProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SshProfile", + modelProperties: { + count: { + constraints: { + InclusiveMaximum: 5, + InclusiveMinimum: 0 + }, + serializedName: "count", + required: true, + type: { + name: "Number" + } + }, + podPrefix: { + serializedName: "podPrefix", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AutoscaleProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AutoscaleProfile", + modelProperties: { + enabled: { + serializedName: "enabled", + required: true, + type: { + name: "Boolean" + } + }, + gracefulDecommissionTimeout: { + serializedName: "gracefulDecommissionTimeout", + type: { + name: "Number" + } + }, + autoscaleType: { + serializedName: "autoscaleType", + type: { + name: "String" + } + }, + scheduleBasedConfig: { + serializedName: "scheduleBasedConfig", + type: { + name: "Composite", + className: "ScheduleBasedConfig" + } + }, + loadBasedConfig: { + serializedName: "loadBasedConfig", + type: { + name: "Composite", + className: "LoadBasedConfig" + } + } + } + } +}; + +export const ScheduleBasedConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScheduleBasedConfig", + modelProperties: { + timeZone: { + serializedName: "timeZone", + required: true, + type: { + name: "String" + } + }, + defaultCount: { + serializedName: "defaultCount", + required: true, + type: { + name: "Number" + } + }, + schedules: { + serializedName: "schedules", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Schedule" + } + } + } + } + } + } +}; + +export const Schedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Schedule", + modelProperties: { + startTime: { + constraints: { + Pattern: new RegExp("^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$") + }, + serializedName: "startTime", + required: true, + type: { + name: "String" + } + }, + endTime: { + constraints: { + Pattern: new RegExp("^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$") + }, + serializedName: "endTime", + required: true, + type: { + name: "String" + } + }, + count: { + serializedName: "count", + required: true, + type: { + name: "Number" + } + }, + days: { + serializedName: "days", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const LoadBasedConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBasedConfig", + modelProperties: { + minNodes: { + serializedName: "minNodes", + required: true, + type: { + name: "Number" + } + }, + maxNodes: { + serializedName: "maxNodes", + required: true, + type: { + name: "Number" + } + }, + pollInterval: { + serializedName: "pollInterval", + type: { + name: "Number" + } + }, + cooldownPeriod: { + serializedName: "cooldownPeriod", + type: { + name: "Number" + } + }, + scalingRules: { + serializedName: "scalingRules", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScalingRule" + } + } + } + } + } + } +}; + +export const ScalingRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScalingRule", + modelProperties: { + actionType: { + serializedName: "actionType", + required: true, + type: { + name: "String" + } + }, + evaluationCount: { + serializedName: "evaluationCount", + required: true, + type: { + name: "Number" + } + }, + scalingMetric: { + serializedName: "scalingMetric", + required: true, + type: { + name: "String" + } + }, + comparisonRule: { + serializedName: "comparisonRule", + type: { + name: "Composite", + className: "ComparisonRule" + } + } + } + } +}; + +export const ComparisonRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComparisonRule", + modelProperties: { + operator: { + serializedName: "operator", + required: true, + type: { + name: "String" + } + }, + threshold: { + serializedName: "threshold", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const TrinoProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoProfile", + modelProperties: { + catalogOptions: { + serializedName: "catalogOptions", + type: { + name: "Composite", + className: "CatalogOptions" + } + }, + coordinator: { + serializedName: "coordinator", + type: { + name: "Composite", + className: "TrinoCoordinator" + } + }, + userPluginsSpec: { + serializedName: "userPluginsSpec", + type: { + name: "Composite", + className: "TrinoUserPlugins" + } + }, + userTelemetrySpec: { + serializedName: "userTelemetrySpec", + type: { + name: "Composite", + className: "TrinoUserTelemetry" + } + }, + worker: { + serializedName: "worker", + type: { + name: "Composite", + className: "TrinoWorker" + } + } + } + } +}; + +export const CatalogOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CatalogOptions", + modelProperties: { + hive: { + serializedName: "hive", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HiveCatalogOption" + } + } + } + } + } + } +}; + +export const HiveCatalogOption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HiveCatalogOption", + modelProperties: { + catalogName: { + constraints: { + MinLength: 1 + }, + serializedName: "catalogName", + required: true, + type: { + name: "String" + } + }, + metastoreDbConnectionPasswordSecret: { + serializedName: "metastoreDbConnectionPasswordSecret", + required: true, + type: { + name: "String" + } + }, + metastoreDbConnectionURL: { + serializedName: "metastoreDbConnectionURL", + required: true, + type: { + name: "String" + } + }, + metastoreDbConnectionUserName: { + serializedName: "metastoreDbConnectionUserName", + required: true, + type: { + name: "String" + } + }, + metastoreWarehouseDir: { + serializedName: "metastoreWarehouseDir", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrinoCoordinator: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoCoordinator", + modelProperties: { + highAvailabilityEnabled: { + defaultValue: true, + serializedName: "highAvailabilityEnabled", + type: { + name: "Boolean" + } + }, + enable: { + defaultValue: false, + serializedName: "debug.enable", + type: { + name: "Boolean" + } + }, + port: { + defaultValue: 8008, + serializedName: "debug.port", + type: { + name: "Number" + } + }, + suspend: { + defaultValue: false, + serializedName: "debug.suspend", + type: { + name: "Boolean" + } + } + } + } +}; + +export const TrinoUserPlugins: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoUserPlugins", + modelProperties: { + plugins: { + serializedName: "plugins", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrinoUserPlugin" + } + } + } + } + } + } +}; + +export const TrinoUserPlugin: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoUserPlugin", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + name: { + constraints: { + MinLength: 1 + }, + serializedName: "name", + type: { + name: "String" + } + }, + path: { + constraints: { + Pattern: new RegExp("^(https)|(abfss):\\/\\/.*$"), + MinLength: 1 + }, + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +export const TrinoUserTelemetry: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoUserTelemetry", + modelProperties: { + storage: { + serializedName: "storage", + type: { + name: "Composite", + className: "TrinoTelemetryConfig" + } + } + } + } +}; + +export const TrinoTelemetryConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoTelemetryConfig", + modelProperties: { + hivecatalogName: { + constraints: { + MinLength: 1 + }, + serializedName: "hivecatalogName", + type: { + name: "String" + } + }, + hivecatalogSchema: { + defaultValue: "trinologs", + serializedName: "hivecatalogSchema", + type: { + name: "String" + } + }, + partitionRetentionInDays: { + defaultValue: 365, + serializedName: "partitionRetentionInDays", + type: { + name: "Number" + } + }, + path: { + constraints: { + MinLength: 1 + }, + serializedName: "path", + type: { + name: "String" + } + } + } + } +}; + +export const TrinoWorker: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrinoWorker", + modelProperties: { + enable: { + defaultValue: false, + serializedName: "debug.enable", + type: { + name: "Boolean" + } + }, + port: { + defaultValue: 8008, + serializedName: "debug.port", + type: { + name: "Number" + } + }, + suspend: { + defaultValue: false, + serializedName: "debug.suspend", + type: { + name: "Boolean" + } + } + } + } +}; + +export const FlinkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlinkProfile", + modelProperties: { + storage: { + serializedName: "storage", + type: { + name: "Composite", + className: "FlinkStorageProfile" + } + }, + numReplicas: { + serializedName: "numReplicas", + type: { + name: "Number" + } + }, + jobManager: { + serializedName: "jobManager", + type: { + name: "Composite", + className: "ComputeResourceDefinition" + } + }, + historyServer: { + serializedName: "historyServer", + type: { + name: "Composite", + className: "ComputeResourceDefinition" + } + }, + taskManager: { + serializedName: "taskManager", + type: { + name: "Composite", + className: "ComputeResourceDefinition" + } + }, + catalogOptions: { + serializedName: "catalogOptions", + type: { + name: "Composite", + className: "FlinkCatalogOptions" + } + } + } + } +}; + +export const FlinkStorageProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlinkStorageProfile", + modelProperties: { + storageUri: { + constraints: { + Pattern: new RegExp( + "^(\\w{4,5}):\\/\\/(.*)@(.*).\\b(blob|dfs)\\b\\.core\\.windows\\.net$" + ) + }, + serializedName: "storageUri", + required: true, + type: { + name: "String" + } + }, + storagekey: { + serializedName: "storagekey", + type: { + name: "String" + } + } + } + } +}; + +export const ComputeResourceDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeResourceDefinition", + modelProperties: { + cpu: { + serializedName: "cpu", + required: true, + type: { + name: "Number" + } + }, + memory: { + serializedName: "memory", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const FlinkCatalogOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlinkCatalogOptions", + modelProperties: { + hive: { + serializedName: "hive", + type: { + name: "Composite", + className: "FlinkHiveCatalogOption" + } + } + } + } +}; + +export const FlinkHiveCatalogOption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FlinkHiveCatalogOption", + modelProperties: { + metastoreDbConnectionPasswordSecret: { + serializedName: "metastoreDbConnectionPasswordSecret", + required: true, + type: { + name: "String" + } + }, + metastoreDbConnectionURL: { + serializedName: "metastoreDbConnectionURL", + required: true, + type: { + name: "String" + } + }, + metastoreDbConnectionUserName: { + serializedName: "metastoreDbConnectionUserName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SparkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SparkProfile", + modelProperties: { + defaultStorageUrl: { + serializedName: "defaultStorageUrl", + type: { + name: "String" + } + }, + metastoreSpec: { + serializedName: "metastoreSpec", + type: { + name: "Composite", + className: "SparkMetastoreSpec" + } + }, + userPluginsSpec: { + serializedName: "userPluginsSpec", + type: { + name: "Composite", + className: "SparkUserPlugins" + } + } + } + } +}; + +export const SparkMetastoreSpec: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SparkMetastoreSpec", + modelProperties: { + dbServerHost: { + serializedName: "dbServerHost", + required: true, + type: { + name: "String" + } + }, + dbName: { + serializedName: "dbName", + type: { + name: "String" + } + }, + dbUserName: { + serializedName: "dbUserName", + required: true, + type: { + name: "String" + } + }, + dbPasswordSecretName: { + serializedName: "dbPasswordSecretName", + required: true, + type: { + name: "String" + } + }, + keyVaultId: { + serializedName: "keyVaultId", + required: true, + type: { + name: "String" + } + }, + thriftUrl: { + serializedName: "thriftUrl", + type: { + name: "String" + } + } + } + } +}; + +export const SparkUserPlugins: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SparkUserPlugins", + modelProperties: { + plugins: { + serializedName: "plugins", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SparkUserPlugin" + } + } + } + } + } + } +}; + +export const SparkUserPlugin: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SparkUserPlugin", + modelProperties: { + path: { + constraints: { + Pattern: new RegExp("^(https)|(abfss):\\/\\/.*$"), + MinLength: 1 + }, + serializedName: "path", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ScriptActionProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScriptActionProfile", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + url: { + constraints: { + Pattern: new RegExp( + "^(https)|(http)|(abfss)|(abfs)|(wasbs)|(wasb):\\/\\/.*$" + ) + }, + serializedName: "url", + required: true, + type: { + name: "String" + } + }, + parameters: { + serializedName: "parameters", + type: { + name: "String" + } + }, + services: { + serializedName: "services", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + timeoutInMinutes: { + serializedName: "timeoutInMinutes", + type: { + name: "Number" + } + }, + shouldPersist: { + defaultValue: true, + serializedName: "shouldPersist", + type: { + name: "Boolean" + } + } + } + } +}; + +export const UpdatableClusterProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdatableClusterProfile", + modelProperties: { + serviceConfigsProfiles: { + serializedName: "serviceConfigsProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterServiceConfigsProfile" + } + } + } + }, + sshProfile: { + serializedName: "sshProfile", + type: { + name: "Composite", + className: "SshProfile" + } + }, + autoscaleProfile: { + serializedName: "autoscaleProfile", + type: { + name: "Composite", + className: "AutoscaleProfile" + } + }, + authorizationProfile: { + serializedName: "authorizationProfile", + type: { + name: "Composite", + className: "AuthorizationProfile" + } + }, + logAnalyticsProfile: { + serializedName: "logAnalyticsProfile", + type: { + name: "Composite", + className: "ClusterLogAnalyticsProfile" + } + }, + prometheusProfile: { + serializedName: "prometheusProfile", + type: { + name: "Composite", + className: "ClusterPrometheusProfile" + } + }, + scriptActionProfiles: { + serializedName: "scriptActionProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScriptActionProfile" + } + } + } + } + } + } +}; + +export const ClusterJobProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterJobProperties", + uberParent: "ClusterJobProperties", + polymorphicDiscriminator: { + serializedName: "jobType", + clientName: "jobType" + }, + modelProperties: { + jobType: { + serializedName: "jobType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterJobList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterJobList", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterJob" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceConfigListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceConfigListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceConfigResult" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServiceConfigResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceConfigResult", + modelProperties: { + serviceName: { + serializedName: "properties.serviceName", + type: { + name: "String" + } + }, + fileName: { + serializedName: "properties.fileName", + type: { + name: "String" + } + }, + content: { + serializedName: "properties.content", + type: { + name: "String" + } + }, + componentName: { + serializedName: "properties.componentName", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + }, + customKeys: { + serializedName: "properties.customKeys", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + defaultKeys: { + serializedName: "properties.defaultKeys", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "ServiceConfigListResultValueEntity" + } + } + } + } + } + } +}; + +export const ServiceConfigListResultProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceConfigListResultProperties", + modelProperties: { + serviceName: { + serializedName: "serviceName", + required: true, + type: { + name: "String" + } + }, + fileName: { + serializedName: "fileName", + required: true, + type: { + name: "String" + } + }, + content: { + serializedName: "content", + type: { + name: "String" + } + }, + componentName: { + serializedName: "componentName", + required: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + path: { + serializedName: "path", + type: { + name: "String" + } + }, + customKeys: { + serializedName: "customKeys", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + defaultKeys: { + serializedName: "defaultKeys", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "ServiceConfigListResultValueEntity" + } + } + } + } + } + } +}; + +export const ServiceConfigListResultValueEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceConfigListResultValueEntity", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const NameAvailabilityParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NameAvailabilityParameters", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const NameAvailabilityResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NameAvailabilityResult", + modelProperties: { + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterInstanceViewsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterInstanceViewsResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterInstanceViewResult" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterInstanceViewResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterInstanceViewResult", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Composite", + className: "ClusterInstanceViewPropertiesStatus" + } + }, + serviceStatuses: { + serializedName: "properties.serviceStatuses", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceStatus" + } + } + } + } + } + } +}; + +export const ClusterInstanceViewProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterInstanceViewProperties", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "Composite", + className: "ClusterInstanceViewPropertiesStatus" + } + }, + serviceStatuses: { + serializedName: "serviceStatuses", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceStatus" + } + } + } + } + } + } +}; + +export const ClusterInstanceViewStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterInstanceViewStatus", + modelProperties: { + ready: { + serializedName: "ready", + required: true, + type: { + name: "String" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceStatus", + modelProperties: { + kind: { + serializedName: "kind", + required: true, + type: { + name: "String" + } + }, + ready: { + serializedName: "ready", + required: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +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 ClusterPoolVersionsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolVersionsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterPoolVersion" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterVersionsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterVersionsListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterVersion" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPoolResourcePropertiesClusterPoolProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesClusterPoolProfile", + modelProperties: { + ...ClusterPoolProfile.type.modelProperties + } + } +}; + +export const ClusterPoolResourcePropertiesComputeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesComputeProfile", + modelProperties: { + ...ClusterPoolComputeProfile.type.modelProperties + } + } +}; + +export const ClusterPoolResourcePropertiesAksClusterProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesAksClusterProfile", + modelProperties: { + ...AksClusterProfile.type.modelProperties + } + } +}; + +export const AksClusterProfileAksClusterAgentPoolIdentityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AksClusterProfileAksClusterAgentPoolIdentityProfile", + modelProperties: { + ...IdentityProfile.type.modelProperties + } + } +}; + +export const ClusterPoolResourcePropertiesNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesNetworkProfile", + modelProperties: { + ...ClusterPoolNetworkProfile.type.modelProperties + } + } +}; + +export const ClusterPoolResourcePropertiesLogAnalyticsProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesLogAnalyticsProfile", + modelProperties: { + ...ClusterPoolLogAnalyticsProfile.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 ConnectivityProfileWeb: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectivityProfileWeb", + modelProperties: { + ...WebConnectivityEndpoint.type.modelProperties + } + } +}; + +export const FlinkJobProperties: coreClient.CompositeMapper = { + serializedName: "FlinkJob", + type: { + name: "Composite", + className: "FlinkJobProperties", + uberParent: "ClusterJobProperties", + polymorphicDiscriminator: + ClusterJobProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ClusterJobProperties.type.modelProperties, + jobName: { + serializedName: "jobName", + required: true, + type: { + name: "String" + } + }, + jobJarDirectory: { + serializedName: "jobJarDirectory", + type: { + name: "String" + } + }, + jarName: { + serializedName: "jarName", + type: { + name: "String" + } + }, + entryClass: { + serializedName: "entryClass", + type: { + name: "String" + } + }, + args: { + serializedName: "args", + type: { + name: "String" + } + }, + savePointName: { + serializedName: "savePointName", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + }, + flinkConfiguration: { + serializedName: "flinkConfiguration", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + jobId: { + serializedName: "jobId", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + jobOutput: { + serializedName: "jobOutput", + readOnly: true, + type: { + name: "String" + } + }, + actionResult: { + serializedName: "actionResult", + readOnly: true, + type: { + name: "String" + } + }, + lastSavePoint: { + serializedName: "lastSavePoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServiceConfigResultProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceConfigResultProperties", + modelProperties: { + ...ServiceConfigListResultProperties.type.modelProperties + } + } +}; + +export const ClusterInstanceViewResultProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterInstanceViewResultProperties", + modelProperties: { + ...ClusterInstanceViewProperties.type.modelProperties + } + } +}; + +export const ClusterInstanceViewPropertiesStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterInstanceViewPropertiesStatus", + modelProperties: { + ...ClusterInstanceViewStatus.type.modelProperties + } + } +}; + +export const ClusterPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPool", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + deploymentId: { + serializedName: "properties.deploymentId", + readOnly: true, + type: { + name: "String" + } + }, + managedResourceGroupName: { + constraints: { + MaxLength: 40, + MinLength: 1 + }, + serializedName: "properties.managedResourceGroupName", + type: { + name: "String" + } + }, + aksManagedResourceGroupName: { + serializedName: "properties.aksManagedResourceGroupName", + readOnly: true, + type: { + name: "String" + } + }, + clusterPoolProfile: { + serializedName: "properties.clusterPoolProfile", + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesClusterPoolProfile" + } + }, + computeProfile: { + serializedName: "properties.computeProfile", + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesComputeProfile" + } + }, + aksClusterProfile: { + serializedName: "properties.aksClusterProfile", + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesAksClusterProfile" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesNetworkProfile" + } + }, + logAnalyticsProfile: { + serializedName: "properties.logAnalyticsProfile", + type: { + name: "Composite", + className: "ClusterPoolResourcePropertiesLogAnalyticsProfile" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Cluster: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Cluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + clusterType: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9]{0,31}$") + }, + serializedName: "properties.clusterType", + type: { + name: "String" + } + }, + deploymentId: { + serializedName: "properties.deploymentId", + readOnly: true, + type: { + name: "String" + } + }, + computeProfile: { + serializedName: "properties.computeProfile", + type: { + name: "Composite", + className: "ComputeProfile" + } + }, + clusterProfile: { + serializedName: "properties.clusterProfile", + type: { + name: "Composite", + className: "ClusterProfile" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClusterResizeData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterResizeData", + modelProperties: { + ...TrackedResource.type.modelProperties, + targetWorkerNodeCount: { + serializedName: "properties.targetWorkerNodeCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPatch", + modelProperties: { + ...TrackedResource.type.modelProperties, + clusterProfile: { + serializedName: "properties.clusterProfile", + type: { + name: "Composite", + className: "UpdatableClusterProfile" + } + } + } + } +}; + +export const ClusterJob: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterJob", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClusterJobProperties" + } + } + } + } +}; + +export const ClusterPoolVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolVersion", + modelProperties: { + ...ProxyResource.type.modelProperties, + clusterPoolVersion: { + constraints: { + Pattern: new RegExp("^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})$") + }, + serializedName: "properties.clusterPoolVersion", + type: { + name: "String" + } + }, + aksVersion: { + serializedName: "properties.aksVersion", + type: { + name: "String" + } + }, + isPreview: { + defaultValue: false, + serializedName: "properties.isPreview", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ClusterVersion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterVersion", + modelProperties: { + ...ProxyResource.type.modelProperties, + clusterType: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9]{0,31}$") + }, + serializedName: "properties.clusterType", + type: { + name: "String" + } + }, + clusterVersion: { + constraints: { + Pattern: new RegExp( + "^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})$" + ) + }, + serializedName: "properties.clusterVersion", + type: { + name: "String" + } + }, + ossVersion: { + constraints: { + Pattern: new RegExp( + "^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})$" + ) + }, + serializedName: "properties.ossVersion", + type: { + name: "String" + } + }, + clusterPoolVersion: { + serializedName: "properties.clusterPoolVersion", + type: { + name: "String" + } + }, + isPreview: { + defaultValue: false, + serializedName: "properties.isPreview", + type: { + name: "Boolean" + } + }, + components: { + serializedName: "properties.components", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterComponentsItem" + } + } + } + } + } + } +}; + +export const ClusterPoolsUpdateTagsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolsUpdateTagsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPoolsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterPoolsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersResizeHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersResizeHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClustersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClustersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterJobsRunJobHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterJobsRunJobHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export let discriminators = { + ClusterJobProperties: ClusterJobProperties, + "ClusterJobProperties.FlinkJob": FlinkJobProperties +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/models/parameters.ts b/sdk/hdinsight/arm-hdinsightonaks/src/models/parameters.ts new file mode 100644 index 000000000000..c95227664732 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/models/parameters.ts @@ -0,0 +1,179 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + ClusterPool as ClusterPoolMapper, + TagsObject as TagsObjectMapper, + ClusterResizeData as ClusterResizeDataMapper, + Cluster as ClusterMapper, + ClusterPatch as ClusterPatchMapper, + ClusterJob as ClusterJobMapper, + NameAvailabilityParameters as NameAvailabilityParametersMapper +} 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: { + serializedName: "subscriptionId", + required: true, + type: { + name: "Uuid" + } + } +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2023-06-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const clusterPoolName: OperationURLParameter = { + parameterPath: "clusterPoolName", + mapper: { + serializedName: "clusterPoolName", + 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 clusterPool: OperationParameter = { + parameterPath: "clusterPool", + mapper: ClusterPoolMapper +}; + +export const clusterPoolTags: OperationParameter = { + parameterPath: "clusterPoolTags", + mapper: TagsObjectMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const clusterResizeRequest: OperationParameter = { + parameterPath: "clusterResizeRequest", + mapper: ClusterResizeDataMapper +}; + +export const clusterName: OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + serializedName: "clusterName", + required: true, + type: { + name: "String" + } + } +}; + +export const hDInsightCluster: OperationParameter = { + parameterPath: "hDInsightCluster", + mapper: ClusterMapper +}; + +export const clusterPatchRequest: OperationParameter = { + parameterPath: "clusterPatchRequest", + mapper: ClusterPatchMapper +}; + +export const clusterJob: OperationParameter = { + parameterPath: "clusterJob", + mapper: ClusterJobMapper +}; + +export const nameAvailabilityParameters: OperationParameter = { + parameterPath: "nameAvailabilityParameters", + mapper: NameAvailabilityParametersMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/availableClusterPoolVersions.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/availableClusterPoolVersions.ts new file mode 100644 index 000000000000..3088cee30f34 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/availableClusterPoolVersions.ts @@ -0,0 +1,175 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AvailableClusterPoolVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + ClusterPoolVersion, + AvailableClusterPoolVersionsListByLocationNextOptionalParams, + AvailableClusterPoolVersionsListByLocationOptionalParams, + AvailableClusterPoolVersionsListByLocationResponse, + AvailableClusterPoolVersionsListByLocationNextResponse +} from "../models"; + +/// +/** Class containing AvailableClusterPoolVersions operations. */ +export class AvailableClusterPoolVersionsImpl + implements AvailableClusterPoolVersions { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class AvailableClusterPoolVersions class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Returns a list of available cluster pool versions. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public listByLocation( + location: string, + options?: AvailableClusterPoolVersionsListByLocationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocationPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocationPagingPage(location, options, settings); + } + }; + } + + private async *listByLocationPagingPage( + location: string, + options?: AvailableClusterPoolVersionsListByLocationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AvailableClusterPoolVersionsListByLocationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocation(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocationNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocationPagingAll( + location: string, + options?: AvailableClusterPoolVersionsListByLocationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocationPagingPage(location, options)) { + yield* page; + } + } + + /** + * Returns a list of available cluster pool versions. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _listByLocation( + location: string, + options?: AvailableClusterPoolVersionsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listByLocationOperationSpec + ); + } + + /** + * ListByLocationNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the ListByLocation method. + * @param options The options parameters. + */ + private _listByLocationNext( + location: string, + nextLink: string, + options?: AvailableClusterPoolVersionsListByLocationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listByLocationNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterPoolVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPoolVersionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocationNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPoolVersionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/availableClusterVersions.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/availableClusterVersions.ts new file mode 100644 index 000000000000..8ccf2e3ef2a3 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/availableClusterVersions.ts @@ -0,0 +1,174 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AvailableClusterVersions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + ClusterVersion, + AvailableClusterVersionsListByLocationNextOptionalParams, + AvailableClusterVersionsListByLocationOptionalParams, + AvailableClusterVersionsListByLocationResponse, + AvailableClusterVersionsListByLocationNextResponse +} from "../models"; + +/// +/** Class containing AvailableClusterVersions operations. */ +export class AvailableClusterVersionsImpl implements AvailableClusterVersions { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class AvailableClusterVersions class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Returns a list of available cluster versions. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public listByLocation( + location: string, + options?: AvailableClusterVersionsListByLocationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocationPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocationPagingPage(location, options, settings); + } + }; + } + + private async *listByLocationPagingPage( + location: string, + options?: AvailableClusterVersionsListByLocationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: AvailableClusterVersionsListByLocationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocation(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocationNext( + location, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocationPagingAll( + location: string, + options?: AvailableClusterVersionsListByLocationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocationPagingPage(location, options)) { + yield* page; + } + } + + /** + * Returns a list of available cluster versions. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _listByLocation( + location: string, + options?: AvailableClusterVersionsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listByLocationOperationSpec + ); + } + + /** + * ListByLocationNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the ListByLocation method. + * @param options The options parameters. + */ + private _listByLocationNext( + location: string, + nextLink: string, + options?: AvailableClusterVersionsListByLocationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listByLocationNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterVersionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocationNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterVersionsListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusterJobs.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusterJobs.ts new file mode 100644 index 000000000000..ce224538c91a --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusterJobs.ts @@ -0,0 +1,366 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ClusterJobs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ClusterJob, + ClusterJobsListNextOptionalParams, + ClusterJobsListOptionalParams, + ClusterJobsListResponse, + ClusterJobsRunJobOptionalParams, + ClusterJobsRunJobResponse, + ClusterJobsListNextResponse +} from "../models"; + +/// +/** Class containing ClusterJobs operations. */ +export class ClusterJobsImpl implements ClusterJobs { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class ClusterJobs class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Get jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClusterJobsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + clusterPoolName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClusterJobsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ClusterJobsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + clusterPoolName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClusterJobsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + clusterPoolName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * Operations on jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterJob The Cluster job. + * @param options The options parameters. + */ + async beginRunJob( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterJob: ClusterJob, + options?: ClusterJobsRunJobOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClusterJobsRunJobResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterPoolName, + clusterName, + clusterJob, + options + }, + spec: runJobOperationSpec + }); + const poller = await createHttpPoller< + ClusterJobsRunJobResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Operations on jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterJob The Cluster job. + * @param options The options parameters. + */ + async beginRunJobAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterJob: ClusterJob, + options?: ClusterJobsRunJobOptionalParams + ): Promise { + const poller = await this.beginRunJob( + resourceGroupName, + clusterPoolName, + clusterName, + clusterJob, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClusterJobsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + nextLink: string, + options?: ClusterJobsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const runJobOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ClusterJob + }, + 201: { + bodyMapper: Mappers.ClusterJob + }, + 202: { + bodyMapper: Mappers.ClusterJob + }, + 204: { + bodyMapper: Mappers.ClusterJob + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.clusterJob, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/jobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterJobList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterJobList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.nextLink, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusterPools.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusterPools.ts new file mode 100644 index 000000000000..b4ed912bb219 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusterPools.ts @@ -0,0 +1,719 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ClusterPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ClusterPool, + ClusterPoolsListBySubscriptionNextOptionalParams, + ClusterPoolsListBySubscriptionOptionalParams, + ClusterPoolsListBySubscriptionResponse, + ClusterPoolsListByResourceGroupNextOptionalParams, + ClusterPoolsListByResourceGroupOptionalParams, + ClusterPoolsListByResourceGroupResponse, + ClusterPoolsGetOptionalParams, + ClusterPoolsGetResponse, + ClusterPoolsCreateOrUpdateOptionalParams, + ClusterPoolsCreateOrUpdateResponse, + TagsObject, + ClusterPoolsUpdateTagsOptionalParams, + ClusterPoolsUpdateTagsResponse, + ClusterPoolsDeleteOptionalParams, + ClusterPoolsListBySubscriptionNextResponse, + ClusterPoolsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing ClusterPools operations. */ +export class ClusterPoolsImpl implements ClusterPools { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class ClusterPools class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Gets the list of Cluster Pools within a Subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ClusterPoolsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ClusterPoolsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ClusterPoolsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: ClusterPoolsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Lists the HDInsight cluster pools under 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?: ClusterPoolsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ClusterPoolsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ClusterPoolsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ClusterPoolsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets a cluster pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterPoolName: string, + options?: ClusterPoolsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates a cluster pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPool The Cluster Pool to create. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + clusterPoolName: string, + clusterPool: ClusterPool, + options?: ClusterPoolsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClusterPoolsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterPoolName, clusterPool, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ClusterPoolsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a cluster pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPool The Cluster Pool to create. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterPool: ClusterPool, + options?: ClusterPoolsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + clusterPoolName, + clusterPool, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates an existing Cluster Pool Tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolTags Parameters supplied to update tags. + * @param options The options parameters. + */ + async beginUpdateTags( + resourceGroupName: string, + clusterPoolName: string, + clusterPoolTags: TagsObject, + options?: ClusterPoolsUpdateTagsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClusterPoolsUpdateTagsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterPoolName, clusterPoolTags, options }, + spec: updateTagsOperationSpec + }); + const poller = await createHttpPoller< + ClusterPoolsUpdateTagsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates an existing Cluster Pool Tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolTags Parameters supplied to update tags. + * @param options The options parameters. + */ + async beginUpdateTagsAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterPoolTags: TagsObject, + options?: ClusterPoolsUpdateTagsOptionalParams + ): Promise { + const poller = await this.beginUpdateTags( + resourceGroupName, + clusterPoolName, + clusterPoolTags, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a Cluster Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + clusterPoolName: string, + options?: ClusterPoolsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterPoolName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a Cluster Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterPoolName: string, + options?: ClusterPoolsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterPoolName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the list of Cluster Pools within a Subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ClusterPoolsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Lists the HDInsight cluster pools under 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?: ClusterPoolsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ClusterPoolsListBySubscriptionNextOptionalParams + ): 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?: ClusterPoolsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ClusterPool + }, + 201: { + bodyMapper: Mappers.ClusterPool + }, + 202: { + bodyMapper: Mappers.ClusterPool + }, + 204: { + bodyMapper: Mappers.ClusterPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.clusterPool, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ClusterPool + }, + 201: { + bodyMapper: Mappers.ClusterPool + }, + 202: { + bodyMapper: Mappers.ClusterPool + }, + 204: { + bodyMapper: Mappers.ClusterPool + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.clusterPoolTags, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPoolListResult + }, + 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.HDInsight/clusterpools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterPoolListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusters.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusters.ts new file mode 100644 index 000000000000..12c9831375d2 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/clusters.ts @@ -0,0 +1,1206 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Clusters } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Cluster, + ClustersListByClusterPoolNameNextOptionalParams, + ClustersListByClusterPoolNameOptionalParams, + ClustersListByClusterPoolNameResponse, + ServiceConfigResult, + ClustersListServiceConfigsNextOptionalParams, + ClustersListServiceConfigsOptionalParams, + ClustersListServiceConfigsResponse, + ClusterInstanceViewResult, + ClustersListInstanceViewsNextOptionalParams, + ClustersListInstanceViewsOptionalParams, + ClustersListInstanceViewsResponse, + ClusterResizeData, + ClustersResizeOptionalParams, + ClustersResizeResponse, + ClustersGetOptionalParams, + ClustersGetResponse, + ClustersCreateOptionalParams, + ClustersCreateResponse, + ClusterPatch, + ClustersUpdateOptionalParams, + ClustersUpdateResponse, + ClustersDeleteOptionalParams, + ClustersGetInstanceViewOptionalParams, + ClustersGetInstanceViewResponse, + ClustersListByClusterPoolNameNextResponse, + ClustersListServiceConfigsNextResponse, + ClustersListInstanceViewsNextResponse +} from "../models"; + +/// +/** Class containing Clusters operations. */ +export class ClustersImpl implements Clusters { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class Clusters class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Lists the HDInsight cluster pools under a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + public listByClusterPoolName( + resourceGroupName: string, + clusterPoolName: string, + options?: ClustersListByClusterPoolNameOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByClusterPoolNamePagingAll( + resourceGroupName, + clusterPoolName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByClusterPoolNamePagingPage( + resourceGroupName, + clusterPoolName, + options, + settings + ); + } + }; + } + + private async *listByClusterPoolNamePagingPage( + resourceGroupName: string, + clusterPoolName: string, + options?: ClustersListByClusterPoolNameOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ClustersListByClusterPoolNameResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByClusterPoolName( + resourceGroupName, + clusterPoolName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByClusterPoolNameNext( + resourceGroupName, + clusterPoolName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByClusterPoolNamePagingAll( + resourceGroupName: string, + clusterPoolName: string, + options?: ClustersListByClusterPoolNameOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByClusterPoolNamePagingPage( + resourceGroupName, + clusterPoolName, + options + )) { + yield* page; + } + } + + /** + * Lists the config dump of all services running in cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + public listServiceConfigs( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListServiceConfigsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listServiceConfigsPagingAll( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listServiceConfigsPagingPage( + resourceGroupName, + clusterPoolName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listServiceConfigsPagingPage( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListServiceConfigsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ClustersListServiceConfigsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listServiceConfigs( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listServiceConfigsNext( + resourceGroupName, + clusterPoolName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listServiceConfigsPagingAll( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListServiceConfigsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listServiceConfigsPagingPage( + resourceGroupName, + clusterPoolName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * Lists the lists of instance views + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + public listInstanceViews( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListInstanceViewsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listInstanceViewsPagingAll( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listInstanceViewsPagingPage( + resourceGroupName, + clusterPoolName, + clusterName, + options, + settings + ); + } + }; + } + + private async *listInstanceViewsPagingPage( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListInstanceViewsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ClustersListInstanceViewsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listInstanceViews( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listInstanceViewsNext( + resourceGroupName, + clusterPoolName, + clusterName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listInstanceViewsPagingAll( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListInstanceViewsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listInstanceViewsPagingPage( + resourceGroupName, + clusterPoolName, + clusterName, + options + )) { + yield* page; + } + } + + /** + * Lists the HDInsight cluster pools under a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + private _listByClusterPoolName( + resourceGroupName: string, + clusterPoolName: string, + options?: ClustersListByClusterPoolNameOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, options }, + listByClusterPoolNameOperationSpec + ); + } + + /** + * Resize an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterResizeRequest Resize a cluster. + * @param options The options parameters. + */ + async beginResize( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterResizeRequest: ClusterResizeData, + options?: ClustersResizeOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersResizeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterPoolName, + clusterName, + clusterResizeRequest, + options + }, + spec: resizeOperationSpec + }); + const poller = await createHttpPoller< + ClustersResizeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Resize an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterResizeRequest Resize a cluster. + * @param options The options parameters. + */ + async beginResizeAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterResizeRequest: ClusterResizeData, + options?: ClustersResizeOptionalParams + ): Promise { + const poller = await this.beginResize( + resourceGroupName, + clusterPoolName, + clusterName, + clusterResizeRequest, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets a HDInsight cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, options }, + getOperationSpec + ); + } + + /** + * Creates a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param hDInsightCluster The cluster to create. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + hDInsightCluster: Cluster, + options?: ClustersCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterPoolName, + clusterName, + hDInsightCluster, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param hDInsightCluster The cluster to create. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + hDInsightCluster: Cluster, + options?: ClustersCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + clusterPoolName, + clusterName, + hDInsightCluster, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterPatchRequest Patch a cluster. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterPatchRequest: ClusterPatch, + options?: ClustersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + clusterPoolName, + clusterName, + clusterPatchRequest, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ClustersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterPatchRequest Patch a cluster. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterPatchRequest: ClusterPatch, + options?: ClustersUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + clusterPoolName, + clusterName, + clusterPatchRequest, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterPoolName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterPoolName, + clusterName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Lists the config dump of all services running in cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + private _listServiceConfigs( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListServiceConfigsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, options }, + listServiceConfigsOperationSpec + ); + } + + /** + * Lists the lists of instance views + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + private _listInstanceViews( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListInstanceViewsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, options }, + listInstanceViewsOperationSpec + ); + } + + /** + * Gets the status of a cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + getInstanceView( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersGetInstanceViewOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, options }, + getInstanceViewOperationSpec + ); + } + + /** + * ListByClusterPoolNameNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param nextLink The nextLink from the previous successful call to the ListByClusterPoolName method. + * @param options The options parameters. + */ + private _listByClusterPoolNameNext( + resourceGroupName: string, + clusterPoolName: string, + nextLink: string, + options?: ClustersListByClusterPoolNameNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, nextLink, options }, + listByClusterPoolNameNextOperationSpec + ); + } + + /** + * ListServiceConfigsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param nextLink The nextLink from the previous successful call to the ListServiceConfigs method. + * @param options The options parameters. + */ + private _listServiceConfigsNext( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + nextLink: string, + options?: ClustersListServiceConfigsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, nextLink, options }, + listServiceConfigsNextOperationSpec + ); + } + + /** + * ListInstanceViewsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param nextLink The nextLink from the previous successful call to the ListInstanceViews method. + * @param options The options parameters. + */ + private _listInstanceViewsNext( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + nextLink: string, + options?: ClustersListInstanceViewsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterPoolName, clusterName, nextLink, options }, + listInstanceViewsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByClusterPoolNameOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName + ], + headerParameters: [Parameters.accept], + serializer +}; +const resizeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/resize", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: { + bodyMapper: Mappers.Cluster + }, + 204: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.clusterResizeRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: { + bodyMapper: Mappers.Cluster + }, + 204: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.hDInsightCluster, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: { + bodyMapper: Mappers.Cluster + }, + 204: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.clusterPatchRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listServiceConfigsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServiceConfigListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listInstanceViewsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterInstanceViewsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getInstanceViewOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterInstanceViewResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByClusterPoolNameNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listServiceConfigsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServiceConfigListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.nextLink, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listInstanceViewsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ClusterInstanceViewsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterPoolName, + Parameters.nextLink, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/index.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/index.ts new file mode 100644 index 000000000000..66502b6c5136 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/index.ts @@ -0,0 +1,15 @@ +/* + * 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 "./clusterPools"; +export * from "./clusters"; +export * from "./clusterJobs"; +export * from "./locations"; +export * from "./operations"; +export * from "./availableClusterPoolVersions"; +export * from "./availableClusterVersions"; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/locations.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/locations.ts new file mode 100644 index 000000000000..c92d942ed12a --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/locations.ts @@ -0,0 +1,74 @@ +/* + * 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 { Locations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + NameAvailabilityParameters, + LocationsCheckNameAvailabilityOptionalParams, + LocationsCheckNameAvailabilityResponse +} from "../models"; + +/** Class containing Locations operations. */ +export class LocationsImpl implements Locations { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class Locations class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Check the availability of the resource name. + * @param location The name of the Azure region. + * @param nameAvailabilityParameters The name and type of the resource. + * @param options The options parameters. + */ + checkNameAvailability( + location: string, + nameAvailabilityParameters: NameAvailabilityParameters, + options?: LocationsCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nameAvailabilityParameters, options }, + checkNameAvailabilityOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.NameAvailabilityResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.nameAvailabilityParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operations/operations.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operations/operations.ts new file mode 100644 index 000000000000..a26569c0c1a6 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { HDInsightOnAksManagementClient } from "../hDInsightOnAksManagementClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: HDInsightOnAksManagementClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: HDInsightOnAksManagementClient) { + this.client = client; + } + + /** + * Returns list of operations. + * @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: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Returns list of operations. + * @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.HDInsight/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 + } + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/availableClusterPoolVersions.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/availableClusterPoolVersions.ts new file mode 100644 index 000000000000..2fd90cb6159f --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/availableClusterPoolVersions.ts @@ -0,0 +1,27 @@ +/* + * 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 { + ClusterPoolVersion, + AvailableClusterPoolVersionsListByLocationOptionalParams +} from "../models"; + +/// +/** Interface representing a AvailableClusterPoolVersions. */ +export interface AvailableClusterPoolVersions { + /** + * Returns a list of available cluster pool versions. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + listByLocation( + location: string, + options?: AvailableClusterPoolVersionsListByLocationOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/availableClusterVersions.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/availableClusterVersions.ts new file mode 100644 index 000000000000..9ee6fca1c3b2 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/availableClusterVersions.ts @@ -0,0 +1,27 @@ +/* + * 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 { + ClusterVersion, + AvailableClusterVersionsListByLocationOptionalParams +} from "../models"; + +/// +/** Interface representing a AvailableClusterVersions. */ +export interface AvailableClusterVersions { + /** + * Returns a list of available cluster versions. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + listByLocation( + location: string, + options?: AvailableClusterVersionsListByLocationOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusterJobs.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusterJobs.ts new file mode 100644 index 000000000000..723282d72f5e --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusterJobs.ts @@ -0,0 +1,69 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ClusterJob, + ClusterJobsListOptionalParams, + ClusterJobsRunJobOptionalParams, + ClusterJobsRunJobResponse +} from "../models"; + +/// +/** Interface representing a ClusterJobs. */ +export interface ClusterJobs { + /** + * Get jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClusterJobsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Operations on jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterJob The Cluster job. + * @param options The options parameters. + */ + beginRunJob( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterJob: ClusterJob, + options?: ClusterJobsRunJobOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClusterJobsRunJobResponse + > + >; + /** + * Operations on jobs of HDInsight on AKS cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterJob The Cluster job. + * @param options The options parameters. + */ + beginRunJobAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterJob: ClusterJob, + options?: ClusterJobsRunJobOptionalParams + ): Promise; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusterPools.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusterPools.ts new file mode 100644 index 000000000000..c3cb8c7d0b5c --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusterPools.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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ClusterPool, + ClusterPoolsListBySubscriptionOptionalParams, + ClusterPoolsListByResourceGroupOptionalParams, + ClusterPoolsGetOptionalParams, + ClusterPoolsGetResponse, + ClusterPoolsCreateOrUpdateOptionalParams, + ClusterPoolsCreateOrUpdateResponse, + TagsObject, + ClusterPoolsUpdateTagsOptionalParams, + ClusterPoolsUpdateTagsResponse, + ClusterPoolsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ClusterPools. */ +export interface ClusterPools { + /** + * Gets the list of Cluster Pools within a Subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ClusterPoolsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists the HDInsight cluster pools under 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?: ClusterPoolsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a cluster pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterPoolName: string, + options?: ClusterPoolsGetOptionalParams + ): Promise; + /** + * Creates or updates a cluster pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPool The Cluster Pool to create. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + clusterPoolName: string, + clusterPool: ClusterPool, + options?: ClusterPoolsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClusterPoolsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a cluster pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPool The Cluster Pool to create. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterPool: ClusterPool, + options?: ClusterPoolsCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing Cluster Pool Tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolTags Parameters supplied to update tags. + * @param options The options parameters. + */ + beginUpdateTags( + resourceGroupName: string, + clusterPoolName: string, + clusterPoolTags: TagsObject, + options?: ClusterPoolsUpdateTagsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClusterPoolsUpdateTagsResponse + > + >; + /** + * Updates an existing Cluster Pool Tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolTags Parameters supplied to update tags. + * @param options The options parameters. + */ + beginUpdateTagsAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterPoolTags: TagsObject, + options?: ClusterPoolsUpdateTagsOptionalParams + ): Promise; + /** + * Deletes a Cluster Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + clusterPoolName: string, + options?: ClusterPoolsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a Cluster Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + clusterPoolName: string, + options?: ClusterPoolsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusters.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusters.ts new file mode 100644 index 000000000000..c4e10abc2319 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/clusters.ts @@ -0,0 +1,230 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Cluster, + ClustersListByClusterPoolNameOptionalParams, + ServiceConfigResult, + ClustersListServiceConfigsOptionalParams, + ClusterInstanceViewResult, + ClustersListInstanceViewsOptionalParams, + ClusterResizeData, + ClustersResizeOptionalParams, + ClustersResizeResponse, + ClustersGetOptionalParams, + ClustersGetResponse, + ClustersCreateOptionalParams, + ClustersCreateResponse, + ClusterPatch, + ClustersUpdateOptionalParams, + ClustersUpdateResponse, + ClustersDeleteOptionalParams, + ClustersGetInstanceViewOptionalParams, + ClustersGetInstanceViewResponse +} from "../models"; + +/// +/** Interface representing a Clusters. */ +export interface Clusters { + /** + * Lists the HDInsight cluster pools under a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param options The options parameters. + */ + listByClusterPoolName( + resourceGroupName: string, + clusterPoolName: string, + options?: ClustersListByClusterPoolNameOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists the config dump of all services running in cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + listServiceConfigs( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListServiceConfigsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists the lists of instance views + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + listInstanceViews( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersListInstanceViewsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Resize an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterResizeRequest Resize a cluster. + * @param options The options parameters. + */ + beginResize( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterResizeRequest: ClusterResizeData, + options?: ClustersResizeOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersResizeResponse + > + >; + /** + * Resize an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterResizeRequest Resize a cluster. + * @param options The options parameters. + */ + beginResizeAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterResizeRequest: ClusterResizeData, + options?: ClustersResizeOptionalParams + ): Promise; + /** + * Gets a HDInsight cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersGetOptionalParams + ): Promise; + /** + * Creates a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param hDInsightCluster The cluster to create. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + hDInsightCluster: Cluster, + options?: ClustersCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersCreateResponse + > + >; + /** + * Creates a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param hDInsightCluster The cluster to create. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + hDInsightCluster: Cluster, + options?: ClustersCreateOptionalParams + ): Promise; + /** + * Updates an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterPatchRequest Patch a cluster. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterPatchRequest: ClusterPatch, + options?: ClustersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ClustersUpdateResponse + > + >; + /** + * Updates an existing Cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterPatchRequest Patch a cluster. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + clusterPatchRequest: ClusterPatch, + options?: ClustersUpdateOptionalParams + ): Promise; + /** + * Deletes a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersDeleteOptionalParams + ): Promise; + /** + * Gets the status of a cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param options The options parameters. + */ + getInstanceView( + resourceGroupName: string, + clusterPoolName: string, + clusterName: string, + options?: ClustersGetInstanceViewOptionalParams + ): Promise; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/index.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..66502b6c5136 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/index.ts @@ -0,0 +1,15 @@ +/* + * 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 "./clusterPools"; +export * from "./clusters"; +export * from "./clusterJobs"; +export * from "./locations"; +export * from "./operations"; +export * from "./availableClusterPoolVersions"; +export * from "./availableClusterVersions"; diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/locations.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/locations.ts new file mode 100644 index 000000000000..da5c0887deb8 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/locations.ts @@ -0,0 +1,28 @@ +/* + * 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 { + NameAvailabilityParameters, + LocationsCheckNameAvailabilityOptionalParams, + LocationsCheckNameAvailabilityResponse +} from "../models"; + +/** Interface representing a Locations. */ +export interface Locations { + /** + * Check the availability of the resource name. + * @param location The name of the Azure region. + * @param nameAvailabilityParameters The name and type of the resource. + * @param options The options parameters. + */ + checkNameAvailability( + location: string, + nameAvailabilityParameters: NameAvailabilityParameters, + options?: LocationsCheckNameAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/operations.ts b/sdk/hdinsight/arm-hdinsightonaks/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..0c50b09b459e --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/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 { + /** + * Returns list of operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/src/pagingHelper.ts b/sdk/hdinsight/arm-hdinsightonaks/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * 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 interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/hdinsight/arm-hdinsightonaks/test/sampleTest.ts b/sdk/hdinsight/arm-hdinsightonaks/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/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/hdinsight/arm-hdinsightonaks/tsconfig.json b/sdk/hdinsight/arm-hdinsightonaks/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/hdinsight/arm-hdinsightonaks/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/hdinsight/ci.mgmt.yml b/sdk/hdinsight/ci.mgmt.yml index e99451749db4..ad1ea3d2555a 100644 --- a/sdk/hdinsight/ci.mgmt.yml +++ b/sdk/hdinsight/ci.mgmt.yml @@ -10,6 +10,7 @@ trigger: include: - sdk/hdinsight/ci.mgmt.yml - sdk/hdinsight/arm-hdinsight + - sdk/hdinsight/arm-hdinsightonaks pr: branches: include: @@ -23,6 +24,7 @@ pr: include: - sdk/hdinsight/ci.mgmt.yml - sdk/hdinsight/arm-hdinsight + - sdk/hdinsight/arm-hdinsightonaks extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: @@ -30,3 +32,5 @@ extends: Artifacts: - name: azure-arm-hdinsight safeName: azurearmhdinsight + - name: azure-arm-hdinsightonaks + safeName: azurearmhdinsightonaks