diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 863c0d608a66..962aa2b51c93 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -599,9 +599,6 @@ # PRLabel: %Mgmt /sdk/hdinsight/arm-hdinsight/ @qiaozha @MaryGao -# PRLabel: %Mgmt -/sdk/hdinsight/arm-hdinsightcontainers/ @qiaozha @MaryGao - # PRLabel: %Mgmt /sdk/healthbot/arm-healthbot/ @qiaozha @MaryGao diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1848ee0a2623..3a1bf94c71d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13932,79 +13932,6 @@ importers: specifier: catalog:testing version: 4.0.7(@types/debug@4.1.12)(@types/node@20.19.23)(@vitest/browser-playwright@4.0.7)(jsdom@16.7.0)(msw@2.7.3(@types/node@20.19.23)(typescript@5.9.3))(terser@5.39.0)(tsx@4.20.6)(yaml@2.8.1) - sdk/hdinsight/arm-hdinsightcontainers: - dependencies: - '@azure/abort-controller': - specifier: ^2.1.2 - version: link:../../core/abort-controller - '@azure/core-auth': - specifier: ^1.9.0 - version: link:../../core/core-auth - '@azure/core-client': - specifier: ^1.9.2 - version: link:../../core/core-client - '@azure/core-lro': - specifier: ^2.5.4 - version: 2.7.2 - '@azure/core-paging': - specifier: ^1.6.2 - version: link:../../core/core-paging - '@azure/core-rest-pipeline': - specifier: ^1.18.2 - version: link:../../core/core-rest-pipeline - tslib: - specifier: ^2.8.1 - version: 2.8.1 - devDependencies: - '@azure-tools/test-credential': - specifier: workspace:^ - version: link:../../test-utils/test-credential - '@azure-tools/test-recorder': - specifier: workspace:^ - version: link:../../test-utils/recorder - '@azure-tools/test-utils-vitest': - specifier: workspace:^ - version: link:../../test-utils/test-utils-vitest - '@azure/dev-tool': - specifier: workspace:^ - version: link:../../../common/tools/dev-tool - '@azure/identity': - specifier: catalog:internal - version: 4.11.1 - '@azure/logger': - specifier: ^1.1.4 - version: link:../../core/logger - '@types/node': - specifier: 'catalog:' - version: 20.19.23 - '@vitest/browser-playwright': - specifier: catalog:testing - version: 4.0.7(msw@2.7.3(@types/node@20.19.23)(typescript@5.9.3))(playwright@1.56.1)(vite@7.2.2(@types/node@20.19.23)(terser@5.39.0)(tsx@4.20.6)(yaml@2.8.1))(vitest@4.0.7) - '@vitest/coverage-istanbul': - specifier: catalog:testing - version: 4.0.7(vitest@4.0.7) - cross-env: - specifier: 'catalog:' - version: 7.0.3 - dotenv: - specifier: catalog:testing - version: 16.6.1 - playwright: - specifier: catalog:testing - version: 1.56.1 - rimraf: - specifier: 'catalog:' - version: 6.0.1 - tshy: - specifier: 'catalog:' - version: 3.0.3 - typescript: - specifier: 'catalog:' - version: 5.9.3 - vitest: - specifier: catalog:testing - version: 4.0.7(@types/debug@4.1.12)(@types/node@20.19.23)(@vitest/browser-playwright@4.0.7)(jsdom@16.7.0)(msw@2.7.3(@types/node@20.19.23)(typescript@5.9.3))(terser@5.39.0)(tsx@4.20.6)(yaml@2.8.1) - sdk/healthbot/arm-healthbot: dependencies: '@azure/abort-controller': diff --git a/sdk/hdinsight/arm-hdinsightcontainers/CHANGELOG.md b/sdk/hdinsight/arm-hdinsightcontainers/CHANGELOG.md deleted file mode 100644 index 8f748faec72b..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/CHANGELOG.md +++ /dev/null @@ -1,295 +0,0 @@ -# Release History - -## 1.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.4 (2025-08-22) - -### Other Changes - - - Other fixes - -## 1.0.0-beta.3 (2024-08-23) -Compared with version 1.0.0-beta.2 - -### Features Added - - - Added operation group ClusterLibraries - - Added operation group ClusterPoolUpgradeHistories - - Added operation group ClusterUpgradeHistories - - Added operation Clusters.beginUpgradeManualRollback - - Added operation Clusters.beginUpgradeManualRollbackAndWait - - Added Interface ClusterAksPatchUpgradeHistoryProperties - - Added Interface ClusterAvailableInPlaceUpgradeProperties - - Added Interface ClusterAvailableUpgradePatchVersionUpgradeProperties - - Added Interface ClusterHotfixUpgradeHistoryProperties - - Added Interface ClusterHotfixUpgradeRollbackHistoryProperties - - Added Interface ClusterInPlaceUpgradeHistoryProperties - - Added Interface ClusterInPlaceUpgradeProperties - - Added Interface ClusterLibrariesListNextOptionalParams - - Added Interface ClusterLibrariesListOptionalParams - - Added Interface ClusterLibrariesManageLibrariesHeaders - - Added Interface ClusterLibrariesManageLibrariesOptionalParams - - Added Interface ClusterLibrary - - Added Interface ClusterLibraryList - - Added Interface ClusterLibraryManagementOperation - - Added Interface ClusterLibraryManagementOperationProperties - - Added Interface ClusterLibraryProperties - - Added Interface ClusterPatchVersionUpgradeHistoryProperties - - Added Interface ClusterPatchVersionUpgradeProperties - - Added Interface ClusterPatchVersionUpgradeRollbackHistoryProperties - - Added Interface ClusterPoolAksPatchUpgradeHistoryProperties - - Added Interface ClusterPoolNodeOsUpgradeHistoryProperties - - Added Interface ClusterPoolUpgradeHistoriesListNextOptionalParams - - Added Interface ClusterPoolUpgradeHistoriesListOptionalParams - - Added Interface ClusterPoolUpgradeHistory - - Added Interface ClusterPoolUpgradeHistoryListResult - - Added Interface ClusterPoolUpgradeHistoryProperties - - Added Interface ClustersUpgradeManualRollbackHeaders - - Added Interface ClustersUpgradeManualRollbackOptionalParams - - Added Interface ClusterUpgradeHistoriesListNextOptionalParams - - Added Interface ClusterUpgradeHistoriesListOptionalParams - - Added Interface ClusterUpgradeHistory - - Added Interface ClusterUpgradeHistoryListResult - - Added Interface ClusterUpgradeHistoryProperties - - Added Interface ClusterUpgradeRollback - - Added Interface ClusterUpgradeRollbackProperties - - Added Interface IpTag - - Added Interface ManagedIdentityProfile - - Added Interface ManagedIdentitySpec - - Added Interface MavenLibraryProperties - - Added Interface PyPiLibraryProperties - - Added Type Alias Category - - Added Type Alias ClusterAvailableInPlaceUpgradePropertiesUnion - - Added Type Alias ClusterInPlaceUpgradeHistoryPropertiesUnion - - Added Type Alias ClusterInPlaceUpgradePropertiesUnion - - Added Type Alias ClusterLibrariesListNextResponse - - Added Type Alias ClusterLibrariesListResponse - - Added Type Alias ClusterLibrariesManageLibrariesResponse - - Added Type Alias ClusterLibraryPropertiesUnion - - Added Type Alias ClusterPoolUpgradeHistoriesListNextResponse - - Added Type Alias ClusterPoolUpgradeHistoriesListResponse - - Added Type Alias ClusterPoolUpgradeHistoryPropertiesUnion - - Added Type Alias ClusterPoolUpgradeHistoryType - - Added Type Alias ClusterPoolUpgradeHistoryUpgradeResultType - - Added Type Alias ClustersUpgradeManualRollbackResponse - - Added Type Alias ClusterUpgradeHistoriesListNextResponse - - Added Type Alias ClusterUpgradeHistoriesListResponse - - Added Type Alias ClusterUpgradeHistoryPropertiesUnion - - Added Type Alias ClusterUpgradeHistorySeverityType - - Added Type Alias ClusterUpgradeHistoryType - - Added Type Alias ClusterUpgradeHistoryUpgradeResultType - - Added Type Alias LibraryManagementAction - - Added Type Alias ManagedIdentityType - - Added Type Alias Status - - Added Type Alias Type - - Interface ClusterPoolComputeProfile has a new optional parameter availabilityZones - - Interface ClusterPoolProfile has a new optional parameter publicIpTag - - Interface ClusterProfile has a new optional parameter managedIdentityProfile - - Interface ComputeProfile has a new optional parameter availabilityZones - - Interface SshProfile has a new optional parameter vmSize - - Interface UpdatableClusterProfile has a new optional parameter secretsProfile - - Interface UpdatableClusterProfile has a new optional parameter trinoProfile - - Type of parameter upgradeType of interface ClusterAvailableUpgradeProperties is changed from "AKSPatchUpgrade" | "HotfixUpgrade" to "AKSPatchUpgrade" | "ClusterAvailableInPlaceUpgradeProperties" | "HotfixUpgrade" | "PatchVersionUpgrade" - - Type of parameter upgradeType of interface ClusterUpgradeProperties is changed from "AKSPatchUpgrade" | "HotfixUpgrade" to "AKSPatchUpgrade" | "ClusterInPlaceUpgradeProperties" | "HotfixUpgrade" | "PatchVersionUpgrade" - - Added Enum KnownCategory - - Added Enum KnownClusterPoolUpgradeHistoryType - - Added Enum KnownClusterPoolUpgradeHistoryUpgradeResultType - - Added Enum KnownClusterUpgradeHistorySeverityType - - Added Enum KnownClusterUpgradeHistoryType - - Added Enum KnownClusterUpgradeHistoryUpgradeResultType - - Added Enum KnownLibraryManagementAction - - Added Enum KnownManagedIdentityType - - Added Enum KnownStatus - - Added Enum KnownType - - Enum KnownClusterAvailableUpgradeType has a new value PatchVersionUpgrade - - Enum KnownClusterUpgradeType has a new value PatchVersionUpgrade - -### Breaking Changes - - - Interface KafkaProfile no longer has parameter clusterIdentity - - -## 1.0.0-beta.2 (2024-04-03) - -### Features Added - - - Added operation group ClusterAvailableUpgrades - - Added operation group ClusterPoolAvailableUpgrades - - Added operation ClusterPools.beginUpgrade - - Added operation ClusterPools.beginUpgradeAndWait - - Added operation Clusters.beginUpgrade - - Added operation Clusters.beginUpgradeAndWait - - Added Interface ClusterAccessProfile - - Added Interface ClusterAKSPatchVersionUpgradeProperties - - Added Interface ClusterAvailableUpgrade - - Added Interface ClusterAvailableUpgradeAksPatchUpgradeProperties - - Added Interface ClusterAvailableUpgradeHotfixUpgradeProperties - - Added Interface ClusterAvailableUpgradeList - - Added Interface ClusterAvailableUpgradeProperties - - Added Interface ClusterAvailableUpgradesListNextOptionalParams - - Added Interface ClusterAvailableUpgradesListOptionalParams - - Added Interface ClusterHotfixUpgradeProperties - - Added Interface ClusterPatchProperties - - Added Interface ClusterPoolAKSPatchVersionUpgradeProperties - - Added Interface ClusterPoolAvailableUpgrade - - Added Interface ClusterPoolAvailableUpgradeAksPatchUpgradeProperties - - Added Interface ClusterPoolAvailableUpgradeList - - Added Interface ClusterPoolAvailableUpgradeNodeOsUpgradeProperties - - Added Interface ClusterPoolAvailableUpgradeProperties - - Added Interface ClusterPoolAvailableUpgradesListNextOptionalParams - - Added Interface ClusterPoolAvailableUpgradesListOptionalParams - - Added Interface ClusterPoolNodeOsImageUpdateProperties - - Added Interface ClusterPoolResourceProperties - - Added Interface ClusterPoolsUpgradeHeaders - - Added Interface ClusterPoolsUpgradeOptionalParams - - Added Interface ClusterPoolUpgrade - - Added Interface ClusterPoolUpgradeProperties - - Added Interface ClusterPoolVersionProperties - - Added Interface ClusterRangerPluginProfile - - Added Interface ClusterResizeProperties - - Added Interface ClusterResourceProperties - - Added Interface ClustersUpgradeHeaders - - Added Interface ClustersUpgradeOptionalParams - - Added Interface ClusterUpgrade - - Added Interface ClusterUpgradeProperties - - Added Interface ClusterVersionProperties - - Added Interface DiskStorageProfile - - Added Interface FlinkJobProfile - - Added Interface KafkaConnectivityEndpoints - - Added Interface KafkaProfile - - Added Interface RangerAdminSpec - - Added Interface RangerAdminSpecDatabase - - Added Interface RangerAuditSpec - - Added Interface RangerProfile - - Added Interface RangerUsersyncSpec - - Added Interface TrinoDebugConfig - - Added Type Alias ClusterAvailableUpgradePropertiesUnion - - Added Type Alias ClusterAvailableUpgradesListNextResponse - - Added Type Alias ClusterAvailableUpgradesListResponse - - Added Type Alias ClusterAvailableUpgradeType - - Added Type Alias ClusterPoolAvailableUpgradePropertiesUnion - - Added Type Alias ClusterPoolAvailableUpgradesListNextResponse - - Added Type Alias ClusterPoolAvailableUpgradesListResponse - - Added Type Alias ClusterPoolAvailableUpgradeType - - Added Type Alias ClusterPoolsUpgradeResponse - - Added Type Alias ClusterPoolUpgradePropertiesUnion - - Added Type Alias ClusterPoolUpgradeType - - Added Type Alias ClustersUpgradeResponse - - Added Type Alias ClusterUpgradePropertiesUnion - - Added Type Alias ClusterUpgradeType - - Added Type Alias CurrentClusterAksVersionStatus - - Added Type Alias CurrentClusterPoolAksVersionStatus - - Added Type Alias DataDiskType - - Added Type Alias DbConnectionAuthenticationMode - - Added Type Alias DeploymentMode - - Added Type Alias MetastoreDbConnectionAuthenticationMode - - Added Type Alias OutboundType - - Added Type Alias RangerUsersyncMode - - Added Type Alias Severity - - Added Type Alias UpgradeMode - - Interface Cluster has a new optional parameter properties - - Interface ClusterJobsListOptionalParams has a new optional parameter filter - - Interface ClusterPatch has a new optional parameter properties - - Interface ClusterPatch has a new optional parameter tags - - Interface ClusterPool has a new optional parameter properties - - Interface ClusterPoolNetworkProfile has a new optional parameter apiServerAuthorizedIpRanges - - Interface ClusterPoolNetworkProfile has a new optional parameter enablePrivateApiServer - - Interface ClusterPoolNetworkProfile has a new optional parameter outboundType - - Interface ClusterPoolVersion has a new optional parameter properties - - Interface ClusterProfile has a new optional parameter clusterAccessProfile - - Interface ClusterProfile has a new optional parameter rangerPluginProfile - - Interface ClusterProfile has a new optional parameter rangerProfile - - Interface ClusterResizeData has a new optional parameter properties - - Interface ClusterVersion has a new optional parameter properties - - Interface FlinkHiveCatalogOption has a new optional parameter metastoreDbConnectionAuthenticationMode - - Interface FlinkJobProperties has a new optional parameter runId - - Interface FlinkProfile has a new optional parameter deploymentMode - - Interface FlinkProfile has a new optional parameter jobSpec - - Interface HiveCatalogOption has a new optional parameter metastoreDbConnectionAuthenticationMode - - Interface ServiceConfigResult has a new optional parameter properties - - Interface SparkMetastoreSpec has a new optional parameter dbConnectionAuthenticationMode - - Interface SshConnectivityEndpoint has a new optional parameter privateSshEndpoint - - Interface TrinoCoordinator has a new optional parameter debug - - Interface TrinoWorker has a new optional parameter debug - - Interface UpdatableClusterProfile has a new optional parameter rangerPluginProfile - - Interface UpdatableClusterProfile has a new optional parameter rangerProfile - - Interface WebConnectivityEndpoint has a new optional parameter privateFqdn - - Added Enum KnownClusterAvailableUpgradeType - - Added Enum KnownClusterPoolAvailableUpgradeType - - Added Enum KnownClusterPoolUpgradeType - - Added Enum KnownClusterUpgradeType - - Added Enum KnownCurrentClusterAksVersionStatus - - Added Enum KnownCurrentClusterPoolAksVersionStatus - - Added Enum KnownDataDiskType - - Added Enum KnownDbConnectionAuthenticationMode - - Added Enum KnownDeploymentMode - - Added Enum KnownMetastoreDbConnectionAuthenticationMode - - Added Enum KnownOutboundType - - Added Enum KnownRangerUsersyncMode - - Added Enum KnownSeverity - - Added Enum KnownUpgradeMode - - Enum KnownAction has a new value LastStateUpdate - - Enum KnownAction has a new value RELaunch - -### Breaking Changes - - - Interface Cluster no longer has parameter clusterProfile - - Interface Cluster no longer has parameter clusterType - - Interface Cluster no longer has parameter computeProfile - - Interface Cluster no longer has parameter deploymentId - - Interface Cluster no longer has parameter provisioningState - - Interface Cluster no longer has parameter status - - Interface ClusterInstanceViewResult no longer has parameter serviceStatuses - - Interface ClusterInstanceViewResult no longer has parameter status - - Interface ClusterPatch no longer has parameter clusterProfile - - Interface ClusterPool no longer has parameter aksClusterProfile - - Interface ClusterPool no longer has parameter aksManagedResourceGroupName - - Interface ClusterPool no longer has parameter clusterPoolProfile - - Interface ClusterPool no longer has parameter computeProfile - - Interface ClusterPool no longer has parameter deploymentId - - Interface ClusterPool no longer has parameter logAnalyticsProfile - - Interface ClusterPool no longer has parameter managedResourceGroupName - - Interface ClusterPool no longer has parameter networkProfile - - Interface ClusterPool no longer has parameter provisioningState - - Interface ClusterPool no longer has parameter status - - Interface ClusterPoolVersion no longer has parameter aksVersion - - Interface ClusterPoolVersion no longer has parameter clusterPoolVersion - - Interface ClusterPoolVersion no longer has parameter isPreview - - Interface ClusterResizeData no longer has parameter targetWorkerNodeCount - - Interface ClusterVersion no longer has parameter clusterPoolVersion - - Interface ClusterVersion no longer has parameter clusterType - - Interface ClusterVersion no longer has parameter clusterVersion - - Interface ClusterVersion no longer has parameter components - - Interface ClusterVersion no longer has parameter isPreview - - Interface ClusterVersion no longer has parameter ossVersion - - Interface ServiceConfigResult no longer has parameter componentName - - Interface ServiceConfigResult no longer has parameter content - - Interface ServiceConfigResult no longer has parameter customKeys - - Interface ServiceConfigResult no longer has parameter defaultKeys - - Interface ServiceConfigResult no longer has parameter fileName - - Interface ServiceConfigResult no longer has parameter path - - Interface ServiceConfigResult no longer has parameter serviceName - - Interface ServiceConfigResult no longer has parameter type - - Interface TrinoCoordinator no longer has parameter enable - - Interface TrinoCoordinator no longer has parameter port - - Interface TrinoCoordinator no longer has parameter suspend - - Interface TrinoWorker no longer has parameter enable - - Interface TrinoWorker no longer has parameter port - - Interface TrinoWorker no longer has parameter suspend - - Interface ClusterInstanceViewResult has a new required parameter properties - - Type of parameter kafkaProfile of interface ClusterProfile is changed from { - [propertyName: string]: any; - } to KafkaProfile - - -## 1.0.0-beta.1 (2023-08-23) - -The package of @azure/arm-hdinsightcontainers is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). diff --git a/sdk/hdinsight/arm-hdinsightcontainers/LICENSE b/sdk/hdinsight/arm-hdinsightcontainers/LICENSE deleted file mode 100644 index b2f52a2bad4e..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Microsoft Corporation. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/hdinsight/arm-hdinsightcontainers/README.md b/sdk/hdinsight/arm-hdinsightcontainers/README.md deleted file mode 100644 index 9eefb5a3449d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Azure HDInsightContainersManagement client library for JavaScript - -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure HDInsightContainersManagement client. - -HDInsight Containers Management Client - -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightcontainers) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-hdinsightcontainers) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-hdinsightcontainers?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-hdinsightcontainers` package - -Install the Azure HDInsightContainersManagement client library for JavaScript with `npm`: - -```bash -npm install @azure/arm-hdinsightcontainers -``` - -### Create and authenticate a `HDInsightContainersManagementClient` - -To create a client object to access the Azure HDInsightContainersManagement API, you will need the `endpoint` of your Azure HDInsightContainersManagement resource and a `credential`. The Azure HDInsightContainersManagement client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure HDInsightContainersManagement 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 HDInsightContainersManagement** 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://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). - -Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. - -```ts snippet:ReadmeSampleCreateClient_Node -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new HDInsightContainersManagementClient( - new DefaultAzureCredential(), - subscriptionId, -); -``` - -For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. - -```ts snippet:ReadmeSampleCreateClient_Browser -import { InteractiveBrowserCredential } from "@azure/identity"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", -}); -const client = new HDInsightContainersManagementClient(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 - -### HDInsightContainersManagementClient - -`HDInsightContainersManagementClient` is the primary interface for developers using the Azure HDInsightContainersManagement client library. Explore the methods on this client object to understand the different features of the Azure HDInsightContainersManagement 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`: - -```ts snippet:SetLogLevel -import { setLogLevel } from "@azure/logger"; - -setLogLevel("info"); -``` - -For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/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) - -[azure_cli]: https://learn.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-hdinsightcontainers/_meta.json b/sdk/hdinsight/arm-hdinsightcontainers/_meta.json deleted file mode 100644 index 403b64c6ea64..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "1040c6b9bd69bf414c895f7bef87bfd470e90127", - "readme": "specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hdinsight\\resource-manager\\Microsoft.HDInsight\\HDInsightOnAks\\readme.md --use=@autorest/typescript@6.0.24 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", - "use": "@autorest/typescript@6.0.24" -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/api-extractor.json b/sdk/hdinsight/arm-hdinsightcontainers/api-extractor.json deleted file mode 100644 index 16d81e2eb512..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/api-extractor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../api-extractor-base.json" -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/assets.json b/sdk/hdinsight/arm-hdinsightcontainers/assets.json deleted file mode 100644 index 5fb8ecce1040..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/hdinsight/arm-hdinsightcontainers", - "Tag": "js/hdinsight/arm-hdinsightcontainers_2e7405c76f" -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/package.json b/sdk/hdinsight/arm-hdinsightcontainers/package.json deleted file mode 100644 index ebc4ffbead8c..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/package.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "name": "@azure/arm-hdinsightcontainers", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for HDInsightContainersManagementClient.", - "version": "1.0.0-beta.5", - "engines": { - "node": ">=20.0.0" - }, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.18.2", - "tslib": "^2.8.1" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], - "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "devDependencies": { - "@azure-tools/test-credential": "workspace:^", - "@azure-tools/test-recorder": "workspace:^", - "@azure-tools/test-utils-vitest": "workspace:^", - "@azure/dev-tool": "workspace:^", - "@azure/identity": "catalog:internal", - "@azure/logger": "^1.1.4", - "@types/node": "catalog:", - "@vitest/browser-playwright": "catalog:testing", - "@vitest/coverage-istanbul": "catalog:testing", - "cross-env": "catalog:", - "dotenv": "catalog:testing", - "playwright": "catalog:testing", - "rimraf": "catalog:", - "tshy": "catalog:", - "typescript": "catalog:", - "vitest": "catalog:testing" - }, - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], - "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:samples": "tsc -p tsconfig.samples.json", - "check-format": "echo skipped", - "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", - "lint": "echo skipped", - "pack": "pnpm pack 2>&1", - "test": "npm run test:node && npm run test:browser", - "test:browser": "echo skipped", - "test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest", - "update-snippets": "dev-tool run update-snippets" - }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/hDInsightContainersManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightcontainers", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-hdinsightcontainers?view=azure-node-preview" - }, - "type": "module", - "tshy": { - "project": "../../../tsconfig.src.build.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false - }, - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - } -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/review/arm-hdinsightcontainers-node.api.md b/sdk/hdinsight/arm-hdinsightcontainers/review/arm-hdinsightcontainers-node.api.md deleted file mode 100644 index 62a9b18e5a65..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/review/arm-hdinsightcontainers-node.api.md +++ /dev/null @@ -1,2034 +0,0 @@ -## API Report File for "@azure/arm-hdinsightcontainers" - -> 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 type Category = string; - -// @public -export interface Cluster extends TrackedResource { - properties?: ClusterResourceProperties; -} - -// @public -export interface ClusterAccessProfile { - enableInternalIngress: boolean; - readonly privateLinkServiceId?: string; -} - -// @public -export interface ClusterAksPatchUpgradeHistoryProperties extends ClusterUpgradeHistoryProperties { - newVersion?: string; - originalVersion?: string; - upgradeType: "AKSPatchUpgrade"; -} - -// @public -export interface ClusterAKSPatchVersionUpgradeProperties extends ClusterUpgradeProperties { - upgradeType: "AKSPatchUpgrade"; -} - -// @public -export interface ClusterAvailableInPlaceUpgradeProperties extends ClusterAvailableUpgradeProperties { - componentName?: string; - createdTime?: Date; - description?: string; - extendedProperties?: string; - severity?: Severity; - sourceBuildNumber?: string; - sourceClusterVersion?: string; - sourceOssVersion?: string; - targetBuildNumber?: string; - targetClusterVersion?: string; - targetOssVersion?: string; - upgradeType: "ClusterAvailableInPlaceUpgradeProperties" | "HotfixUpgrade" | "PatchVersionUpgrade"; -} - -// @public (undocumented) -export type ClusterAvailableInPlaceUpgradePropertiesUnion = ClusterAvailableInPlaceUpgradeProperties | ClusterAvailableUpgradeHotfixUpgradeProperties | ClusterAvailableUpgradePatchVersionUpgradeProperties; - -// @public -export interface ClusterAvailableUpgrade extends ProxyResource { - properties?: ClusterAvailableUpgradePropertiesUnion; -} - -// @public -export interface ClusterAvailableUpgradeAksPatchUpgradeProperties extends ClusterAvailableUpgradeProperties { - currentVersion?: string; - currentVersionStatus?: CurrentClusterAksVersionStatus; - latestVersion?: string; - upgradeType: "AKSPatchUpgrade"; -} - -// @public -export interface ClusterAvailableUpgradeHotfixUpgradeProperties extends ClusterAvailableInPlaceUpgradeProperties { - upgradeType: "HotfixUpgrade"; -} - -// @public -export interface ClusterAvailableUpgradeList { - nextLink?: string; - value: ClusterAvailableUpgrade[]; -} - -// @public -export interface ClusterAvailableUpgradePatchVersionUpgradeProperties extends ClusterAvailableInPlaceUpgradeProperties { - upgradeType: "PatchVersionUpgrade"; -} - -// @public -export interface ClusterAvailableUpgradeProperties { - upgradeType: "AKSPatchUpgrade" | "ClusterAvailableInPlaceUpgradeProperties" | "HotfixUpgrade" | "PatchVersionUpgrade"; -} - -// @public (undocumented) -export type ClusterAvailableUpgradePropertiesUnion = ClusterAvailableUpgradeProperties | ClusterAvailableUpgradeAksPatchUpgradeProperties | ClusterAvailableInPlaceUpgradePropertiesUnion; - -// @public -export interface ClusterAvailableUpgrades { - list(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClusterAvailableUpgradesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ClusterAvailableUpgradesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterAvailableUpgradesListNextResponse = ClusterAvailableUpgradeList; - -// @public -export interface ClusterAvailableUpgradesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterAvailableUpgradesListResponse = ClusterAvailableUpgradeList; - -// @public -export type ClusterAvailableUpgradeType = 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 ClusterHotfixUpgradeHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties { - upgradeType: "HotfixUpgrade"; -} - -// @public -export interface ClusterHotfixUpgradeProperties extends ClusterInPlaceUpgradeProperties { - upgradeType: "HotfixUpgrade"; -} - -// @public -export interface ClusterHotfixUpgradeRollbackHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties { - upgradeType: "HotfixUpgradeRollback"; -} - -// @public -export interface ClusterInPlaceUpgradeHistoryProperties extends ClusterUpgradeHistoryProperties { - componentName?: string; - severity?: ClusterUpgradeHistorySeverityType; - sourceBuildNumber?: string; - sourceClusterVersion?: string; - sourceOssVersion?: string; - targetBuildNumber?: string; - targetClusterVersion?: string; - targetOssVersion?: string; - upgradeType: "ClusterInPlaceUpgradeHistoryProperties" | "HotfixUpgrade" | "HotfixUpgradeRollback" | "PatchVersionUpgrade" | "PatchVersionUpgradeRollback"; -} - -// @public (undocumented) -export type ClusterInPlaceUpgradeHistoryPropertiesUnion = ClusterInPlaceUpgradeHistoryProperties | ClusterHotfixUpgradeHistoryProperties | ClusterHotfixUpgradeRollbackHistoryProperties | ClusterPatchVersionUpgradeHistoryProperties | ClusterPatchVersionUpgradeRollbackHistoryProperties; - -// @public -export interface ClusterInPlaceUpgradeProperties extends ClusterUpgradeProperties { - componentName?: string; - targetBuildNumber?: string; - targetClusterVersion?: string; - targetOssVersion?: string; - upgradeType: "ClusterInPlaceUpgradeProperties" | "HotfixUpgrade" | "PatchVersionUpgrade"; -} - -// @public (undocumented) -export type ClusterInPlaceUpgradePropertiesUnion = ClusterInPlaceUpgradeProperties | ClusterHotfixUpgradeProperties | ClusterPatchVersionUpgradeProperties; - -// @public -export interface ClusterInstanceViewProperties { - serviceStatuses: ServiceStatus[]; - status: ClusterInstanceViewPropertiesStatus; -} - -// @public -export interface ClusterInstanceViewPropertiesStatus extends ClusterInstanceViewStatus { -} - -// @public -export interface ClusterInstanceViewResult { - name: string; - properties: ClusterInstanceViewResultProperties; -} - -// @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 { - filter?: string; -} - -// @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 ClusterLibraries { - beginManageLibraries(resourceGroupName: string, clusterPoolName: string, clusterName: string, operation: ClusterLibraryManagementOperation, options?: ClusterLibrariesManageLibrariesOptionalParams): Promise, ClusterLibrariesManageLibrariesResponse>>; - beginManageLibrariesAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, operation: ClusterLibraryManagementOperation, options?: ClusterLibrariesManageLibrariesOptionalParams): Promise; - list(resourceGroupName: string, clusterPoolName: string, clusterName: string, category: Category, options?: ClusterLibrariesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ClusterLibrariesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterLibrariesListNextResponse = ClusterLibraryList; - -// @public -export interface ClusterLibrariesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterLibrariesListResponse = ClusterLibraryList; - -// @public -export interface ClusterLibrariesManageLibrariesHeaders { - location?: string; -} - -// @public -export interface ClusterLibrariesManageLibrariesOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClusterLibrariesManageLibrariesResponse = ClusterLibrariesManageLibrariesHeaders; - -// @public -export interface ClusterLibrary extends ProxyResource { - properties: ClusterLibraryPropertiesUnion; -} - -// @public -export interface ClusterLibraryList { - readonly nextLink?: string; - value: ClusterLibrary[]; -} - -// @public -export interface ClusterLibraryManagementOperation extends ProxyResource { - properties: ClusterLibraryManagementOperationProperties; -} - -// @public -export interface ClusterLibraryManagementOperationProperties { - action: LibraryManagementAction; - libraries: ClusterLibrary[]; -} - -// @public -export interface ClusterLibraryProperties { - readonly message?: string; - remarks?: string; - readonly status?: Status; - readonly timestamp?: Date; - type: "pypi" | "maven"; -} - -// @public (undocumented) -export type ClusterLibraryPropertiesUnion = ClusterLibraryProperties | PyPiLibraryProperties | MavenLibraryProperties; - -// @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 { - properties?: ClusterPatchProperties; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface ClusterPatchProperties { - clusterProfile?: UpdatableClusterProfile; -} - -// @public -export interface ClusterPatchVersionUpgradeHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties { - upgradeType: "PatchVersionUpgrade"; -} - -// @public -export interface ClusterPatchVersionUpgradeProperties extends ClusterInPlaceUpgradeProperties { - upgradeType: "PatchVersionUpgrade"; -} - -// @public -export interface ClusterPatchVersionUpgradeRollbackHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties { - upgradeType: "PatchVersionUpgradeRollback"; -} - -// @public -export interface ClusterPool extends TrackedResource { - properties?: ClusterPoolResourceProperties; -} - -// @public -export interface ClusterPoolAksPatchUpgradeHistoryProperties extends ClusterPoolUpgradeHistoryProperties { - newVersion?: string; - originalVersion?: string; - upgradeAllClusterNodes?: boolean; - upgradeClusterPool?: boolean; - upgradeType: "AKSPatchUpgrade"; -} - -// @public -export interface ClusterPoolAKSPatchVersionUpgradeProperties extends ClusterPoolUpgradeProperties { - targetAksVersion?: string; - upgradeAllClusterNodes?: boolean; - upgradeClusterPool?: boolean; - upgradeType: "AKSPatchUpgrade"; -} - -// @public -export interface ClusterPoolAvailableUpgrade extends ProxyResource { - properties?: ClusterPoolAvailableUpgradePropertiesUnion; -} - -// @public -export interface ClusterPoolAvailableUpgradeAksPatchUpgradeProperties extends ClusterPoolAvailableUpgradeProperties { - currentVersion?: string; - currentVersionStatus?: CurrentClusterPoolAksVersionStatus; - latestVersion?: string; - upgradeType: "AKSPatchUpgrade"; -} - -// @public -export interface ClusterPoolAvailableUpgradeList { - nextLink?: string; - value: ClusterPoolAvailableUpgrade[]; -} - -// @public -export interface ClusterPoolAvailableUpgradeNodeOsUpgradeProperties extends ClusterPoolAvailableUpgradeProperties { - latestVersion?: string; - upgradeType: "NodeOsUpgrade"; -} - -// @public -export interface ClusterPoolAvailableUpgradeProperties { - upgradeType: "AKSPatchUpgrade" | "NodeOsUpgrade"; -} - -// @public (undocumented) -export type ClusterPoolAvailableUpgradePropertiesUnion = ClusterPoolAvailableUpgradeProperties | ClusterPoolAvailableUpgradeAksPatchUpgradeProperties | ClusterPoolAvailableUpgradeNodeOsUpgradeProperties; - -// @public -export interface ClusterPoolAvailableUpgrades { - list(resourceGroupName: string, clusterPoolName: string, options?: ClusterPoolAvailableUpgradesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ClusterPoolAvailableUpgradesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterPoolAvailableUpgradesListNextResponse = ClusterPoolAvailableUpgradeList; - -// @public -export interface ClusterPoolAvailableUpgradesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterPoolAvailableUpgradesListResponse = ClusterPoolAvailableUpgradeList; - -// @public -export type ClusterPoolAvailableUpgradeType = string; - -// @public -export interface ClusterPoolComputeProfile { - availabilityZones?: string[]; - readonly 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 { - apiServerAuthorizedIpRanges?: string[]; - enablePrivateApiServer?: boolean; - outboundType?: OutboundType; - subnetId: string; -} - -// @public -export interface ClusterPoolNodeOsImageUpdateProperties extends ClusterPoolUpgradeProperties { - upgradeType: "NodeOsUpgrade"; -} - -// @public -export interface ClusterPoolNodeOsUpgradeHistoryProperties extends ClusterPoolUpgradeHistoryProperties { - newNodeOs?: string; - upgradeType: "NodeOsUpgrade"; -} - -// @public -export interface ClusterPoolProfile { - clusterPoolVersion: string; - publicIpTag?: IpTag; -} - -// @public -export interface ClusterPoolResourceProperties { - 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 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; - beginUpgrade(resourceGroupName: string, clusterPoolName: string, clusterPoolUpgradeRequest: ClusterPoolUpgrade, options?: ClusterPoolsUpgradeOptionalParams): Promise, ClusterPoolsUpgradeResponse>>; - beginUpgradeAndWait(resourceGroupName: string, clusterPoolName: string, clusterPoolUpgradeRequest: ClusterPoolUpgrade, options?: ClusterPoolsUpgradeOptionalParams): 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 ClusterPoolsUpgradeHeaders { - location?: string; -} - -// @public -export interface ClusterPoolsUpgradeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClusterPoolsUpgradeResponse = ClusterPool; - -// @public -export interface ClusterPoolUpgrade { - properties: ClusterPoolUpgradePropertiesUnion; -} - -// @public -export interface ClusterPoolUpgradeHistories { - list(resourceGroupName: string, clusterPoolName: string, options?: ClusterPoolUpgradeHistoriesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ClusterPoolUpgradeHistoriesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterPoolUpgradeHistoriesListNextResponse = ClusterPoolUpgradeHistoryListResult; - -// @public -export interface ClusterPoolUpgradeHistoriesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterPoolUpgradeHistoriesListResponse = ClusterPoolUpgradeHistoryListResult; - -// @public -export interface ClusterPoolUpgradeHistory extends ProxyResource { - properties: ClusterPoolUpgradeHistoryPropertiesUnion; -} - -// @public -export interface ClusterPoolUpgradeHistoryListResult { - readonly nextLink?: string; - value: ClusterPoolUpgradeHistory[]; -} - -// @public -export interface ClusterPoolUpgradeHistoryProperties { - upgradeResult: ClusterPoolUpgradeHistoryUpgradeResultType; - upgradeType: "NodeOsUpgrade" | "AKSPatchUpgrade"; - utcTime: string; -} - -// @public (undocumented) -export type ClusterPoolUpgradeHistoryPropertiesUnion = ClusterPoolUpgradeHistoryProperties | ClusterPoolNodeOsUpgradeHistoryProperties | ClusterPoolAksPatchUpgradeHistoryProperties; - -// @public -export type ClusterPoolUpgradeHistoryType = string; - -// @public -export type ClusterPoolUpgradeHistoryUpgradeResultType = string; - -// @public -export interface ClusterPoolUpgradeProperties { - upgradeType: "AKSPatchUpgrade" | "NodeOsUpgrade"; -} - -// @public (undocumented) -export type ClusterPoolUpgradePropertiesUnion = ClusterPoolUpgradeProperties | ClusterPoolAKSPatchVersionUpgradeProperties | ClusterPoolNodeOsImageUpdateProperties; - -// @public -export type ClusterPoolUpgradeType = string; - -// @public -export interface ClusterPoolVersion extends ProxyResource { - properties?: ClusterPoolVersionProperties; -} - -// @public -export interface ClusterPoolVersionProperties { - aksVersion?: string; - clusterPoolVersion?: string; - isPreview?: boolean; -} - -// @public -export interface ClusterPoolVersionsListResult { - readonly nextLink?: string; - value?: ClusterPoolVersion[]; -} - -// @public -export interface ClusterProfile { - authorizationProfile: AuthorizationProfile; - autoscaleProfile?: AutoscaleProfile; - clusterAccessProfile?: ClusterAccessProfile; - clusterVersion: string; - readonly components?: ClusterComponentsItem[]; - readonly connectivityProfile?: ConnectivityProfile; - flinkProfile?: FlinkProfile; - identityProfile?: IdentityProfile; - kafkaProfile?: KafkaProfile; - llapProfile?: { - [propertyName: string]: any; - }; - logAnalyticsProfile?: ClusterLogAnalyticsProfile; - managedIdentityProfile?: ManagedIdentityProfile; - ossVersion: string; - prometheusProfile?: ClusterPrometheusProfile; - rangerPluginProfile?: ClusterRangerPluginProfile; - rangerProfile?: RangerProfile; - 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 ClusterRangerPluginProfile { - enabled: boolean; -} - -// @public -export interface ClusterResizeData extends TrackedResource { - properties?: ClusterResizeProperties; -} - -// @public -export interface ClusterResizeProperties { - targetWorkerNodeCount: number; -} - -// @public -export interface ClusterResourceProperties { - clusterProfile: ClusterProfile; - clusterType: string; - computeProfile: ComputeProfile; - readonly deploymentId?: string; - readonly provisioningState?: ProvisioningStatus; - readonly status?: string; -} - -// @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; - beginUpgrade(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterUpgradeRequest: ClusterUpgrade, options?: ClustersUpgradeOptionalParams): Promise, ClustersUpgradeResponse>>; - beginUpgradeAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterUpgradeRequest: ClusterUpgrade, options?: ClustersUpgradeOptionalParams): Promise; - beginUpgradeManualRollback(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterRollbackUpgradeRequest: ClusterUpgradeRollback, options?: ClustersUpgradeManualRollbackOptionalParams): Promise, ClustersUpgradeManualRollbackResponse>>; - beginUpgradeManualRollbackAndWait(resourceGroupName: string, clusterPoolName: string, clusterName: string, clusterRollbackUpgradeRequest: ClusterUpgradeRollback, options?: ClustersUpgradeManualRollbackOptionalParams): 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 ClustersUpgradeHeaders { - location?: string; -} - -// @public -export interface ClustersUpgradeManualRollbackHeaders { - location?: string; -} - -// @public -export interface ClustersUpgradeManualRollbackOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClustersUpgradeManualRollbackResponse = Cluster; - -// @public -export interface ClustersUpgradeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClustersUpgradeResponse = Cluster; - -// @public -export interface ClusterUpgrade { - properties: ClusterUpgradePropertiesUnion; -} - -// @public -export interface ClusterUpgradeHistories { - list(resourceGroupName: string, clusterPoolName: string, clusterName: string, options?: ClusterUpgradeHistoriesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ClusterUpgradeHistoriesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterUpgradeHistoriesListNextResponse = ClusterUpgradeHistoryListResult; - -// @public -export interface ClusterUpgradeHistoriesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClusterUpgradeHistoriesListResponse = ClusterUpgradeHistoryListResult; - -// @public -export interface ClusterUpgradeHistory extends ProxyResource { - properties: ClusterUpgradeHistoryPropertiesUnion; -} - -// @public -export interface ClusterUpgradeHistoryListResult { - readonly nextLink?: string; - value: ClusterUpgradeHistory[]; -} - -// @public -export interface ClusterUpgradeHistoryProperties { - upgradeResult: ClusterUpgradeHistoryUpgradeResultType; - upgradeType: "ClusterInPlaceUpgradeHistoryProperties" | "HotfixUpgrade" | "HotfixUpgradeRollback" | "PatchVersionUpgrade" | "PatchVersionUpgradeRollback" | "AKSPatchUpgrade"; - utcTime: string; -} - -// @public (undocumented) -export type ClusterUpgradeHistoryPropertiesUnion = ClusterUpgradeHistoryProperties | ClusterInPlaceUpgradeHistoryPropertiesUnion | ClusterAksPatchUpgradeHistoryProperties; - -// @public -export type ClusterUpgradeHistorySeverityType = string; - -// @public -export type ClusterUpgradeHistoryType = string; - -// @public -export type ClusterUpgradeHistoryUpgradeResultType = string; - -// @public -export interface ClusterUpgradeProperties { - upgradeType: "AKSPatchUpgrade" | "ClusterInPlaceUpgradeProperties" | "HotfixUpgrade" | "PatchVersionUpgrade"; -} - -// @public (undocumented) -export type ClusterUpgradePropertiesUnion = ClusterUpgradeProperties | ClusterAKSPatchVersionUpgradeProperties | ClusterInPlaceUpgradePropertiesUnion; - -// @public -export interface ClusterUpgradeRollback { - properties: ClusterUpgradeRollbackProperties; -} - -// @public -export interface ClusterUpgradeRollbackProperties { - upgradeHistory: string; -} - -// @public -export type ClusterUpgradeType = string; - -// @public -export interface ClusterVersion extends ProxyResource { - properties?: ClusterVersionProperties; -} - -// @public -export interface ClusterVersionProperties { - 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 { - availabilityZones?: string[]; - 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 type CurrentClusterAksVersionStatus = string; - -// @public -export type CurrentClusterPoolAksVersionStatus = string; - -// @public -export type DataDiskType = string; - -// @public -export type DbConnectionAuthenticationMode = string; - -// @public -export type DeploymentMode = string; - -// @public -export interface DiskStorageProfile { - dataDiskSize: number; - dataDiskType: DataDiskType; -} - -// @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 { - metastoreDbConnectionAuthenticationMode?: MetastoreDbConnectionAuthenticationMode; - metastoreDbConnectionPasswordSecret?: string; - metastoreDbConnectionURL: string; - metastoreDbConnectionUserName?: string; -} - -// @public -export interface FlinkJobProfile { - args?: string; - entryClass?: string; - jarName: string; - jobJarDirectory: string; - savePointName?: string; - upgradeMode: UpgradeMode; -} - -// @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; - runId?: string; - savePointName?: string; - readonly status?: string; -} - -// @public -export interface FlinkProfile { - catalogOptions?: FlinkCatalogOptions; - deploymentMode?: DeploymentMode; - historyServer?: ComputeResourceDefinition; - jobManager: ComputeResourceDefinition; - jobSpec?: FlinkJobProfile; - 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 HDInsightContainersManagementClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: HDInsightContainersManagementClientOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - availableClusterPoolVersions: AvailableClusterPoolVersions; - // (undocumented) - availableClusterVersions: AvailableClusterVersions; - // (undocumented) - clusterAvailableUpgrades: ClusterAvailableUpgrades; - // (undocumented) - clusterJobs: ClusterJobs; - // (undocumented) - clusterLibraries: ClusterLibraries; - // (undocumented) - clusterPoolAvailableUpgrades: ClusterPoolAvailableUpgrades; - // (undocumented) - clusterPools: ClusterPools; - // (undocumented) - clusterPoolUpgradeHistories: ClusterPoolUpgradeHistories; - // (undocumented) - clusters: Clusters; - // (undocumented) - clusterUpgradeHistories: ClusterUpgradeHistories; - // (undocumented) - locations: Locations; - // (undocumented) - operations: Operations; - // (undocumented) - subscriptionId: string; -} - -// @public -export interface HDInsightContainersManagementClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; -} - -// @public -export interface HiveCatalogOption { - catalogName: string; - metastoreDbConnectionAuthenticationMode?: MetastoreDbConnectionAuthenticationMode; - metastoreDbConnectionPasswordSecret?: string; - metastoreDbConnectionURL: string; - metastoreDbConnectionUserName?: string; - metastoreWarehouseDir: string; -} - -// @public -export interface IdentityProfile { - msiClientId: string; - msiObjectId: string; - msiResourceId: string; -} - -// @public -export interface IpTag { - ipTagType: string; - tag: string; -} - -// @public -export type JobType = string; - -// @public -export interface KafkaConnectivityEndpoints { - bootstrapServerEndpoint?: string; - brokerEndpoints?: string[]; -} - -// @public -export interface KafkaProfile { - readonly connectivityEndpoints?: KafkaConnectivityEndpoints; - diskStorage: DiskStorageProfile; - enableKRaft?: boolean; - enablePublicEndpoints?: boolean; - remoteStorageUri?: string; -} - -// @public -export type KeyVaultObjectType = string; - -// @public -export enum KnownAction { - Cancel = "CANCEL", - Delete = "DELETE", - LastStateUpdate = "LAST_STATE_UPDATE", - ListSavepoint = "LIST_SAVEPOINT", - NEW = "NEW", - RELaunch = "RE_LAUNCH", - 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 KnownCategory { - Custom = "custom", - Predefined = "predefined" -} - -// @public -export enum KnownClusterAvailableUpgradeType { - AKSPatchUpgrade = "AKSPatchUpgrade", - HotfixUpgrade = "HotfixUpgrade", - PatchVersionUpgrade = "PatchVersionUpgrade" -} - -// @public -export enum KnownClusterPoolAvailableUpgradeType { - AKSPatchUpgrade = "AKSPatchUpgrade", - NodeOsUpgrade = "NodeOsUpgrade" -} - -// @public -export enum KnownClusterPoolUpgradeHistoryType { - AKSPatchUpgrade = "AKSPatchUpgrade", - NodeOsUpgrade = "NodeOsUpgrade" -} - -// @public -export enum KnownClusterPoolUpgradeHistoryUpgradeResultType { - Failed = "Failed", - Succeed = "Succeed" -} - -// @public -export enum KnownClusterPoolUpgradeType { - AKSPatchUpgrade = "AKSPatchUpgrade", - NodeOsUpgrade = "NodeOsUpgrade" -} - -// @public -export enum KnownClusterUpgradeHistorySeverityType { - Critical = "critical", - High = "high", - Low = "low", - Medium = "medium" -} - -// @public -export enum KnownClusterUpgradeHistoryType { - AKSPatchUpgrade = "AKSPatchUpgrade", - HotfixUpgrade = "HotfixUpgrade", - HotfixUpgradeRollback = "HotfixUpgradeRollback", - PatchVersionUpgrade = "PatchVersionUpgrade", - PatchVersionUpgradeRollback = "PatchVersionUpgradeRollback" -} - -// @public -export enum KnownClusterUpgradeHistoryUpgradeResultType { - Failed = "Failed", - Succeed = "Succeed" -} - -// @public -export enum KnownClusterUpgradeType { - AKSPatchUpgrade = "AKSPatchUpgrade", - HotfixUpgrade = "HotfixUpgrade", - PatchVersionUpgrade = "PatchVersionUpgrade" -} - -// @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 KnownCurrentClusterAksVersionStatus { - Deprecated = "Deprecated", - Supported = "Supported" -} - -// @public -export enum KnownCurrentClusterPoolAksVersionStatus { - Deprecated = "Deprecated", - Supported = "Supported" -} - -// @public -export enum KnownDataDiskType { - PremiumSSDLRS = "Premium_SSD_LRS", - PremiumSSDV2LRS = "Premium_SSD_v2_LRS", - PremiumSSDZRS = "Premium_SSD_ZRS", - StandardHDDLRS = "Standard_HDD_LRS", - StandardSSDLRS = "Standard_SSD_LRS", - StandardSSDZRS = "Standard_SSD_ZRS" -} - -// @public -export enum KnownDbConnectionAuthenticationMode { - IdentityAuth = "IdentityAuth", - SqlAuth = "SqlAuth" -} - -// @public -export enum KnownDeploymentMode { - Application = "Application", - Session = "Session" -} - -// @public -export enum KnownJobType { - FlinkJob = "FlinkJob" -} - -// @public -export enum KnownKeyVaultObjectType { - Certificate = "Certificate", - Key = "Key", - Secret = "Secret" -} - -// @public -export enum KnownLibraryManagementAction { - Install = "Install", - Uninstall = "Uninstall" -} - -// @public -export enum KnownManagedIdentityType { - Cluster = "cluster", - Internal = "internal", - User = "user" -} - -// @public -export enum KnownMetastoreDbConnectionAuthenticationMode { - IdentityAuth = "IdentityAuth", - SqlAuth = "SqlAuth" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @public -export enum KnownOutboundType { - LoadBalancer = "loadBalancer", - UserDefinedRouting = "userDefinedRouting" -} - -// @public -export enum KnownProvisioningStatus { - Accepted = "Accepted", - Canceled = "Canceled", - Failed = "Failed", - Succeeded = "Succeeded" -} - -// @public -export enum KnownRangerUsersyncMode { - Automatic = "automatic", - Static = "static" -} - -// @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 enum KnownSeverity { - Critical = "critical", - High = "high", - Low = "low", - Medium = "medium" -} - -// @public -export enum KnownStatus { - Installed = "INSTALLED", - InstallFailed = "INSTALL_FAILED", - Installing = "INSTALLING", - UninstallFailed = "UNINSTALL_FAILED", - Uninstalling = "UNINSTALLING" -} - -// @public -export enum KnownType { - Maven = "maven", - Pypi = "pypi" -} - -// @public -export enum KnownUpgradeMode { - LastStateUpdate = "LAST_STATE_UPDATE", - StatelessUpdate = "STATELESS_UPDATE", - Update = "UPDATE" -} - -// @public -export type LibraryManagementAction = string; - -// @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 ManagedIdentityProfile { - identityList: ManagedIdentitySpec[]; -} - -// @public -export interface ManagedIdentitySpec { - clientId: string; - objectId: string; - resourceId: string; - type: ManagedIdentityType; -} - -// @public -export type ManagedIdentityType = string; - -// @public -export interface MavenLibraryProperties extends ClusterLibraryProperties { - groupId: string; - name: string; - type: "maven"; - version?: string; -} - -// @public -export type MetastoreDbConnectionAuthenticationMode = string; - -// @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 OutboundType = string; - -// @public -export type ProvisioningStatus = string; - -// @public -export interface ProxyResource extends Resource { -} - -// @public -export interface PyPiLibraryProperties extends ClusterLibraryProperties { - name: string; - type: "pypi"; - version?: string; -} - -// @public -export interface RangerAdminSpec { - admins: string[]; - // (undocumented) - database: RangerAdminSpecDatabase; -} - -// @public (undocumented) -export interface RangerAdminSpecDatabase { - host: string; - name: string; - passwordSecretRef?: string; - username?: string; -} - -// @public -export interface RangerAuditSpec { - storageAccount?: string; -} - -// @public -export interface RangerProfile { - rangerAdmin: RangerAdminSpec; - rangerAudit?: RangerAuditSpec; - rangerUsersync: RangerUsersyncSpec; -} - -// @public -export type RangerUsersyncMode = string; - -// @public -export interface RangerUsersyncSpec { - enabled?: boolean; - groups?: string[]; - mode?: RangerUsersyncMode; - userMappingLocation?: string; - users?: string[]; -} - -// @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 { - properties?: ServiceConfigResultProperties; -} - -// @public -export interface ServiceConfigResultProperties extends ServiceConfigListResultProperties { -} - -// @public -export interface ServiceStatus { - kind: string; - message?: string; - ready: string; -} - -// @public -export type Severity = string; - -// @public -export interface SparkMetastoreSpec { - dbConnectionAuthenticationMode?: DbConnectionAuthenticationMode; - 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; - privateSshEndpoint?: string; -} - -// @public -export interface SshProfile { - count: number; - readonly podPrefix?: string; - vmSize?: string; -} - -// @public -export type Status = 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 { - debug?: TrinoDebugConfig; - highAvailabilityEnabled?: boolean; -} - -// @public -export interface TrinoDebugConfig { - enable?: 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 { - debug?: TrinoDebugConfig; -} - -// @public -export type Type = string; - -// @public -export interface UpdatableClusterProfile { - authorizationProfile?: AuthorizationProfile; - autoscaleProfile?: AutoscaleProfile; - logAnalyticsProfile?: ClusterLogAnalyticsProfile; - prometheusProfile?: ClusterPrometheusProfile; - rangerPluginProfile?: ClusterRangerPluginProfile; - rangerProfile?: RangerProfile; - scriptActionProfiles?: ScriptActionProfile[]; - secretsProfile?: SecretsProfile; - serviceConfigsProfiles?: ClusterServiceConfigsProfile[]; - sshProfile?: SshProfile; - trinoProfile?: TrinoProfile; -} - -// @public -export type UpgradeMode = string; - -// @public -export interface WebConnectivityEndpoint { - fqdn: string; - privateFqdn?: string; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/hdinsight/arm-hdinsightcontainers/sample.env b/sdk/hdinsight/arm-hdinsightcontainers/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# 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-hdinsightcontainers/samples-dev/availableClusterPoolVersionsListByLocationSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/availableClusterPoolVersionsListByLocationSample.ts deleted file mode 100644 index 7e3e6da57b88..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/availableClusterPoolVersionsListByLocationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Returns a list of available cluster pool versions. - * - * @summary Returns a list of available cluster pool versions. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterPoolVersions.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolVersionListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "westus2"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableClusterPoolVersions.listByLocation(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await clusterPoolVersionListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/availableClusterVersionsListByLocationSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/availableClusterVersionsListByLocationSample.ts deleted file mode 100644 index 9c3b655ac824..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/availableClusterVersionsListByLocationSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Returns a list of available cluster versions. - * - * @summary Returns a list of available cluster versions. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterVersions.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterVersionListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "westus2"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.availableClusterVersions.listByLocation(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await clusterVersionListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterAvailableUpgradesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterAvailableUpgradesListSample.ts deleted file mode 100644 index ee0753c41d22..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterAvailableUpgradesListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to List a cluster available upgrade. - * - * @summary List a cluster available upgrade. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterAvailableUpgrades.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function getClusterAvailableUpgrade(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterAvailableUpgrades.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getClusterAvailableUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterJobsListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterJobsListSample.ts deleted file mode 100644 index 5f6f6f07bf8d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterJobsListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Get jobs of HDInsight on AKS cluster. - * - * @summary Get jobs of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterJobs.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function listClusterJobs(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterJobs.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listClusterJobs(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterJobsRunJobSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterJobsRunJobSample.ts deleted file mode 100644 index 6be33b8ea2f7..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterJobsRunJobSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Operations on jobs of HDInsight on AKS cluster. - * - * @summary Operations on jobs of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/RunClusterJob.json - */ - -import type { ClusterJob } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function runClusterJob(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterJob: ClusterJob = { - properties: { - action: "START", - entryClass: "com.microsoft.hilo.flink.job.streaming.SleepJob", - flinkConfiguration: { - parallelism: "1", - savepointDirectory: "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint", - }, - jarName: "flink-sleep-job-0.0.1-SNAPSHOT.jar", - jobJarDirectory: "abfs://flinkjob@hilosa.dfs.core.windows.net/jars", - jobName: "flink-job-name", - jobType: "FlinkJob", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterJobs.beginRunJobAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterJob, - ); - console.log(result); -} - -async function main(): Promise { - await runClusterJob(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterLibrariesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterLibrariesListSample.ts deleted file mode 100644 index ae6f0cc8845c..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterLibrariesListSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Get all libraries of HDInsight on AKS cluster. - * - * @summary Get all libraries of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListPredefinedClusterLibraries.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function listPredefinedClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const category = "predefined"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterLibraries.list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Get all libraries of HDInsight on AKS cluster. - * - * @summary Get all libraries of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListUserCustomClusterLibraries.json - */ -async function listUserCustomClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const category = "custom"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterLibraries.list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listPredefinedClusterLibraries(); - await listUserCustomClusterLibraries(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterLibrariesManageLibrariesSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterLibrariesManageLibrariesSample.ts deleted file mode 100644 index f2c45d97960d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterLibrariesManageLibrariesSample.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Library management operations on HDInsight on AKS cluster. - * - * @summary Library management operations on HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/InstallNewClusterLibraries.json - */ - -import type { ClusterLibraryManagementOperation } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function installNewClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const operation: ClusterLibraryManagementOperation = { - properties: { - action: "Install", - libraries: [ - { - properties: { - name: "requests", - type: "pypi", - remarks: "PyPi packages.", - version: "2.31.0", - }, - }, - { - properties: { - name: "flink-connector-kafka", - type: "maven", - groupId: "org.apache.flink", - remarks: "Maven packages.", - version: "3.0.2-1.18", - }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterLibraries.beginManageLibrariesAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Library management operations on HDInsight on AKS cluster. - * - * @summary Library management operations on HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UninstallExistingClusterLibraries.json - */ -async function uninstallExistingClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const operation: ClusterLibraryManagementOperation = { - properties: { - action: "Uninstall", - libraries: [ - { properties: { name: "tensorflow", type: "pypi" } }, - { - properties: { - name: "flink-connector-hudi", - type: "maven", - groupId: "org.apache.flink", - }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterLibraries.beginManageLibrariesAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - ); - console.log(result); -} - -async function main(): Promise { - await installNewClusterLibraries(); - await uninstallExistingClusterLibraries(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolAvailableUpgradesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolAvailableUpgradesListSample.ts deleted file mode 100644 index b12b71171c5f..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolAvailableUpgradesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to List a cluster pool available upgrade. - * - * @summary List a cluster pool available upgrade. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolAvailableUpgrades.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function getClusterPoolAvailableUpgrade(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterPoolAvailableUpgrades.list( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getClusterPoolAvailableUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolUpgradeHistoriesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolUpgradeHistoriesListSample.ts deleted file mode 100644 index 41ae0f0853b6..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolUpgradeHistoriesListSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Returns a list of upgrade history. - * - * @summary Returns a list of upgrade history. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolUpgradeHistory.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolUpgradeHistoriesListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterPoolUpgradeHistories.list( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await clusterPoolUpgradeHistoriesListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsCreateOrUpdateSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsCreateOrUpdateSample.ts deleted file mode 100644 index 494883240ce3..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPool.json - */ - -import type { ClusterPool } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool: ClusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPoolWithPrivateAks.json - */ -async function clusterPoolPutWithPrivateAks(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool: ClusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - networkProfile: { - enablePrivateApiServer: true, - subnetId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPoolWithUDRAks.json - */ -async function clusterPoolPutWithUdrAks(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool: ClusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - networkProfile: { - outboundType: "userDefinedRouting", - subnetId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -async function main(): Promise { - await clusterPoolPut(); - await clusterPoolPutWithPrivateAks(); - await clusterPoolPutWithUdrAks(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsDeleteSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsDeleteSample.ts deleted file mode 100644 index a2be6ad92562..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsDeleteSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Deletes a Cluster Pool. - * - * @summary Deletes a Cluster Pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteClusterPool.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolDelete(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginDeleteAndWait(resourceGroupName, clusterPoolName); - console.log(result); -} - -async function main(): Promise { - await clusterPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsGetSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsGetSample.ts deleted file mode 100644 index 420a0533d47b..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsGetSample.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets a cluster pool. - * - * @summary Gets a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterPool.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolGet(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.get(resourceGroupName, clusterPoolName); - console.log(result); -} - -async function main(): Promise { - await clusterPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsListByResourceGroupSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsListByResourceGroupSample.ts deleted file mode 100644 index 45f174c79613..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsListByResourceGroupSample.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Lists the HDInsight cluster pools under a resource group. - * - * @summary Lists the HDInsight cluster pools under a resource group. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPools.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolsListByResourceGroup(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterPools.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await clusterPoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsListBySubscriptionSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsListBySubscriptionSample.ts deleted file mode 100644 index 4fc3ed2821cc..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets the list of Cluster Pools within a Subscription. - * - * @summary Gets the list of Cluster Pools within a Subscription. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolsSubscription.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolsListBySubscription(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterPools.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await clusterPoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsUpdateTagsSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsUpdateTagsSample.ts deleted file mode 100644 index 79b6c2cd15fe..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsUpdateTagsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Updates an existing Cluster Pool Tags. - * - * @summary Updates an existing Cluster Pool Tags. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchClusterPool.json - */ - -import type { TagsObject } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolsPatchTags(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolTags: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginUpdateTagsAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolTags, - ); - console.log(result); -} - -async function main(): Promise { - await clusterPoolsPatchTags(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsUpgradeSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsUpgradeSample.ts deleted file mode 100644 index b8739daa3196..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterPoolsUpgradeSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Upgrade a cluster pool. - * - * @summary Upgrade a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForClusterPool.json - */ - -import type { ClusterPoolUpgrade } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterPoolsUpgradeAksPatchVersion(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolUpgradeRequest: ClusterPoolUpgrade = { - properties: { - upgradeAllClusterNodes: false, - upgradeClusterPool: true, - upgradeType: "AKSPatchUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Upgrade a cluster pool. - * - * @summary Upgrade a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeNodeOsForClusterPool.json - */ -async function clusterPoolsUpgradeNodeOS(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolUpgradeRequest: ClusterPoolUpgrade = { - properties: { upgradeType: "NodeOsUpgrade" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - ); - console.log(result); -} - -async function main(): Promise { - await clusterPoolsUpgradeAksPatchVersion(); - await clusterPoolsUpgradeNodeOS(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterUpgradeHistoriesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterUpgradeHistoriesListSample.ts deleted file mode 100644 index 5e85324f5b21..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clusterUpgradeHistoriesListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Returns a list of upgrade history. - * - * @summary Returns a list of upgrade history. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterUpgradeHistory.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterUpgradeHistoriesListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusterUpgradeHistories.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await clusterUpgradeHistoriesListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersCreateSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersCreateSample.ts deleted file mode 100644 index 4fb819a5b963..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersCreateSample.ts +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateAutoscaleCluster.json - */ - -import type { Cluster } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClusterPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - autoscaleProfile: { - autoscaleType: "ScheduleBased", - enabled: true, - gracefulDecommissionTimeout: 3600, - loadBasedConfig: { - cooldownPeriod: 300, - maxNodes: 20, - minNodes: 10, - pollInterval: 60, - scalingRules: [ - { - actionType: "scaleup", - comparisonRule: { operator: "greaterThan", threshold: 90 }, - evaluationCount: 3, - scalingMetric: "cpu", - }, - { - actionType: "scaledown", - comparisonRule: { operator: "lessThan", threshold: 20 }, - evaluationCount: 3, - scalingMetric: "cpu", - }, - ], - }, - scheduleBasedConfig: { - defaultCount: 10, - schedules: [ - { - count: 20, - days: ["Monday"], - endTime: "12:00", - startTime: "00:00", - }, - { - count: 25, - days: ["Sunday"], - endTime: "12:00", - startTime: "00:00", - }, - ], - timeZone: "Cen. Australia Standard Time", - }, - }, - clusterVersion: "1.0.6", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "0.410.0", - sshProfile: { count: 2, vmSize: "Standard_E8as_v5" }, - trinoProfile: {}, - }, - clusterType: "Trino", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [ - { type: "Head", count: 2, vmSize: "Standard_E8as_v5" }, - { type: "Worker", count: 3, vmSize: "Standard_E8as_v5" }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateRangerCluster.json - */ -async function hdInsightRangerClusterPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - rangerProfile: { - rangerAdmin: { - admins: ["testuser1@contoso.com", "testuser2@contoso.com"], - database: { - name: "testdb", - host: "testsqlserver.database.windows.net", - passwordSecretRef: - "https://testkv.vault.azure.net/secrets/mysecret/5df6584d9c25418c8d900240aa6c3452", - username: "admin", - }, - }, - rangerAudit: { - storageAccount: "https://teststorage.blob.core.windows.net/testblob", - }, - rangerUsersync: { - enabled: true, - groups: [ - "0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac", - ], - mode: "automatic", - users: ["testuser1@contoso.com", "testuser2@contoso.com"], - }, - }, - }, - clusterType: "ranger", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "head", count: 2, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateSparkCluster.json - */ -async function hdInsightSparkClusterPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - serviceConfigsProfiles: [ - { - configs: [ - { - component: "spark-config", - files: [ - { - fileName: "spark-defaults.conf", - values: { sparkEventLogEnabled: "true" }, - }, - ], - }, - ], - serviceName: "spark-service", - }, - { - configs: [ - { - component: "yarn-config", - files: [ - { - fileName: "core-site.xml", - values: { - fsDefaultFS: "wasb://testcontainer@teststorage.dfs.core.windows.net/", - storageContainer: "testcontainer", - storageKey: "test key", - storageName: "teststorage", - storageProtocol: "wasb", - }, - }, - { - fileName: "yarn-site.xml", - values: { yarnWebappUi2Enable: "false" }, - }, - ], - }, - ], - serviceName: "yarn-service", - }, - ], - sparkProfile: {}, - sshProfile: { count: 2, vmSize: "Standard_D3_v2" }, - }, - clusterType: "spark", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "worker", count: 4, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateSparkClusterWithInternalIngress.json - */ -async function hdInsightSparkClusterPutWithInternalIngress(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterAccessProfile: { enableInternalIngress: true }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - serviceConfigsProfiles: [ - { - configs: [ - { - component: "spark-config", - files: [ - { - fileName: "spark-defaults.conf", - values: { sparkEventLogEnabled: "true" }, - }, - ], - }, - ], - serviceName: "spark-service", - }, - { - configs: [ - { - component: "yarn-config", - files: [ - { - fileName: "core-site.xml", - values: { - fsDefaultFS: "wasb://testcontainer@teststorage.dfs.core.windows.net/", - storageContainer: "testcontainer", - storageKey: "test key", - storageName: "teststorage", - storageProtocol: "wasb", - }, - }, - { - fileName: "yarn-site.xml", - values: { yarnWebappUi2Enable: "false" }, - }, - ], - }, - ], - serviceName: "yarn-service", - }, - ], - sparkProfile: {}, - sshProfile: { count: 2, vmSize: "Standard_D3_v2" }, - }, - clusterType: "spark", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "worker", count: 4, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -async function main(): Promise { - await hdInsightClusterPut(); - await hdInsightRangerClusterPut(); - await hdInsightSparkClusterPut(); - await hdInsightSparkClusterPutWithInternalIngress(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersDeleteSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersDeleteSample.ts deleted file mode 100644 index 70e7647aca39..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersDeleteSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Deletes a cluster. - * - * @summary Deletes a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteCluster.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClustersDelete(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - await hdInsightClustersDelete(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersGetInstanceViewSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersGetInstanceViewSample.ts deleted file mode 100644 index 56aba9e05c21..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersGetInstanceViewSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets the status of a cluster instance. - * - * @summary Gets the status of a cluster instance. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterInstanceView.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClusterGetInstanceView(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.getInstanceView( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - await hdInsightClusterGetInstanceView(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersGetSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersGetSample.ts deleted file mode 100644 index faad4f8d03da..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersGetSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets a HDInsight cluster. - * - * @summary Gets a HDInsight cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetCluster.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClusterGet(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterPoolName, clusterName); - console.log(result); -} - -async function main(): Promise { - await hdInsightClusterGet(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListByClusterPoolNameSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListByClusterPoolNameSample.ts deleted file mode 100644 index d08ec3f810c5..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListByClusterPoolNameSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Lists the HDInsight cluster pools under a resource group. - * - * @summary Lists the HDInsight cluster pools under a resource group. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClustersByClusterPoolName.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClustersListByClusterPoolName(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusters.listByClusterPoolName( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await hdInsightClustersListByClusterPoolName(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListInstanceViewsSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListInstanceViewsSample.ts deleted file mode 100644 index 9c8cd12e9758..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListInstanceViewsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Lists the lists of instance views - * - * @summary Lists the lists of instance views - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterInstanceViews.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClusterGetInstanceViews(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusters.listInstanceViews( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await hdInsightClusterGetInstanceViews(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListServiceConfigsSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListServiceConfigsSample.ts deleted file mode 100644 index dde151aa911c..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersListServiceConfigsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Lists the config dump of all services running in cluster. - * - * @summary Lists the config dump of all services running in cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterServiceConfigs.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClusterGetServiceConfigs(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.clusters.listServiceConfigs( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await hdInsightClusterGetServiceConfigs(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersResizeSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersResizeSample.ts deleted file mode 100644 index a8fc6427e1a7..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersResizeSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Resize an existing Cluster. - * - * @summary Resize an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ResizeCluster.json - */ - -import type { ClusterResizeData } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClusterResize(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterResizeRequest: ClusterResizeData = { - location: "West US 2", - properties: { targetWorkerNodeCount: 5 }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginResizeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterResizeRequest, - ); - console.log(result); -} - -async function main(): Promise { - await hdInsightClusterResize(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpdateSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpdateSample.ts deleted file mode 100644 index d36ada2d21cc..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpdateSample.ts +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Updates an existing Cluster. - * - * @summary Updates an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchCluster.json - */ - -import type { ClusterPatch } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function hdInsightClustersPatchTags(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterPatchRequest: ClusterPatch = { - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["Testuser1", "Testuser2"] }, - autoscaleProfile: { - autoscaleType: "ScheduleBased", - enabled: true, - gracefulDecommissionTimeout: -1, - scheduleBasedConfig: { - defaultCount: 3, - schedules: [ - { - count: 3, - days: ["Monday, Tuesday, Wednesday"], - endTime: "12:00", - startTime: "00:00", - }, - { - count: 3, - days: ["Sunday"], - endTime: "12:00", - startTime: "00:00", - }, - ], - timeZone: "Cen. Australia Standard Time", - }, - }, - logAnalyticsProfile: { - applicationLogs: { stdErrorEnabled: true, stdOutEnabled: true }, - enabled: true, - metricsEnabled: true, - }, - serviceConfigsProfiles: [ - { - configs: [ - { - component: "TestComp1", - files: [ - { - fileName: "TestFile1", - values: { testConfig1: "1", testConfig2: "2" }, - }, - { - fileName: "TestFile2", - values: { testConfig3: "3", testConfig4: "4" }, - }, - ], - }, - { - component: "TestComp2", - files: [ - { - path: "TestPath", - content: "TestContent", - fileName: "TestFile3", - }, - { - fileName: "TestFile4", - values: { testConfig7: "7", testConfig8: "8" }, - }, - ], - }, - ], - serviceName: "TestService1", - }, - { - configs: [ - { - component: "TestComp3", - files: [{ fileName: "TestFile5", values: { testConfig9: "9" } }], - }, - ], - serviceName: "TestService2", - }, - ], - sshProfile: { count: 2 }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterPatchRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing Cluster. - * - * @summary Updates an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchRangerCluster.json - */ -async function hdInsightRangerClusterPatchTags(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterPatchRequest: ClusterPatch = { - properties: { - clusterProfile: { - rangerProfile: { - rangerAdmin: { - admins: ["testuser1@contoso.com", "testuser2@contoso.com"], - database: { - name: "testdb", - host: "testsqlserver.database.windows.net", - passwordSecretRef: - "https://testkv.vault.azure.net/secrets/mysecret/5df6584d9c25418c8d900240aa6c3452", - username: "admin", - }, - }, - rangerAudit: { - storageAccount: "https://teststorage.blob.core.windows.net/testblob", - }, - rangerUsersync: { - enabled: true, - groups: [ - "0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac", - ], - mode: "automatic", - users: ["testuser1@contoso.com", "testuser2@contoso.com"], - }, - }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterPatchRequest, - ); - console.log(result); -} - -async function main(): Promise { - await hdInsightClustersPatchTags(); - await hdInsightRangerClusterPatchTags(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpgradeManualRollbackSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpgradeManualRollbackSample.ts deleted file mode 100644 index 0f3417f399cf..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpgradeManualRollbackSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Manual rollback upgrade for a cluster. - * - * @summary Manual rollback upgrade for a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ClusterUpgradeRollback.json - */ - -import type { ClusterUpgradeRollback } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clusterUpgradeRollback(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterRollbackUpgradeRequest: ClusterUpgradeRollback = { - properties: { - upgradeHistory: - "/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/upgradeHistories/01_11_2024_02_35_03_AM-HotfixUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpgradeManualRollbackAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterRollbackUpgradeRequest, - ); - console.log(result); -} - -async function main(): Promise { - await clusterUpgradeRollback(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpgradeSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpgradeSample.ts deleted file mode 100644 index 6be11abda485..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/clustersUpgradeSample.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Upgrade a cluster. - * - * @summary Upgrade a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForCluster.json - */ - -import type { ClusterUpgrade } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function clustersUpgradeAksPatchVersion(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterUpgradeRequest: ClusterUpgrade = { - properties: { upgradeType: "AKSPatchUpgrade" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Upgrade a cluster. - * - * @summary Upgrade a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeHotfixForCluster.json - */ -async function clustersUpgradeHotfix(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterUpgradeRequest: ClusterUpgrade = { - properties: { - componentName: "historyserver", - targetBuildNumber: "3", - targetClusterVersion: "1.0.6", - targetOssVersion: "1.16.0", - upgradeType: "HotfixUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - ); - console.log(result); -} - -async function main(): Promise { - await clustersUpgradeAksPatchVersion(); - await clustersUpgradeHotfix(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/locationsCheckNameAvailabilitySample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/locationsCheckNameAvailabilitySample.ts deleted file mode 100644 index 5eea54f9d97d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/locationsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Check the availability of the resource name. - * - * @summary Check the availability of the resource name. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/LocationsNameAvailability.json - */ - -import type { NameAvailabilityParameters } from "@azure/arm-hdinsightcontainers"; -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function locationsNameAvailability(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "southeastasia"; - const nameAvailabilityParameters: NameAvailabilityParameters = { - name: "contosemember1", - type: "Microsoft.HDInsight/clusterPools/clusters", - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.locations.checkNameAvailability(location, nameAvailabilityParameters); - console.log(result); -} - -async function main(): Promise { - await locationsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/operationsListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/operationsListSample.ts deleted file mode 100644 index 5ab2265978fa..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Returns list of operations. - * - * @summary Returns list of operations. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetOperations.json - */ - -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function listOperations(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listOperations(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/README.md b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/README.md deleted file mode 100644 index b430221b9418..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availableClusterPoolVersionsListByLocationSample.js][availableclusterpoolversionslistbylocationsample] | Returns a list of available cluster pool versions. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterPoolVersions.json | -| [availableClusterVersionsListByLocationSample.js][availableclusterversionslistbylocationsample] | Returns a list of available cluster versions. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterVersions.json | -| [clusterAvailableUpgradesListSample.js][clusteravailableupgradeslistsample] | List a cluster available upgrade. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterAvailableUpgrades.json | -| [clusterJobsListSample.js][clusterjobslistsample] | Get jobs of HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterJobs.json | -| [clusterJobsRunJobSample.js][clusterjobsrunjobsample] | Operations on jobs of HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/RunClusterJob.json | -| [clusterLibrariesListSample.js][clusterlibrarieslistsample] | Get all libraries of HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListPredefinedClusterLibraries.json | -| [clusterLibrariesManageLibrariesSample.js][clusterlibrariesmanagelibrariessample] | Library management operations on HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/InstallNewClusterLibraries.json | -| [clusterPoolAvailableUpgradesListSample.js][clusterpoolavailableupgradeslistsample] | List a cluster pool available upgrade. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolAvailableUpgrades.json | -| [clusterPoolUpgradeHistoriesListSample.js][clusterpoolupgradehistorieslistsample] | Returns a list of upgrade history. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolUpgradeHistory.json | -| [clusterPoolsCreateOrUpdateSample.js][clusterpoolscreateorupdatesample] | Creates or updates a cluster pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPool.json | -| [clusterPoolsDeleteSample.js][clusterpoolsdeletesample] | Deletes a Cluster Pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteClusterPool.json | -| [clusterPoolsGetSample.js][clusterpoolsgetsample] | Gets a cluster pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterPool.json | -| [clusterPoolsListByResourceGroupSample.js][clusterpoolslistbyresourcegroupsample] | Lists the HDInsight cluster pools under a resource group. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPools.json | -| [clusterPoolsListBySubscriptionSample.js][clusterpoolslistbysubscriptionsample] | Gets the list of Cluster Pools within a Subscription. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolsSubscription.json | -| [clusterPoolsUpdateTagsSample.js][clusterpoolsupdatetagssample] | Updates an existing Cluster Pool Tags. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchClusterPool.json | -| [clusterPoolsUpgradeSample.js][clusterpoolsupgradesample] | Upgrade a cluster pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForClusterPool.json | -| [clusterUpgradeHistoriesListSample.js][clusterupgradehistorieslistsample] | Returns a list of upgrade history. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterUpgradeHistory.json | -| [clustersCreateSample.js][clusterscreatesample] | Creates a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateAutoscaleCluster.json | -| [clustersDeleteSample.js][clustersdeletesample] | Deletes a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteCluster.json | -| [clustersGetInstanceViewSample.js][clustersgetinstanceviewsample] | Gets the status of a cluster instance. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterInstanceView.json | -| [clustersGetSample.js][clustersgetsample] | Gets a HDInsight cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetCluster.json | -| [clustersListByClusterPoolNameSample.js][clusterslistbyclusterpoolnamesample] | Lists the HDInsight cluster pools under a resource group. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClustersByClusterPoolName.json | -| [clustersListInstanceViewsSample.js][clusterslistinstanceviewssample] | Lists the lists of instance views x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterInstanceViews.json | -| [clustersListServiceConfigsSample.js][clusterslistserviceconfigssample] | Lists the config dump of all services running in cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterServiceConfigs.json | -| [clustersResizeSample.js][clustersresizesample] | Resize an existing Cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ResizeCluster.json | -| [clustersUpdateSample.js][clustersupdatesample] | Updates an existing Cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchCluster.json | -| [clustersUpgradeManualRollbackSample.js][clustersupgrademanualrollbacksample] | Manual rollback upgrade for a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ClusterUpgradeRollback.json | -| [clustersUpgradeSample.js][clustersupgradesample] | Upgrade a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForCluster.json | -| [locationsCheckNameAvailabilitySample.js][locationschecknameavailabilitysample] | Check the availability of the resource name. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/LocationsNameAvailability.json | -| [operationsListSample.js][operationslistsample] | Returns list of operations. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetOperations.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node availableClusterPoolVersionsListByLocationSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env HDINSIGHT_SUBSCRIPTION_ID="" node availableClusterPoolVersionsListByLocationSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableclusterpoolversionslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterPoolVersionsListByLocationSample.js -[availableclusterversionslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterVersionsListByLocationSample.js -[clusteravailableupgradeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterAvailableUpgradesListSample.js -[clusterjobslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsListSample.js -[clusterjobsrunjobsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsRunJobSample.js -[clusterlibrarieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesListSample.js -[clusterlibrariesmanagelibrariessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesManageLibrariesSample.js -[clusterpoolavailableupgradeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolAvailableUpgradesListSample.js -[clusterpoolupgradehistorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolUpgradeHistoriesListSample.js -[clusterpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsCreateOrUpdateSample.js -[clusterpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsDeleteSample.js -[clusterpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsGetSample.js -[clusterpoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListByResourceGroupSample.js -[clusterpoolslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListBySubscriptionSample.js -[clusterpoolsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpdateTagsSample.js -[clusterpoolsupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpgradeSample.js -[clusterupgradehistorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterUpgradeHistoriesListSample.js -[clusterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersCreateSample.js -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersDeleteSample.js -[clustersgetinstanceviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetInstanceViewSample.js -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetSample.js -[clusterslistbyclusterpoolnamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListByClusterPoolNameSample.js -[clusterslistinstanceviewssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListInstanceViewsSample.js -[clusterslistserviceconfigssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListServiceConfigsSample.js -[clustersresizesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersResizeSample.js -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpdateSample.js -[clustersupgrademanualrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeManualRollbackSample.js -[clustersupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeSample.js -[locationschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/locationsCheckNameAvailabilitySample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/operationsListSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-hdinsightcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightcontainers/README.md diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterPoolVersionsListByLocationSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterPoolVersionsListByLocationSample.js deleted file mode 100644 index 72b28361a8b0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterPoolVersionsListByLocationSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a list of available cluster pool versions. - * - * @summary Returns a list of available cluster pool versions. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterPoolVersions.json - */ -async function clusterPoolVersionListResult() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "westus2"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableClusterPoolVersions.listByLocation(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clusterPoolVersionListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterVersionsListByLocationSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterVersionsListByLocationSample.js deleted file mode 100644 index 61ea7046a1a3..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/availableClusterVersionsListByLocationSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a list of available cluster versions. - * - * @summary Returns a list of available cluster versions. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterVersions.json - */ -async function clusterVersionListResult() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "westus2"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableClusterVersions.listByLocation(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clusterVersionListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterAvailableUpgradesListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterAvailableUpgradesListSample.js deleted file mode 100644 index bba3ab5dee79..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterAvailableUpgradesListSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List a cluster available upgrade. - * - * @summary List a cluster available upgrade. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterAvailableUpgrades.json - */ -async function getClusterAvailableUpgrade() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterAvailableUpgrades.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getClusterAvailableUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsListSample.js deleted file mode 100644 index 0efbaad0ae06..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get jobs of HDInsight on AKS cluster. - * - * @summary Get jobs of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterJobs.json - */ -async function listClusterJobs() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterJobs.list(resourceGroupName, clusterPoolName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterJobs(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsRunJobSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsRunJobSample.js deleted file mode 100644 index 99129f1aa381..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterJobsRunJobSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Operations on jobs of HDInsight on AKS cluster. - * - * @summary Operations on jobs of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/RunClusterJob.json - */ -async function runClusterJob() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterJob = { - properties: { - action: "START", - entryClass: "com.microsoft.hilo.flink.job.streaming.SleepJob", - flinkConfiguration: { - parallelism: "1", - savepointDirectory: "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint", - }, - jarName: "flink-sleep-job-0.0.1-SNAPSHOT.jar", - jobJarDirectory: "abfs://flinkjob@hilosa.dfs.core.windows.net/jars", - jobName: "flink-job-name", - jobType: "FlinkJob", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterJobs.beginRunJobAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterJob, - ); - console.log(result); -} - -async function main() { - runClusterJob(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesListSample.js deleted file mode 100644 index f90ad95a16fb..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesListSample.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all libraries of HDInsight on AKS cluster. - * - * @summary Get all libraries of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListPredefinedClusterLibraries.json - */ -async function listPredefinedClusterLibraries() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const category = "predefined"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterLibraries.list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Get all libraries of HDInsight on AKS cluster. - * - * @summary Get all libraries of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListUserCustomClusterLibraries.json - */ -async function listUserCustomClusterLibraries() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const category = "custom"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterLibraries.list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listPredefinedClusterLibraries(); - listUserCustomClusterLibraries(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesManageLibrariesSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesManageLibrariesSample.js deleted file mode 100644 index c09227475d97..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterLibrariesManageLibrariesSample.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Library management operations on HDInsight on AKS cluster. - * - * @summary Library management operations on HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/InstallNewClusterLibraries.json - */ -async function installNewClusterLibraries() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const operation = { - properties: { - action: "Install", - libraries: [ - { - properties: { - name: "requests", - type: "pypi", - remarks: "PyPi packages.", - version: "2.31.0", - }, - }, - { - properties: { - name: "flink-connector-kafka", - type: "maven", - groupId: "org.apache.flink", - remarks: "Maven packages.", - version: "3.0.2-1.18", - }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterLibraries.beginManageLibrariesAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Library management operations on HDInsight on AKS cluster. - * - * @summary Library management operations on HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UninstallExistingClusterLibraries.json - */ -async function uninstallExistingClusterLibraries() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const operation = { - properties: { - action: "Uninstall", - libraries: [ - { properties: { name: "tensorflow", type: "pypi" } }, - { - properties: { - name: "flink-connector-hudi", - type: "maven", - groupId: "org.apache.flink", - }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterLibraries.beginManageLibrariesAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - ); - console.log(result); -} - -async function main() { - installNewClusterLibraries(); - uninstallExistingClusterLibraries(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolAvailableUpgradesListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolAvailableUpgradesListSample.js deleted file mode 100644 index c41c2c85d9e0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolAvailableUpgradesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List a cluster pool available upgrade. - * - * @summary List a cluster pool available upgrade. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolAvailableUpgrades.json - */ -async function getClusterPoolAvailableUpgrade() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterPoolAvailableUpgrades.list( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getClusterPoolAvailableUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolUpgradeHistoriesListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolUpgradeHistoriesListSample.js deleted file mode 100644 index 39b05ab65f01..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolUpgradeHistoriesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a list of upgrade history. - * - * @summary Returns a list of upgrade history. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolUpgradeHistory.json - */ -async function clusterPoolUpgradeHistoriesListResult() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterPoolUpgradeHistories.list( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clusterPoolUpgradeHistoriesListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsCreateOrUpdateSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsCreateOrUpdateSample.js deleted file mode 100644 index cc26ff6e4785..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsCreateOrUpdateSample.js +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPool.json - */ -async function clusterPoolPut() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPoolWithPrivateAks.json - */ -async function clusterPoolPutWithPrivateAks() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - networkProfile: { - enablePrivateApiServer: true, - subnetId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPoolWithUDRAks.json - */ -async function clusterPoolPutWithUdrAks() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - networkProfile: { - outboundType: "userDefinedRouting", - subnetId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -async function main() { - clusterPoolPut(); - clusterPoolPutWithPrivateAks(); - clusterPoolPutWithUdrAks(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsDeleteSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsDeleteSample.js deleted file mode 100644 index 3abe095710dc..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a Cluster Pool. - * - * @summary Deletes a Cluster Pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteClusterPool.json - */ -async function clusterPoolDelete() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginDeleteAndWait(resourceGroupName, clusterPoolName); - console.log(result); -} - -async function main() { - clusterPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsGetSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsGetSample.js deleted file mode 100644 index fd5c574658f4..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a cluster pool. - * - * @summary Gets a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterPool.json - */ -async function clusterPoolGet() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.get(resourceGroupName, clusterPoolName); - console.log(result); -} - -async function main() { - clusterPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListByResourceGroupSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListByResourceGroupSample.js deleted file mode 100644 index f0b7d7b8cb9c..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the HDInsight cluster pools under a resource group. - * - * @summary Lists the HDInsight cluster pools under a resource group. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPools.json - */ -async function clusterPoolsListByResourceGroup() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterPools.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clusterPoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListBySubscriptionSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListBySubscriptionSample.js deleted file mode 100644 index 457a2d59c377..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the list of Cluster Pools within a Subscription. - * - * @summary Gets the list of Cluster Pools within a Subscription. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolsSubscription.json - */ -async function clusterPoolsListBySubscription() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterPools.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clusterPoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpdateTagsSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpdateTagsSample.js deleted file mode 100644 index c2113614e612..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpdateTagsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing Cluster Pool Tags. - * - * @summary Updates an existing Cluster Pool Tags. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchClusterPool.json - */ -async function clusterPoolsPatchTags() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolTags = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginUpdateTagsAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolTags, - ); - console.log(result); -} - -async function main() { - clusterPoolsPatchTags(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpgradeSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpgradeSample.js deleted file mode 100644 index 4acbb73e5d31..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterPoolsUpgradeSample.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Upgrade a cluster pool. - * - * @summary Upgrade a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForClusterPool.json - */ -async function clusterPoolsUpgradeAksPatchVersion() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolUpgradeRequest = { - properties: { - upgradeAllClusterNodes: false, - upgradeClusterPool: true, - upgradeType: "AKSPatchUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Upgrade a cluster pool. - * - * @summary Upgrade a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeNodeOsForClusterPool.json - */ -async function clusterPoolsUpgradeNodeOS() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolUpgradeRequest = { - properties: { upgradeType: "NodeOsUpgrade" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusterPools.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - ); - console.log(result); -} - -async function main() { - clusterPoolsUpgradeAksPatchVersion(); - clusterPoolsUpgradeNodeOS(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterUpgradeHistoriesListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterUpgradeHistoriesListSample.js deleted file mode 100644 index 4adfba3094bd..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clusterUpgradeHistoriesListSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a list of upgrade history. - * - * @summary Returns a list of upgrade history. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterUpgradeHistory.json - */ -async function clusterUpgradeHistoriesListResult() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusterUpgradeHistories.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - clusterUpgradeHistoriesListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersCreateSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersCreateSample.js deleted file mode 100644 index 059e6509babc..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersCreateSample.js +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateAutoscaleCluster.json - */ -async function hdInsightClusterPut() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - autoscaleProfile: { - autoscaleType: "ScheduleBased", - enabled: true, - gracefulDecommissionTimeout: 3600, - loadBasedConfig: { - cooldownPeriod: 300, - maxNodes: 20, - minNodes: 10, - pollInterval: 60, - scalingRules: [ - { - actionType: "scaleup", - comparisonRule: { operator: "greaterThan", threshold: 90 }, - evaluationCount: 3, - scalingMetric: "cpu", - }, - { - actionType: "scaledown", - comparisonRule: { operator: "lessThan", threshold: 20 }, - evaluationCount: 3, - scalingMetric: "cpu", - }, - ], - }, - scheduleBasedConfig: { - defaultCount: 10, - schedules: [ - { - count: 20, - days: ["Monday"], - endTime: "12:00", - startTime: "00:00", - }, - { - count: 25, - days: ["Sunday"], - endTime: "12:00", - startTime: "00:00", - }, - ], - timeZone: "Cen. Australia Standard Time", - }, - }, - clusterVersion: "1.0.6", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "0.410.0", - sshProfile: { count: 2, vmSize: "Standard_E8as_v5" }, - trinoProfile: {}, - }, - clusterType: "Trino", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [ - { type: "Head", count: 2, vmSize: "Standard_E8as_v5" }, - { type: "Worker", count: 3, vmSize: "Standard_E8as_v5" }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateRangerCluster.json - */ -async function hdInsightRangerClusterPut() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - rangerProfile: { - rangerAdmin: { - admins: ["testuser1@contoso.com", "testuser2@contoso.com"], - database: { - name: "testdb", - host: "testsqlserver.database.windows.net", - passwordSecretRef: - "https://testkv.vault.azure.net/secrets/mysecret/5df6584d9c25418c8d900240aa6c3452", - username: "admin", - }, - }, - rangerAudit: { - storageAccount: "https://teststorage.blob.core.windows.net/testblob", - }, - rangerUsersync: { - enabled: true, - groups: [ - "0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac", - ], - mode: "automatic", - users: ["testuser1@contoso.com", "testuser2@contoso.com"], - }, - }, - }, - clusterType: "ranger", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "head", count: 2, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateSparkCluster.json - */ -async function hdInsightSparkClusterPut() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - serviceConfigsProfiles: [ - { - configs: [ - { - component: "spark-config", - files: [ - { - fileName: "spark-defaults.conf", - values: { sparkEventLogEnabled: "true" }, - }, - ], - }, - ], - serviceName: "spark-service", - }, - { - configs: [ - { - component: "yarn-config", - files: [ - { - fileName: "core-site.xml", - values: { - fsDefaultFS: "wasb://testcontainer@teststorage.dfs.core.windows.net/", - storageContainer: "testcontainer", - storageKey: "test key", - storageName: "teststorage", - storageProtocol: "wasb", - }, - }, - { - fileName: "yarn-site.xml", - values: { yarnWebappUi2Enable: "false" }, - }, - ], - }, - ], - serviceName: "yarn-service", - }, - ], - sparkProfile: {}, - sshProfile: { count: 2, vmSize: "Standard_D3_v2" }, - }, - clusterType: "spark", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "worker", count: 4, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateSparkClusterWithInternalIngress.json - */ -async function hdInsightSparkClusterPutWithInternalIngress() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterAccessProfile: { enableInternalIngress: true }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - serviceConfigsProfiles: [ - { - configs: [ - { - component: "spark-config", - files: [ - { - fileName: "spark-defaults.conf", - values: { sparkEventLogEnabled: "true" }, - }, - ], - }, - ], - serviceName: "spark-service", - }, - { - configs: [ - { - component: "yarn-config", - files: [ - { - fileName: "core-site.xml", - values: { - fsDefaultFS: "wasb://testcontainer@teststorage.dfs.core.windows.net/", - storageContainer: "testcontainer", - storageKey: "test key", - storageName: "teststorage", - storageProtocol: "wasb", - }, - }, - { - fileName: "yarn-site.xml", - values: { yarnWebappUi2Enable: "false" }, - }, - ], - }, - ], - serviceName: "yarn-service", - }, - ], - sparkProfile: {}, - sshProfile: { count: 2, vmSize: "Standard_D3_v2" }, - }, - clusterType: "spark", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "worker", count: 4, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -async function main() { - hdInsightClusterPut(); - hdInsightRangerClusterPut(); - hdInsightSparkClusterPut(); - hdInsightSparkClusterPutWithInternalIngress(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersDeleteSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersDeleteSample.js deleted file mode 100644 index 622c436cfa93..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a cluster. - * - * @summary Deletes a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteCluster.json - */ -async function hdInsightClustersDelete() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main() { - hdInsightClustersDelete(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetInstanceViewSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetInstanceViewSample.js deleted file mode 100644 index 375dda404345..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetInstanceViewSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the status of a cluster instance. - * - * @summary Gets the status of a cluster instance. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterInstanceView.json - */ -async function hdInsightClusterGetInstanceView() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.getInstanceView( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main() { - hdInsightClusterGetInstanceView(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetSample.js deleted file mode 100644 index c38d08dee8c1..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a HDInsight cluster. - * - * @summary Gets a HDInsight cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetCluster.json - */ -async function hdInsightClusterGet() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.get(resourceGroupName, clusterPoolName, clusterName); - console.log(result); -} - -async function main() { - hdInsightClusterGet(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListByClusterPoolNameSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListByClusterPoolNameSample.js deleted file mode 100644 index 9abf9d40ced2..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListByClusterPoolNameSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the HDInsight cluster pools under a resource group. - * - * @summary Lists the HDInsight cluster pools under a resource group. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClustersByClusterPoolName.json - */ -async function hdInsightClustersListByClusterPoolName() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listByClusterPoolName( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hdInsightClustersListByClusterPoolName(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListInstanceViewsSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListInstanceViewsSample.js deleted file mode 100644 index 705fee2ff93d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListInstanceViewsSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the lists of instance views - * - * @summary Lists the lists of instance views - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterInstanceViews.json - */ -async function hdInsightClusterGetInstanceViews() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listInstanceViews( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hdInsightClusterGetInstanceViews(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListServiceConfigsSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListServiceConfigsSample.js deleted file mode 100644 index 19f38f04e8d9..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersListServiceConfigsSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the config dump of all services running in cluster. - * - * @summary Lists the config dump of all services running in cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterServiceConfigs.json - */ -async function hdInsightClusterGetServiceConfigs() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.clusters.listServiceConfigs( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - hdInsightClusterGetServiceConfigs(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersResizeSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersResizeSample.js deleted file mode 100644 index a3dbbaeb70df..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersResizeSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Resize an existing Cluster. - * - * @summary Resize an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ResizeCluster.json - */ -async function hdInsightClusterResize() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterResizeRequest = { - location: "West US 2", - properties: { targetWorkerNodeCount: 5 }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginResizeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterResizeRequest, - ); - console.log(result); -} - -async function main() { - hdInsightClusterResize(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpdateSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpdateSample.js deleted file mode 100644 index 79650280b16c..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpdateSample.js +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing Cluster. - * - * @summary Updates an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchCluster.json - */ -async function hdInsightClustersPatchTags() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterPatchRequest = { - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["Testuser1", "Testuser2"] }, - autoscaleProfile: { - autoscaleType: "ScheduleBased", - enabled: true, - gracefulDecommissionTimeout: -1, - scheduleBasedConfig: { - defaultCount: 3, - schedules: [ - { - count: 3, - days: ["Monday, Tuesday, Wednesday"], - endTime: "12:00", - startTime: "00:00", - }, - { - count: 3, - days: ["Sunday"], - endTime: "12:00", - startTime: "00:00", - }, - ], - timeZone: "Cen. Australia Standard Time", - }, - }, - logAnalyticsProfile: { - applicationLogs: { stdErrorEnabled: true, stdOutEnabled: true }, - enabled: true, - metricsEnabled: true, - }, - serviceConfigsProfiles: [ - { - configs: [ - { - component: "TestComp1", - files: [ - { - fileName: "TestFile1", - values: { testConfig1: "1", testConfig2: "2" }, - }, - { - fileName: "TestFile2", - values: { testConfig3: "3", testConfig4: "4" }, - }, - ], - }, - { - component: "TestComp2", - files: [ - { - path: "TestPath", - content: "TestContent", - fileName: "TestFile3", - }, - { - fileName: "TestFile4", - values: { testConfig7: "7", testConfig8: "8" }, - }, - ], - }, - ], - serviceName: "TestService1", - }, - { - configs: [ - { - component: "TestComp3", - files: [{ fileName: "TestFile5", values: { testConfig9: "9" } }], - }, - ], - serviceName: "TestService2", - }, - ], - sshProfile: { count: 2 }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterPatchRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing Cluster. - * - * @summary Updates an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchRangerCluster.json - */ -async function hdInsightRangerClusterPatchTags() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterPatchRequest = { - properties: { - clusterProfile: { - rangerProfile: { - rangerAdmin: { - admins: ["testuser1@contoso.com", "testuser2@contoso.com"], - database: { - name: "testdb", - host: "testsqlserver.database.windows.net", - passwordSecretRef: - "https://testkv.vault.azure.net/secrets/mysecret/5df6584d9c25418c8d900240aa6c3452", - username: "admin", - }, - }, - rangerAudit: { - storageAccount: "https://teststorage.blob.core.windows.net/testblob", - }, - rangerUsersync: { - enabled: true, - groups: [ - "0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac", - ], - mode: "automatic", - users: ["testuser1@contoso.com", "testuser2@contoso.com"], - }, - }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterPatchRequest, - ); - console.log(result); -} - -async function main() { - hdInsightClustersPatchTags(); - hdInsightRangerClusterPatchTags(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeManualRollbackSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeManualRollbackSample.js deleted file mode 100644 index 2db21b9a9241..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeManualRollbackSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Manual rollback upgrade for a cluster. - * - * @summary Manual rollback upgrade for a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ClusterUpgradeRollback.json - */ -async function clusterUpgradeRollback() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterRollbackUpgradeRequest = { - properties: { - upgradeHistory: - "/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/upgradeHistories/01_11_2024_02_35_03_AM-HotfixUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpgradeManualRollbackAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterRollbackUpgradeRequest, - ); - console.log(result); -} - -async function main() { - clusterUpgradeRollback(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeSample.js deleted file mode 100644 index 7a499332c657..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/clustersUpgradeSample.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Upgrade a cluster. - * - * @summary Upgrade a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForCluster.json - */ -async function clustersUpgradeAksPatchVersion() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterUpgradeRequest = { - properties: { upgradeType: "AKSPatchUpgrade" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Upgrade a cluster. - * - * @summary Upgrade a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeHotfixForCluster.json - */ -async function clustersUpgradeHotfix() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterUpgradeRequest = { - properties: { - componentName: "historyserver", - targetBuildNumber: "3", - targetClusterVersion: "1.0.6", - targetOssVersion: "1.16.0", - upgradeType: "HotfixUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.clusters.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - ); - console.log(result); -} - -async function main() { - clustersUpgradeAksPatchVersion(); - clustersUpgradeHotfix(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/locationsCheckNameAvailabilitySample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/locationsCheckNameAvailabilitySample.js deleted file mode 100644 index 1c6c8e9d0675..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/locationsCheckNameAvailabilitySample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Check the availability of the resource name. - * - * @summary Check the availability of the resource name. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/LocationsNameAvailability.json - */ -async function locationsNameAvailability() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "southeastasia"; - const nameAvailabilityParameters = { - name: "contosemember1", - type: "Microsoft.HDInsight/clusterPools/clusters", - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const result = await client.locations.checkNameAvailability(location, nameAvailabilityParameters); - console.log(result); -} - -async function main() { - locationsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/operationsListSample.js b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index c606e8479d35..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { HDInsightContainersManagementClient } = require("@azure/arm-hdinsightcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns list of operations. - * - * @summary Returns list of operations. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetOperations.json - */ -async function listOperations() { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listOperations(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/package.json b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/package.json deleted file mode 100644 index 8f8b52cda820..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-hdinsightcontainers-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=20.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/hdinsight/arm-hdinsightcontainers" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightcontainers", - "dependencies": { - "@azure/arm-hdinsightcontainers": "next", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - } -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/sample.env b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# 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-hdinsightcontainers/samples/v1-beta/typescript/README.md b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/README.md deleted file mode 100644 index c424e9990dab..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availableClusterPoolVersionsListByLocationSample.ts][availableclusterpoolversionslistbylocationsample] | Returns a list of available cluster pool versions. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterPoolVersions.json | -| [availableClusterVersionsListByLocationSample.ts][availableclusterversionslistbylocationsample] | Returns a list of available cluster versions. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterVersions.json | -| [clusterAvailableUpgradesListSample.ts][clusteravailableupgradeslistsample] | List a cluster available upgrade. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterAvailableUpgrades.json | -| [clusterJobsListSample.ts][clusterjobslistsample] | Get jobs of HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterJobs.json | -| [clusterJobsRunJobSample.ts][clusterjobsrunjobsample] | Operations on jobs of HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/RunClusterJob.json | -| [clusterLibrariesListSample.ts][clusterlibrarieslistsample] | Get all libraries of HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListPredefinedClusterLibraries.json | -| [clusterLibrariesManageLibrariesSample.ts][clusterlibrariesmanagelibrariessample] | Library management operations on HDInsight on AKS cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/InstallNewClusterLibraries.json | -| [clusterPoolAvailableUpgradesListSample.ts][clusterpoolavailableupgradeslistsample] | List a cluster pool available upgrade. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolAvailableUpgrades.json | -| [clusterPoolUpgradeHistoriesListSample.ts][clusterpoolupgradehistorieslistsample] | Returns a list of upgrade history. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolUpgradeHistory.json | -| [clusterPoolsCreateOrUpdateSample.ts][clusterpoolscreateorupdatesample] | Creates or updates a cluster pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPool.json | -| [clusterPoolsDeleteSample.ts][clusterpoolsdeletesample] | Deletes a Cluster Pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteClusterPool.json | -| [clusterPoolsGetSample.ts][clusterpoolsgetsample] | Gets a cluster pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterPool.json | -| [clusterPoolsListByResourceGroupSample.ts][clusterpoolslistbyresourcegroupsample] | Lists the HDInsight cluster pools under a resource group. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPools.json | -| [clusterPoolsListBySubscriptionSample.ts][clusterpoolslistbysubscriptionsample] | Gets the list of Cluster Pools within a Subscription. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolsSubscription.json | -| [clusterPoolsUpdateTagsSample.ts][clusterpoolsupdatetagssample] | Updates an existing Cluster Pool Tags. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchClusterPool.json | -| [clusterPoolsUpgradeSample.ts][clusterpoolsupgradesample] | Upgrade a cluster pool. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForClusterPool.json | -| [clusterUpgradeHistoriesListSample.ts][clusterupgradehistorieslistsample] | Returns a list of upgrade history. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterUpgradeHistory.json | -| [clustersCreateSample.ts][clusterscreatesample] | Creates a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateAutoscaleCluster.json | -| [clustersDeleteSample.ts][clustersdeletesample] | Deletes a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteCluster.json | -| [clustersGetInstanceViewSample.ts][clustersgetinstanceviewsample] | Gets the status of a cluster instance. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterInstanceView.json | -| [clustersGetSample.ts][clustersgetsample] | Gets a HDInsight cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetCluster.json | -| [clustersListByClusterPoolNameSample.ts][clusterslistbyclusterpoolnamesample] | Lists the HDInsight cluster pools under a resource group. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClustersByClusterPoolName.json | -| [clustersListInstanceViewsSample.ts][clusterslistinstanceviewssample] | Lists the lists of instance views x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterInstanceViews.json | -| [clustersListServiceConfigsSample.ts][clusterslistserviceconfigssample] | Lists the config dump of all services running in cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterServiceConfigs.json | -| [clustersResizeSample.ts][clustersresizesample] | Resize an existing Cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ResizeCluster.json | -| [clustersUpdateSample.ts][clustersupdatesample] | Updates an existing Cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchCluster.json | -| [clustersUpgradeManualRollbackSample.ts][clustersupgrademanualrollbacksample] | Manual rollback upgrade for a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ClusterUpgradeRollback.json | -| [clustersUpgradeSample.ts][clustersupgradesample] | Upgrade a cluster. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForCluster.json | -| [locationsCheckNameAvailabilitySample.ts][locationschecknameavailabilitysample] | Check the availability of the resource name. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/LocationsNameAvailability.json | -| [operationsListSample.ts][operationslistsample] | Returns list of operations. x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetOperations.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/availableClusterPoolVersionsListByLocationSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env HDINSIGHT_SUBSCRIPTION_ID="" node dist/availableClusterPoolVersionsListByLocationSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableclusterpoolversionslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterPoolVersionsListByLocationSample.ts -[availableclusterversionslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterVersionsListByLocationSample.ts -[clusteravailableupgradeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterAvailableUpgradesListSample.ts -[clusterjobslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsListSample.ts -[clusterjobsrunjobsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsRunJobSample.ts -[clusterlibrarieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesListSample.ts -[clusterlibrariesmanagelibrariessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesManageLibrariesSample.ts -[clusterpoolavailableupgradeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolAvailableUpgradesListSample.ts -[clusterpoolupgradehistorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolUpgradeHistoriesListSample.ts -[clusterpoolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsCreateOrUpdateSample.ts -[clusterpoolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsDeleteSample.ts -[clusterpoolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsGetSample.ts -[clusterpoolslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListByResourceGroupSample.ts -[clusterpoolslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListBySubscriptionSample.ts -[clusterpoolsupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpdateTagsSample.ts -[clusterpoolsupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpgradeSample.ts -[clusterupgradehistorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterUpgradeHistoriesListSample.ts -[clusterscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersCreateSample.ts -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersDeleteSample.ts -[clustersgetinstanceviewsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetInstanceViewSample.ts -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetSample.ts -[clusterslistbyclusterpoolnamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListByClusterPoolNameSample.ts -[clusterslistinstanceviewssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListInstanceViewsSample.ts -[clusterslistserviceconfigssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListServiceConfigsSample.ts -[clustersresizesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersResizeSample.ts -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpdateSample.ts -[clustersupgrademanualrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeManualRollbackSample.ts -[clustersupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeSample.ts -[locationschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/locationsCheckNameAvailabilitySample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/operationsListSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-hdinsightcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightcontainers/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json deleted file mode 100644 index 602231993012..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-hdinsightcontainers-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=20.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/hdinsight/arm-hdinsightcontainers" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/hdinsight/arm-hdinsightcontainers", - "dependencies": { - "@azure/arm-hdinsightcontainers": "next", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - }, - "devDependencies": { - "@types/node": "^20.0.0", - "typescript": "~5.8.2", - "rimraf": "latest" - } -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/sample.env b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# 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-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterPoolVersionsListByLocationSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterPoolVersionsListByLocationSample.ts deleted file mode 100644 index 99abfd8df8bf..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterPoolVersionsListByLocationSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns a list of available cluster pool versions. - * - * @summary Returns a list of available cluster pool versions. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterPoolVersions.json - */ -async function clusterPoolVersionListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "westus2"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.availableClusterPoolVersions.listByLocation( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - clusterPoolVersionListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterVersionsListByLocationSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterVersionsListByLocationSample.ts deleted file mode 100644 index 2ee195c9fe87..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/availableClusterVersionsListByLocationSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns a list of available cluster versions. - * - * @summary Returns a list of available cluster versions. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListAvailableClusterVersions.json - */ -async function clusterVersionListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "westus2"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.availableClusterVersions.listByLocation( - location, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - clusterVersionListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterAvailableUpgradesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterAvailableUpgradesListSample.ts deleted file mode 100644 index ba0a118b9e86..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterAvailableUpgradesListSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List a cluster available upgrade. - * - * @summary List a cluster available upgrade. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterAvailableUpgrades.json - */ -async function getClusterAvailableUpgrade(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterAvailableUpgrades.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - getClusterAvailableUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsListSample.ts deleted file mode 100644 index 6cbeed3c23fb..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsListSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get jobs of HDInsight on AKS cluster. - * - * @summary Get jobs of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterJobs.json - */ -async function listClusterJobs(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterJobs.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listClusterJobs(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsRunJobSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsRunJobSample.ts deleted file mode 100644 index ec26da216297..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterJobsRunJobSample.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterJob, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Operations on jobs of HDInsight on AKS cluster. - * - * @summary Operations on jobs of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/RunClusterJob.json - */ -async function runClusterJob(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterJob: ClusterJob = { - properties: { - action: "START", - entryClass: "com.microsoft.hilo.flink.job.streaming.SleepJob", - flinkConfiguration: { - parallelism: "1", - savepointDirectory: - "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint", - }, - jarName: "flink-sleep-job-0.0.1-SNAPSHOT.jar", - jobJarDirectory: "abfs://flinkjob@hilosa.dfs.core.windows.net/jars", - jobName: "flink-job-name", - jobType: "FlinkJob", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterJobs.beginRunJobAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterJob, - ); - console.log(result); -} - -async function main(): Promise { - runClusterJob(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesListSample.ts deleted file mode 100644 index a9cb02ceaaaf..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesListSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get all libraries of HDInsight on AKS cluster. - * - * @summary Get all libraries of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListPredefinedClusterLibraries.json - */ -async function listPredefinedClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const category = "predefined"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterLibraries.list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Get all libraries of HDInsight on AKS cluster. - * - * @summary Get all libraries of HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListUserCustomClusterLibraries.json - */ -async function listUserCustomClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const category = "custom"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterLibraries.list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listPredefinedClusterLibraries(); - listUserCustomClusterLibraries(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesManageLibrariesSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesManageLibrariesSample.ts deleted file mode 100644 index 9e16b7690094..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterLibrariesManageLibrariesSample.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterLibraryManagementOperation, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Library management operations on HDInsight on AKS cluster. - * - * @summary Library management operations on HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/InstallNewClusterLibraries.json - */ -async function installNewClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const operation: ClusterLibraryManagementOperation = { - properties: { - action: "Install", - libraries: [ - { - properties: { - name: "requests", - type: "pypi", - remarks: "PyPi packages.", - version: "2.31.0", - }, - }, - { - properties: { - name: "flink-connector-kafka", - type: "maven", - groupId: "org.apache.flink", - remarks: "Maven packages.", - version: "3.0.2-1.18", - }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterLibraries.beginManageLibrariesAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Library management operations on HDInsight on AKS cluster. - * - * @summary Library management operations on HDInsight on AKS cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UninstallExistingClusterLibraries.json - */ -async function uninstallExistingClusterLibraries(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourceGroup"; - const clusterPoolName = "clusterPool"; - const clusterName = "cluster"; - const operation: ClusterLibraryManagementOperation = { - properties: { - action: "Uninstall", - libraries: [ - { properties: { name: "tensorflow", type: "pypi" } }, - { - properties: { - name: "flink-connector-hudi", - type: "maven", - groupId: "org.apache.flink", - }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterLibraries.beginManageLibrariesAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - ); - console.log(result); -} - -async function main(): Promise { - installNewClusterLibraries(); - uninstallExistingClusterLibraries(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolAvailableUpgradesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolAvailableUpgradesListSample.ts deleted file mode 100644 index 9c2467dfc3b1..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolAvailableUpgradesListSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List a cluster pool available upgrade. - * - * @summary List a cluster pool available upgrade. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolAvailableUpgrades.json - */ -async function getClusterPoolAvailableUpgrade(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterPoolAvailableUpgrades.list( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - getClusterPoolAvailableUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolUpgradeHistoriesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolUpgradeHistoriesListSample.ts deleted file mode 100644 index 73652bd6f416..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolUpgradeHistoriesListSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns a list of upgrade history. - * - * @summary Returns a list of upgrade history. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolUpgradeHistory.json - */ -async function clusterPoolUpgradeHistoriesListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterPoolUpgradeHistories.list( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - clusterPoolUpgradeHistoriesListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsCreateOrUpdateSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsCreateOrUpdateSample.ts deleted file mode 100644 index 137f0fa5ff20..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsCreateOrUpdateSample.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterPool, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPool.json - */ -async function clusterPoolPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool: ClusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPoolWithPrivateAks.json - */ -async function clusterPoolPutWithPrivateAks(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool: ClusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - networkProfile: { - enablePrivateApiServer: true, - subnetId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a cluster pool. - * - * @summary Creates or updates a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateClusterPoolWithUDRAks.json - */ -async function clusterPoolPutWithUdrAks(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPool: ClusterPool = { - location: "West US 2", - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.2" }, - computeProfile: { - availabilityZones: ["1", "2", "3"], - vmSize: "Standard_D3_v2", - }, - networkProfile: { - outboundType: "userDefinedRouting", - subnetId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterPool, - ); - console.log(result); -} - -async function main(): Promise { - clusterPoolPut(); - clusterPoolPutWithPrivateAks(); - clusterPoolPutWithUdrAks(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsDeleteSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsDeleteSample.ts deleted file mode 100644 index d1addd9d7dfb..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a Cluster Pool. - * - * @summary Deletes a Cluster Pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteClusterPool.json - */ -async function clusterPoolDelete(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginDeleteAndWait( - resourceGroupName, - clusterPoolName, - ); - console.log(result); -} - -async function main(): Promise { - clusterPoolDelete(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsGetSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsGetSample.ts deleted file mode 100644 index e0bf7ad6c847..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a cluster pool. - * - * @summary Gets a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterPool.json - */ -async function clusterPoolGet(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.get( - resourceGroupName, - clusterPoolName, - ); - console.log(result); -} - -async function main(): Promise { - clusterPoolGet(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListByResourceGroupSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListByResourceGroupSample.ts deleted file mode 100644 index 44eb934da32a..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListByResourceGroupSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the HDInsight cluster pools under a resource group. - * - * @summary Lists the HDInsight cluster pools under a resource group. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPools.json - */ -async function clusterPoolsListByResourceGroup(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterPools.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - clusterPoolsListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListBySubscriptionSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListBySubscriptionSample.ts deleted file mode 100644 index ffdd578f37e4..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsListBySubscriptionSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of Cluster Pools within a Subscription. - * - * @summary Gets the list of Cluster Pools within a Subscription. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterPoolsSubscription.json - */ -async function clusterPoolsListBySubscription(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterPools.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - clusterPoolsListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpdateTagsSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpdateTagsSample.ts deleted file mode 100644 index 97151758b9f4..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpdateTagsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagsObject, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing Cluster Pool Tags. - * - * @summary Updates an existing Cluster Pool Tags. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchClusterPool.json - */ -async function clusterPoolsPatchTags(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolTags: TagsObject = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginUpdateTagsAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolTags, - ); - console.log(result); -} - -async function main(): Promise { - clusterPoolsPatchTags(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpgradeSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpgradeSample.ts deleted file mode 100644 index 7402f0562c80..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterPoolsUpgradeSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterPoolUpgrade, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Upgrade a cluster pool. - * - * @summary Upgrade a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForClusterPool.json - */ -async function clusterPoolsUpgradeAksPatchVersion(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolUpgradeRequest: ClusterPoolUpgrade = { - properties: { - upgradeAllClusterNodes: false, - upgradeClusterPool: true, - upgradeType: "AKSPatchUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Upgrade a cluster pool. - * - * @summary Upgrade a cluster pool. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeNodeOsForClusterPool.json - */ -async function clusterPoolsUpgradeNodeOS(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterPoolUpgradeRequest: ClusterPoolUpgrade = { - properties: { upgradeType: "NodeOsUpgrade" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusterPools.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - ); - console.log(result); -} - -async function main(): Promise { - clusterPoolsUpgradeAksPatchVersion(); - clusterPoolsUpgradeNodeOS(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterUpgradeHistoriesListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterUpgradeHistoriesListSample.ts deleted file mode 100644 index e0cea18862d7..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clusterUpgradeHistoriesListSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns a list of upgrade history. - * - * @summary Returns a list of upgrade history. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterUpgradeHistory.json - */ -async function clusterUpgradeHistoriesListResult(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusterUpgradeHistories.list( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - clusterUpgradeHistoriesListResult(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersCreateSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersCreateSample.ts deleted file mode 100644 index ed893c106a6b..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersCreateSample.ts +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Cluster, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateAutoscaleCluster.json - */ -async function hdInsightClusterPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - autoscaleProfile: { - autoscaleType: "ScheduleBased", - enabled: true, - gracefulDecommissionTimeout: 3600, - loadBasedConfig: { - cooldownPeriod: 300, - maxNodes: 20, - minNodes: 10, - pollInterval: 60, - scalingRules: [ - { - actionType: "scaleup", - comparisonRule: { operator: "greaterThan", threshold: 90 }, - evaluationCount: 3, - scalingMetric: "cpu", - }, - { - actionType: "scaledown", - comparisonRule: { operator: "lessThan", threshold: 20 }, - evaluationCount: 3, - scalingMetric: "cpu", - }, - ], - }, - scheduleBasedConfig: { - defaultCount: 10, - schedules: [ - { - count: 20, - days: ["Monday"], - endTime: "12:00", - startTime: "00:00", - }, - { - count: 25, - days: ["Sunday"], - endTime: "12:00", - startTime: "00:00", - }, - ], - timeZone: "Cen. Australia Standard Time", - }, - }, - clusterVersion: "1.0.6", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "0.410.0", - sshProfile: { count: 2, vmSize: "Standard_E8as_v5" }, - trinoProfile: {}, - }, - clusterType: "Trino", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [ - { type: "Head", count: 2, vmSize: "Standard_E8as_v5" }, - { type: "Worker", count: 3, vmSize: "Standard_E8as_v5" }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateRangerCluster.json - */ -async function hdInsightRangerClusterPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - rangerProfile: { - rangerAdmin: { - admins: ["testuser1@contoso.com", "testuser2@contoso.com"], - database: { - name: "testdb", - host: "testsqlserver.database.windows.net", - passwordSecretRef: - "https://testkv.vault.azure.net/secrets/mysecret/5df6584d9c25418c8d900240aa6c3452", - username: "admin", - }, - }, - rangerAudit: { - storageAccount: - "https://teststorage.blob.core.windows.net/testblob", - }, - rangerUsersync: { - enabled: true, - groups: [ - "0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac", - ], - mode: "automatic", - users: ["testuser1@contoso.com", "testuser2@contoso.com"], - }, - }, - }, - clusterType: "ranger", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "head", count: 2, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateSparkCluster.json - */ -async function hdInsightSparkClusterPut(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - serviceConfigsProfiles: [ - { - configs: [ - { - component: "spark-config", - files: [ - { - fileName: "spark-defaults.conf", - values: { sparkEventLogEnabled: "true" }, - }, - ], - }, - ], - serviceName: "spark-service", - }, - { - configs: [ - { - component: "yarn-config", - files: [ - { - fileName: "core-site.xml", - values: { - fsDefaultFS: - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - storageContainer: "testcontainer", - storageKey: "test key", - storageName: "teststorage", - storageProtocol: "wasb", - }, - }, - { - fileName: "yarn-site.xml", - values: { yarnWebappUi2Enable: "false" }, - }, - ], - }, - ], - serviceName: "yarn-service", - }, - ], - sparkProfile: {}, - sshProfile: { count: 2, vmSize: "Standard_D3_v2" }, - }, - clusterType: "spark", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "worker", count: 4, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a cluster. - * - * @summary Creates a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/CreateSparkClusterWithInternalIngress.json - */ -async function hdInsightSparkClusterPutWithInternalIngress(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const hDInsightCluster: Cluster = { - location: "West US 2", - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["testuser1", "testuser2"] }, - clusterAccessProfile: { enableInternalIngress: true }, - clusterVersion: "0.0.1", - managedIdentityProfile: { - identityList: [ - { - type: "cluster", - clientId: "de91f1d8-767f-460a-ac11-3cf103f74b34", - objectId: "40491351-c240-4042-91e0-f644a1d2b441", - resourceId: - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi", - }, - ], - }, - ossVersion: "2.2.3", - serviceConfigsProfiles: [ - { - configs: [ - { - component: "spark-config", - files: [ - { - fileName: "spark-defaults.conf", - values: { sparkEventLogEnabled: "true" }, - }, - ], - }, - ], - serviceName: "spark-service", - }, - { - configs: [ - { - component: "yarn-config", - files: [ - { - fileName: "core-site.xml", - values: { - fsDefaultFS: - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - storageContainer: "testcontainer", - storageKey: "test key", - storageName: "teststorage", - storageProtocol: "wasb", - }, - }, - { - fileName: "yarn-site.xml", - values: { yarnWebappUi2Enable: "false" }, - }, - ], - }, - ], - serviceName: "yarn-service", - }, - ], - sparkProfile: {}, - sshProfile: { count: 2, vmSize: "Standard_D3_v2" }, - }, - clusterType: "spark", - computeProfile: { - availabilityZones: ["1", "2", "3"], - nodes: [{ type: "worker", count: 4, vmSize: "Standard_D3_v2" }], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginCreateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - hDInsightCluster, - ); - console.log(result); -} - -async function main(): Promise { - hdInsightClusterPut(); - hdInsightRangerClusterPut(); - hdInsightSparkClusterPut(); - hdInsightSparkClusterPutWithInternalIngress(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersDeleteSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersDeleteSample.ts deleted file mode 100644 index 0fd9bcf4d50f..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a cluster. - * - * @summary Deletes a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/DeleteCluster.json - */ -async function hdInsightClustersDelete(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginDeleteAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - hdInsightClustersDelete(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetInstanceViewSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetInstanceViewSample.ts deleted file mode 100644 index 14758726199a..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetInstanceViewSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the status of a cluster instance. - * - * @summary Gets the status of a cluster instance. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetClusterInstanceView.json - */ -async function hdInsightClusterGetInstanceView(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.getInstanceView( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - hdInsightClusterGetInstanceView(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetSample.ts deleted file mode 100644 index edb828aa10b4..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersGetSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a HDInsight cluster. - * - * @summary Gets a HDInsight cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetCluster.json - */ -async function hdInsightClusterGet(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.get( - resourceGroupName, - clusterPoolName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - hdInsightClusterGet(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListByClusterPoolNameSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListByClusterPoolNameSample.ts deleted file mode 100644 index b51b5977f2d9..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListByClusterPoolNameSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the HDInsight cluster pools under a resource group. - * - * @summary Lists the HDInsight cluster pools under a resource group. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClustersByClusterPoolName.json - */ -async function hdInsightClustersListByClusterPoolName(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusters.listByClusterPoolName( - resourceGroupName, - clusterPoolName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - hdInsightClustersListByClusterPoolName(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListInstanceViewsSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListInstanceViewsSample.ts deleted file mode 100644 index 05b0aff2f9d6..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListInstanceViewsSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the lists of instance views - * - * @summary Lists the lists of instance views - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterInstanceViews.json - */ -async function hdInsightClusterGetInstanceViews(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusters.listInstanceViews( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - hdInsightClusterGetInstanceViews(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListServiceConfigsSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListServiceConfigsSample.ts deleted file mode 100644 index c71d8e9aac6d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersListServiceConfigsSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the config dump of all services running in cluster. - * - * @summary Lists the config dump of all services running in cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ListClusterServiceConfigs.json - */ -async function hdInsightClusterGetServiceConfigs(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = process.env["HDINSIGHT_RESOURCE_GROUP"] || "rg1"; - const clusterPoolName = "clusterPool1"; - const clusterName = "cluster1"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.clusters.listServiceConfigs( - resourceGroupName, - clusterPoolName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - hdInsightClusterGetServiceConfigs(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersResizeSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersResizeSample.ts deleted file mode 100644 index 4c36d5946674..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersResizeSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterResizeData, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Resize an existing Cluster. - * - * @summary Resize an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ResizeCluster.json - */ -async function hdInsightClusterResize(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterResizeRequest: ClusterResizeData = { - location: "West US 2", - properties: { targetWorkerNodeCount: 5 }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginResizeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterResizeRequest, - ); - console.log(result); -} - -async function main(): Promise { - hdInsightClusterResize(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpdateSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpdateSample.ts deleted file mode 100644 index baebb82d2faf..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpdateSample.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterPatch, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing Cluster. - * - * @summary Updates an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchCluster.json - */ -async function hdInsightClustersPatchTags(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterPatchRequest: ClusterPatch = { - properties: { - clusterProfile: { - authorizationProfile: { userIds: ["Testuser1", "Testuser2"] }, - autoscaleProfile: { - autoscaleType: "ScheduleBased", - enabled: true, - gracefulDecommissionTimeout: -1, - scheduleBasedConfig: { - defaultCount: 3, - schedules: [ - { - count: 3, - days: ["Monday, Tuesday, Wednesday"], - endTime: "12:00", - startTime: "00:00", - }, - { - count: 3, - days: ["Sunday"], - endTime: "12:00", - startTime: "00:00", - }, - ], - timeZone: "Cen. Australia Standard Time", - }, - }, - logAnalyticsProfile: { - applicationLogs: { stdErrorEnabled: true, stdOutEnabled: true }, - enabled: true, - metricsEnabled: true, - }, - serviceConfigsProfiles: [ - { - configs: [ - { - component: "TestComp1", - files: [ - { - fileName: "TestFile1", - values: { testConfig1: "1", testConfig2: "2" }, - }, - { - fileName: "TestFile2", - values: { testConfig3: "3", testConfig4: "4" }, - }, - ], - }, - { - component: "TestComp2", - files: [ - { - path: "TestPath", - content: "TestContent", - fileName: "TestFile3", - }, - { - fileName: "TestFile4", - values: { testConfig7: "7", testConfig8: "8" }, - }, - ], - }, - ], - serviceName: "TestService1", - }, - { - configs: [ - { - component: "TestComp3", - files: [ - { fileName: "TestFile5", values: { testConfig9: "9" } }, - ], - }, - ], - serviceName: "TestService2", - }, - ], - sshProfile: { count: 2 }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterPatchRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing Cluster. - * - * @summary Updates an existing Cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/PatchRangerCluster.json - */ -async function hdInsightRangerClusterPatchTags(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterPatchRequest: ClusterPatch = { - properties: { - clusterProfile: { - rangerProfile: { - rangerAdmin: { - admins: ["testuser1@contoso.com", "testuser2@contoso.com"], - database: { - name: "testdb", - host: "testsqlserver.database.windows.net", - passwordSecretRef: - "https://testkv.vault.azure.net/secrets/mysecret/5df6584d9c25418c8d900240aa6c3452", - username: "admin", - }, - }, - rangerAudit: { - storageAccount: - "https://teststorage.blob.core.windows.net/testblob", - }, - rangerUsersync: { - enabled: true, - groups: [ - "0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac", - ], - mode: "automatic", - users: ["testuser1@contoso.com", "testuser2@contoso.com"], - }, - }, - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginUpdateAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterPatchRequest, - ); - console.log(result); -} - -async function main(): Promise { - hdInsightClustersPatchTags(); - hdInsightRangerClusterPatchTags(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeManualRollbackSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeManualRollbackSample.ts deleted file mode 100644 index 4143c6752ca8..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeManualRollbackSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterUpgradeRollback, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Manual rollback upgrade for a cluster. - * - * @summary Manual rollback upgrade for a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ClusterUpgradeRollback.json - */ -async function clusterUpgradeRollback(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterRollbackUpgradeRequest: ClusterUpgradeRollback = { - properties: { - upgradeHistory: - "/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/upgradeHistories/01_11_2024_02_35_03_AM-HotfixUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginUpgradeManualRollbackAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterRollbackUpgradeRequest, - ); - console.log(result); -} - -async function main(): Promise { - clusterUpgradeRollback(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeSample.ts deleted file mode 100644 index 04136a3a2057..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/clustersUpgradeSample.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ClusterUpgrade, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Upgrade a cluster. - * - * @summary Upgrade a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeAKSPatchVersionForCluster.json - */ -async function clustersUpgradeAksPatchVersion(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterUpgradeRequest: ClusterUpgrade = { - properties: { upgradeType: "AKSPatchUpgrade" }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Upgrade a cluster. - * - * @summary Upgrade a cluster. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/UpgradeHotfixForCluster.json - */ -async function clustersUpgradeHotfix(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const resourceGroupName = - process.env["HDINSIGHT_RESOURCE_GROUP"] || "hiloResourcegroup"; - const clusterPoolName = "clusterpool1"; - const clusterName = "cluster1"; - const clusterUpgradeRequest: ClusterUpgrade = { - properties: { - componentName: "historyserver", - targetBuildNumber: "3", - targetClusterVersion: "1.0.6", - targetOssVersion: "1.16.0", - upgradeType: "HotfixUpgrade", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.clusters.beginUpgradeAndWait( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - ); - console.log(result); -} - -async function main(): Promise { - clustersUpgradeAksPatchVersion(); - clustersUpgradeHotfix(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/locationsCheckNameAvailabilitySample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/locationsCheckNameAvailabilitySample.ts deleted file mode 100644 index 5fbd0c1b5034..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/locationsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NameAvailabilityParameters, - HDInsightContainersManagementClient, -} from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Check the availability of the resource name. - * - * @summary Check the availability of the resource name. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/LocationsNameAvailability.json - */ -async function locationsNameAvailability(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "10e32bab-26da-4cc4-a441-52b318f824e6"; - const location = "southeastasia"; - const nameAvailabilityParameters: NameAvailabilityParameters = { - name: "contosemember1", - type: "Microsoft.HDInsight/clusterPools/clusters", - }; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const result = await client.locations.checkNameAvailability( - location, - nameAvailabilityParameters, - ); - console.log(result); -} - -async function main(): Promise { - locationsNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index e9139d2cdfd1..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { HDInsightContainersManagementClient } from "@azure/arm-hdinsightcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns list of operations. - * - * @summary Returns list of operations. - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/GetOperations.json - */ -async function listOperations(): Promise { - const subscriptionId = - process.env["HDINSIGHT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listOperations(); -} - -main().catch(console.error); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/tsconfig.json b/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/hDInsightContainersManagementClient.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/hDInsightContainersManagementClient.ts deleted file mode 100644 index dfa0afe39e50..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/hDInsightContainersManagementClient.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -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, - ClusterPoolAvailableUpgradesImpl, - ClusterPoolUpgradeHistoriesImpl, - ClustersImpl, - ClusterAvailableUpgradesImpl, - ClusterUpgradeHistoriesImpl, - ClusterJobsImpl, - LocationsImpl, - OperationsImpl, - AvailableClusterPoolVersionsImpl, - AvailableClusterVersionsImpl, - ClusterLibrariesImpl, -} from "./operations/index.js"; -import { - ClusterPools, - ClusterPoolAvailableUpgrades, - ClusterPoolUpgradeHistories, - Clusters, - ClusterAvailableUpgrades, - ClusterUpgradeHistories, - ClusterJobs, - Locations, - Operations, - AvailableClusterPoolVersions, - AvailableClusterVersions, - ClusterLibraries, -} from "./operationsInterfaces/index.js"; -import { HDInsightContainersManagementClientOptionalParams } from "./models/index.js"; - -export class HDInsightContainersManagementClient extends coreClient.ServiceClient { - $host: string; - subscriptionId: string; - apiVersion: string; - - /** - * Initializes a new instance of the HDInsightContainersManagementClient 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?: HDInsightContainersManagementClientOptionalParams, - ) { - 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: HDInsightContainersManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-hdinsightcontainers/1.0.0-beta.5`; - 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 || "2024-05-01-preview"; - this.clusterPools = new ClusterPoolsImpl(this); - this.clusterPoolAvailableUpgrades = new ClusterPoolAvailableUpgradesImpl( - this, - ); - this.clusterPoolUpgradeHistories = new ClusterPoolUpgradeHistoriesImpl( - this, - ); - this.clusters = new ClustersImpl(this); - this.clusterAvailableUpgrades = new ClusterAvailableUpgradesImpl(this); - this.clusterUpgradeHistories = new ClusterUpgradeHistoriesImpl(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.clusterLibraries = new ClusterLibrariesImpl(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; - clusterPoolAvailableUpgrades: ClusterPoolAvailableUpgrades; - clusterPoolUpgradeHistories: ClusterPoolUpgradeHistories; - clusters: Clusters; - clusterAvailableUpgrades: ClusterAvailableUpgrades; - clusterUpgradeHistories: ClusterUpgradeHistories; - clusterJobs: ClusterJobs; - locations: Locations; - operations: Operations; - availableClusterPoolVersions: AvailableClusterPoolVersions; - availableClusterVersions: AvailableClusterVersions; - clusterLibraries: ClusterLibraries; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/index.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/index.ts deleted file mode 100644 index bd55bb479d7b..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; -export { HDInsightContainersManagementClient } from "./hDInsightContainersManagementClient.js"; -export * from "./operationsInterfaces/index.js"; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/lroImpl.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/lroImpl.ts deleted file mode 100644 index d8bc98987053..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/lroImpl.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -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-hdinsightcontainers/src/models/index.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/models/index.ts deleted file mode 100644 index 5ae722c15f22..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/models/index.ts +++ /dev/null @@ -1,2994 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export type ClusterPoolUpgradePropertiesUnion = - | ClusterPoolUpgradeProperties - | ClusterPoolAKSPatchVersionUpgradeProperties - | ClusterPoolNodeOsImageUpdateProperties; -export type ClusterPoolAvailableUpgradePropertiesUnion = - | ClusterPoolAvailableUpgradeProperties - | ClusterPoolAvailableUpgradeAksPatchUpgradeProperties - | ClusterPoolAvailableUpgradeNodeOsUpgradeProperties; -export type ClusterPoolUpgradeHistoryPropertiesUnion = - | ClusterPoolUpgradeHistoryProperties - | ClusterPoolNodeOsUpgradeHistoryProperties - | ClusterPoolAksPatchUpgradeHistoryProperties; -export type ClusterUpgradePropertiesUnion = - | ClusterUpgradeProperties - | ClusterAKSPatchVersionUpgradeProperties - | ClusterInPlaceUpgradePropertiesUnion; -export type ClusterAvailableUpgradePropertiesUnion = - | ClusterAvailableUpgradeProperties - | ClusterAvailableUpgradeAksPatchUpgradeProperties - | ClusterAvailableInPlaceUpgradePropertiesUnion; -export type ClusterUpgradeHistoryPropertiesUnion = - | ClusterUpgradeHistoryProperties - | ClusterInPlaceUpgradeHistoryPropertiesUnion - | ClusterAksPatchUpgradeHistoryProperties; -export type ClusterJobPropertiesUnion = - | ClusterJobProperties - | FlinkJobProperties; -export type ClusterLibraryPropertiesUnion = - | ClusterLibraryProperties - | PyPiLibraryProperties - | MavenLibraryProperties; -export type ClusterInPlaceUpgradePropertiesUnion = - | ClusterInPlaceUpgradeProperties - | ClusterHotfixUpgradeProperties - | ClusterPatchVersionUpgradeProperties; -export type ClusterAvailableInPlaceUpgradePropertiesUnion = - | ClusterAvailableInPlaceUpgradeProperties - | ClusterAvailableUpgradeHotfixUpgradeProperties - | ClusterAvailableUpgradePatchVersionUpgradeProperties; -export type ClusterInPlaceUpgradeHistoryPropertiesUnion = - | ClusterInPlaceUpgradeHistoryProperties - | ClusterHotfixUpgradeHistoryProperties - | ClusterHotfixUpgradeRollbackHistoryProperties - | ClusterPatchVersionUpgradeHistoryProperties - | ClusterPatchVersionUpgradeRollbackHistoryProperties; - -/** Cluster pool resource properties. */ -export interface ClusterPoolResourceProperties { - /** - * 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; -} - -/** Cluster pool profile. */ -export interface ClusterPoolProfile { - /** Cluster pool version is a 2-part version. */ - clusterPoolVersion: string; - /** Gets or sets the IP tag for the public IPs created along with the HDInsightOnAks ClusterPools and Clusters. */ - publicIpTag?: IpTag; -} - -/** Contains the IpTag associated with the public IP address */ -export interface IpTag { - /** Gets or sets the ipTag type: Example FirstPartyUsage. */ - ipTagType: string; - /** Gets or sets value of the IpTag associated with the public IP. Example HDInsight, SQL, Storage etc */ - tag: string; -} - -/** Cluster pool compute profile. */ -export interface ClusterPoolComputeProfile { - /** The virtual machine SKU. */ - vmSize: string; - /** - * The number of virtual machines. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly count?: number; - /** The list of Availability zones to use for AKS VMSS nodes. */ - availabilityZones?: string[]; -} - -/** 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; - /** This can only be set at cluster pool creation time and cannot be changed later. */ - outboundType?: OutboundType; - /** ClusterPool is based on AKS cluster. AKS cluster exposes the API server to public internet by default. If you set this property to true, a private AKS cluster will be created, and it will use private apiserver, which is not exposed to public internet. */ - enablePrivateApiServer?: boolean; - /** IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with private AKS clusters. So you cannot set enablePrivateApiServer to true and apiServerAuthorizedIpRanges at the same time. Currently, this property is not supported and please don't use it. */ - apiServerAuthorizedIpRanges?: 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; -} - -/** Cluster Pool Upgrade. */ -export interface ClusterPoolUpgrade { - /** Properties of upgrading cluster pool. */ - properties: ClusterPoolUpgradePropertiesUnion; -} - -/** Properties of upgrading cluster pool. */ -export interface ClusterPoolUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade" | "NodeOsUpgrade"; -} - -/** collection of cluster pool available upgrade. */ -export interface ClusterPoolAvailableUpgradeList { - /** Collection of cluster pool available upgrade. */ - value: ClusterPoolAvailableUpgrade[]; - /** The Url of next result page. */ - nextLink?: string; -} - -/** Cluster pool available upgrade properties. */ -export interface ClusterPoolAvailableUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade" | "NodeOsUpgrade"; -} - -/** Represents a list of cluster pool upgrade history. */ -export interface ClusterPoolUpgradeHistoryListResult { - /** The list of cluster pool upgrade history. */ - value: ClusterPoolUpgradeHistory[]; - /** - * 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; -} - -/** Properties of cluster pool upgrade history. */ -export interface ClusterPoolUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "NodeOsUpgrade" | "AKSPatchUpgrade"; - /** Time when created this upgrade history. */ - utcTime: string; - /** Result of this upgrade. */ - upgradeResult: ClusterPoolUpgradeHistoryUpgradeResultType; -} - -/** 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; -} - -/** Cluster resource properties. */ -export interface ClusterResourceProperties { - /** - * 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 compute profile. */ -export interface ComputeProfile { - /** The nodes definitions. */ - nodes: NodeProfile[]; - /** The list of Availability zones to use for AKS VMSS nodes. */ - availabilityZones?: string[]; -} - -/** 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[]; - /** This is deprecated. Please use managed identity profile instead. */ - identityProfile?: IdentityProfile; - /** This property is required by Trino, Spark and Flink cluster but is optional for Kafka cluster. */ - managedIdentityProfile?: ManagedIdentityProfile; - /** 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 access profile. */ - clusterAccessProfile?: ClusterAccessProfile; - /** 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; - /** Cluster Ranger plugin profile. */ - rangerPluginProfile?: ClusterRangerPluginProfile; - /** The Kafka cluster profile. */ - kafkaProfile?: KafkaProfile; - /** Trino Cluster profile. */ - trinoProfile?: TrinoProfile; - /** LLAP cluster profile. */ - llapProfile?: { [propertyName: string]: any }; - /** The Flink cluster profile. */ - flinkProfile?: FlinkProfile; - /** The spark cluster profile. */ - sparkProfile?: SparkProfile; - /** The ranger cluster profile. */ - rangerProfile?: RangerProfile; - /** Stub cluster profile. */ - stubProfile?: { [propertyName: string]: any }; - /** The script action profile list. */ - scriptActionProfiles?: ScriptActionProfile[]; -} - -export interface ClusterComponentsItem { - name?: string; - version?: string; -} - -/** The details of managed identity. */ -export interface ManagedIdentityProfile { - /** The list of managed identity. */ - identityList: ManagedIdentitySpec[]; -} - -/** The details of a managed identity. */ -export interface ManagedIdentitySpec { - /** The type of managed identity. */ - type: ManagedIdentityType; - /** ResourceId of the managed identity. */ - resourceId: string; - /** ClientId of the managed identity. */ - clientId: string; - /** ObjectId of the managed identity. */ - objectId: 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; - /** Private web connectivity endpoint. This property will only be returned when enableInternalIngress is true. */ - privateFqdn?: string; -} - -/** SSH connectivity endpoint details. */ -export interface SshConnectivityEndpoint { - /** SSH connectivity endpoint. */ - endpoint: string; - /** Private SSH connectivity endpoint. This property will only be returned when enableInternalIngress is true. */ - privateSshEndpoint?: string; -} - -/** Cluster access profile. */ -export interface ClusterAccessProfile { - /** Whether to create cluster using private IP instead of public IP. This property must be set at create time. */ - enableInternalIngress: boolean; - /** - * Private link service resource ID. Only when enableInternalIngress is true, this property will be returned. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateLinkServiceId?: 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; - /** The virtual machine SKU. */ - vmSize?: 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; -} - -/** Cluster Ranger plugin profile. */ -export interface ClusterRangerPluginProfile { - /** Enable Ranger for cluster or not. */ - enabled: boolean; -} - -/** The Kafka cluster profile. */ -export interface KafkaProfile { - /** Expose Kafka cluster in KRaft mode. */ - enableKRaft?: boolean; - /** Expose worker nodes as public endpoints. */ - enablePublicEndpoints?: boolean; - /** Fully qualified path of Azure Storage container used for Tiered Storage. */ - remoteStorageUri?: string; - /** Kafka disk storage profile. */ - diskStorage: DiskStorageProfile; - /** - * Kafka bootstrap server and brokers related connectivity endpoints. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectivityEndpoints?: KafkaConnectivityEndpoints; -} - -/** Kafka disk storage profile. */ -export interface DiskStorageProfile { - /** Managed Disk size in GB. The maximum supported disk size for Standard and Premium HDD/SSD is 32TB, except for Premium SSD v2, which supports up to 64TB. */ - dataDiskSize: number; - /** Managed Disk Type. */ - dataDiskType: DataDiskType; -} - -/** Kafka bootstrap server and broker related connectivity endpoints. */ -export interface KafkaConnectivityEndpoints { - /** bootstrap server connectivity endpoint. */ - bootstrapServerEndpoint?: string; - /** Kafka broker endpoint list. */ - brokerEndpoints?: string[]; -} - -/** 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; - /** The authentication mode to connect to your Hive metastore database. More details: https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization */ - metastoreDbConnectionAuthenticationMode?: MetastoreDbConnectionAuthenticationMode; - /** 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 { - /** Trino debug configuration. */ - debug?: TrinoDebugConfig; - /** The flag that if enable coordinator HA, uses multiple coordinator replicas with auto failover, one per each head node. Default: true. */ - highAvailabilityEnabled?: boolean; -} - -/** Trino debug configuration. */ -export interface TrinoDebugConfig { - /** 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 { - /** Trino debug configuration. */ - debug?: TrinoDebugConfig; -} - -/** 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; - /** A string property that indicates the deployment mode of Flink cluster. It can have one of the following enum values => Application, Session. Default value is Session */ - deploymentMode?: DeploymentMode; - /** Job specifications for flink clusters in application deployment mode. The specification is immutable even if job properties are changed by calling the RunJob API, please use the ListJob API to get the latest job information. */ - jobSpec?: FlinkJobProfile; -} - -/** 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 { - /** The authentication mode to connect to your Hive metastore database. More details: https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization */ - metastoreDbConnectionAuthenticationMode?: MetastoreDbConnectionAuthenticationMode; - /** 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; -} - -/** Job specifications for flink clusters in application deployment mode. The specification is immutable even if job properties are changed by calling the RunJob API, please use the ListJob API to get the latest job information. */ -export interface FlinkJobProfile { - /** 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. If not specified, the entry point is auto-detected from the flink job jar package. */ - 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 upgrade mode to be performed on the Flink job. It can have one of the following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. */ - upgradeMode: UpgradeMode; -} - -/** 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 authentication mode to connect to your Hive metastore database. More details: https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization */ - dbConnectionAuthenticationMode?: DbConnectionAuthenticationMode; - /** 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 ranger cluster profile. */ -export interface RangerProfile { - /** Specification for the Ranger Admin service. */ - rangerAdmin: RangerAdminSpec; - /** Properties required to describe audit log storage. */ - rangerAudit?: RangerAuditSpec; - /** Specification for the Ranger Usersync service */ - rangerUsersync: RangerUsersyncSpec; -} - -/** Specification for the Ranger Admin service. */ -export interface RangerAdminSpec { - /** List of usernames that should be marked as ranger admins. These usernames should match the user principal name (UPN) of the respective AAD users. */ - admins: string[]; - database: RangerAdminSpecDatabase; -} - -export interface RangerAdminSpecDatabase { - /** The database URL */ - host: string; - /** The database name */ - name: string; - /** Reference for the database password */ - passwordSecretRef?: string; - /** The name of the database user */ - username?: string; -} - -/** Properties required to describe audit log storage. */ -export interface RangerAuditSpec { - /** Azure storage location of the blobs. MSI should have read/write access to this Storage account. */ - storageAccount?: string; -} - -/** Specification for the Ranger Usersync service */ -export interface RangerUsersyncSpec { - /** Denotes whether usersync service should be enabled */ - enabled?: boolean; - /** List of groups that should be synced. These group names should match the object id of the respective AAD groups. */ - groups?: string[]; - /** User & groups can be synced automatically or via a static list that's refreshed. */ - mode?: RangerUsersyncMode; - /** Azure storage location of a mapping file that lists user & group associations. */ - userMappingLocation?: string; - /** List of user names that should be synced. These usernames should match the User principal name of the respective AAD users. */ - users?: 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 Upgrade. */ -export interface ClusterUpgrade { - /** Properties of upgrading cluster. */ - properties: ClusterUpgradePropertiesUnion; -} - -/** Properties of upgrading cluster. */ -export interface ClusterUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: - | "AKSPatchUpgrade" - | "ClusterInPlaceUpgradeProperties" - | "HotfixUpgrade" - | "PatchVersionUpgrade"; -} - -/** Collection of cluster available upgrade. */ -export interface ClusterAvailableUpgradeList { - /** Collection of Cluster available upgrade. */ - value: ClusterAvailableUpgrade[]; - /** The URL of next result page. */ - nextLink?: string; -} - -/** Cluster available upgrade properties. */ -export interface ClusterAvailableUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: - | "AKSPatchUpgrade" - | "ClusterAvailableInPlaceUpgradeProperties" - | "HotfixUpgrade" - | "PatchVersionUpgrade"; -} - -/** Represents a list of cluster upgrade history. */ -export interface ClusterUpgradeHistoryListResult { - /** The list of cluster upgrade history. */ - value: ClusterUpgradeHistory[]; - /** - * 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; -} - -/** Properties of cluster upgrade history. */ -export interface ClusterUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: - | "ClusterInPlaceUpgradeHistoryProperties" - | "HotfixUpgrade" - | "HotfixUpgradeRollback" - | "PatchVersionUpgrade" - | "PatchVersionUpgradeRollback" - | "AKSPatchUpgrade"; - /** Time when created this upgrade history. */ - utcTime: string; - /** Result of this upgrade. */ - upgradeResult: ClusterUpgradeHistoryUpgradeResultType; -} - -/** Cluster Upgrade. */ -export interface ClusterUpgradeRollback { - /** Properties for manual rollback of cluster's upgrade. */ - properties: ClusterUpgradeRollbackProperties; -} - -/** Properties for manual rollback of cluster's upgrade. */ -export interface ClusterUpgradeRollbackProperties { - /** A specific upgrade history to rollback */ - upgradeHistory: string; -} - -/** The properties for resizing a cluster. */ -export interface ClusterResizeProperties { - /** Target node count of worker node. */ - targetWorkerNodeCount: number; -} - -/** The patch for a cluster. */ -export interface ClusterPatch { - /** Define cluster patch specific properties. */ - properties?: ClusterPatchProperties; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Cluster resource patch data. */ -export interface ClusterPatchProperties { - /** Cluster resource patch properties. */ - clusterProfile?: UpdatableClusterProfile; -} - -/** 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; - /** Cluster Ranger plugin profile. */ - rangerPluginProfile?: ClusterRangerPluginProfile; - /** The ranger cluster profile. */ - rangerProfile?: RangerProfile; - /** The script action profile list. */ - scriptActionProfiles?: ScriptActionProfile[]; - /** The cluster secret profile. */ - secretsProfile?: SecretsProfile; - /** Trino Cluster profile. */ - trinoProfile?: TrinoProfile; -} - -/** 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 { - /** Cluster instance service config properties. */ - properties?: ServiceConfigResultProperties; -} - -/** 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; - /** Properties of the instance view. */ - properties: ClusterInstanceViewResultProperties; -} - -/** 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; -} - -/** Cluster pool version properties. */ -export interface ClusterPoolVersionProperties { - /** 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; -} - -/** 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 version properties. */ -export interface ClusterVersionProperties { - /** 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[]; -} - -/** Collection of libraries in the cluster. */ -export interface ClusterLibraryList { - /** Collection of libraries in the cluster. */ - value: ClusterLibrary[]; - /** - * The url of next result page. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Properties of a library in the cluster. */ -export interface ClusterLibraryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "pypi" | "maven"; - /** Remark of the latest library management operation. */ - remarks?: string; - /** - * Timestamp of the latest library management operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly timestamp?: Date; - /** - * Status of the library. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: Status; - /** - * Error message of the library operation when a failure occurs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} - -/** Properties of a library management operation. */ -export interface ClusterLibraryManagementOperationProperties { - /** The library management action. */ - action: LibraryManagementAction; - /** The libraries to be installed/updated/uninstalled. */ - libraries: ClusterLibrary[]; -} - -/** 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 {} - -/** Properties of upgrading cluster pool's AKS patch version. */ -export interface ClusterPoolAKSPatchVersionUpgradeProperties - extends ClusterPoolUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade"; - /** whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes should be false. */ - upgradeClusterPool?: boolean; - /** whether upgrade all clusters' nodes. If it's true, upgradeClusterPool should be false. */ - upgradeAllClusterNodes?: boolean; - /** Target AKS version. When it's not set, latest version will be used. When upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be equal to AKS version of cluster pool. */ - targetAksVersion?: string; -} - -/** Properties of upgrading cluster pool's AKS patch version. */ -export interface ClusterPoolNodeOsImageUpdateProperties - extends ClusterPoolUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "NodeOsUpgrade"; -} - -/** Cluster pool available AKS patch version upgrade. */ -export interface ClusterPoolAvailableUpgradeAksPatchUpgradeProperties - extends ClusterPoolAvailableUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade"; - /** Current AKS version. */ - currentVersion?: string; - /** Current AKS version's status: whether it is deprecated or supported */ - currentVersionStatus?: CurrentClusterPoolAksVersionStatus; - /** Latest AKS patch version. */ - latestVersion?: string; -} - -/** Cluster pool available node OS update. */ -export interface ClusterPoolAvailableUpgradeNodeOsUpgradeProperties - extends ClusterPoolAvailableUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "NodeOsUpgrade"; - /** The latest node OS version. */ - latestVersion?: string; -} - -/** Cluster pool node os upgrade history properties. */ -export interface ClusterPoolNodeOsUpgradeHistoryProperties - extends ClusterPoolUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "NodeOsUpgrade"; - /** New Node Os version. */ - newNodeOs?: string; -} - -/** Cluster pool aks upgrade history properties. */ -export interface ClusterPoolAksPatchUpgradeHistoryProperties - extends ClusterPoolUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade"; - /** Whether upgrade cluster pool. */ - upgradeClusterPool?: boolean; - /** Whether upgrade all cluster nodes. */ - upgradeAllClusterNodes?: boolean; - /** Version before update. */ - originalVersion?: string; - /** Version going to update. */ - newVersion?: string; -} - -/** Web connectivity endpoint details. */ -export interface ConnectivityProfileWeb extends WebConnectivityEndpoint {} - -/** Properties of upgrading cluster's AKS patch version. */ -export interface ClusterAKSPatchVersionUpgradeProperties - extends ClusterUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade"; -} - -/** Properties of in-place upgrading cluster. */ -export interface ClusterInPlaceUpgradeProperties - extends ClusterUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: - | "ClusterInPlaceUpgradeProperties" - | "HotfixUpgrade" - | "PatchVersionUpgrade"; - /** Target OSS version of component to be upgraded. */ - targetOssVersion?: string; - /** Target cluster version of component to be upgraded. */ - targetClusterVersion?: string; - /** Target build number of component to be upgraded. */ - targetBuildNumber?: string; - /** Name of component to be upgraded. */ - componentName?: string; -} - -/** Cluster available AKS patch version upgrade. */ -export interface ClusterAvailableUpgradeAksPatchUpgradeProperties - extends ClusterAvailableUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade"; - /** Current node pool version. */ - currentVersion?: string; - /** Current AKS version's status: whether it is deprecated or supported */ - currentVersionStatus?: CurrentClusterAksVersionStatus; - /** Latest available version, which should be equal to AKS control plane version if it's not deprecated. */ - latestVersion?: string; -} - -/** Cluster available in-place upgrade. */ -export interface ClusterAvailableInPlaceUpgradeProperties - extends ClusterAvailableUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: - | "ClusterAvailableInPlaceUpgradeProperties" - | "HotfixUpgrade" - | "PatchVersionUpgrade"; - /** Hotfix version upgrade description. */ - description?: string; - /** Source OSS version of current cluster component. */ - sourceOssVersion?: string; - /** Source cluster version of current cluster component. */ - sourceClusterVersion?: string; - /** Source build number of current cluster component. */ - sourceBuildNumber?: string; - /** Target OSS version of component to be upgraded. */ - targetOssVersion?: string; - /** Target cluster version of component to be upgraded. */ - targetClusterVersion?: string; - /** Target build number of component to be upgraded. */ - targetBuildNumber?: string; - /** Name of component to be upgraded. */ - componentName?: string; - /** Severity of this upgrade. */ - severity?: Severity; - /** Extended properties of current available upgrade version */ - extendedProperties?: string; - /** Created time of current available upgrade version */ - createdTime?: Date; -} - -/** Cluster in-place upgrade history properties. */ -export interface ClusterInPlaceUpgradeHistoryProperties - extends ClusterUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: - | "ClusterInPlaceUpgradeHistoryProperties" - | "HotfixUpgrade" - | "HotfixUpgradeRollback" - | "PatchVersionUpgrade" - | "PatchVersionUpgradeRollback"; - /** Version with three part. */ - sourceClusterVersion?: string; - /** Version with three part. */ - sourceOssVersion?: string; - /** Source build number. */ - sourceBuildNumber?: string; - /** Version with three part. */ - targetClusterVersion?: string; - /** Version with three part. */ - targetOssVersion?: string; - /** Target build number. */ - targetBuildNumber?: string; - /** Component name to upgrade. */ - componentName?: string; - /** Severity of this upgrade. */ - severity?: ClusterUpgradeHistorySeverityType; -} - -/** Cluster aks patch upgrade history properties. */ -export interface ClusterAksPatchUpgradeHistoryProperties - extends ClusterUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "AKSPatchUpgrade"; - /** Version before update. */ - originalVersion?: string; - /** Version going to update. */ - newVersion?: string; -} - -/** Properties of flink job. */ -export interface FlinkJobProperties extends ClusterJobProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - jobType: "FlinkJob"; - /** Run id of job */ - runId?: string; - /** 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 {} - -/** Properties of a PyPi library in the cluster. */ -export interface PyPiLibraryProperties extends ClusterLibraryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "pypi"; - /** Name of the PyPi package. */ - name: string; - /** Version of the PyPi package. */ - version?: string; -} - -/** Properties of a Maven library in the cluster. */ -export interface MavenLibraryProperties extends ClusterLibraryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "maven"; - /** GroupId of the Maven package. */ - groupId: string; - /** ArtifactId of the Maven package. */ - name: string; - /** Version of the Maven package. */ - version?: string; -} - -/** Cluster pool. */ -export interface ClusterPool extends TrackedResource { - /** Gets or sets the properties. Define cluster pool specific properties. */ - properties?: ClusterPoolResourceProperties; -} - -/** The cluster. */ -export interface Cluster extends TrackedResource { - /** Gets or sets the properties. Define cluster specific properties. */ - properties?: ClusterResourceProperties; -} - -/** The parameters for resizing a cluster. */ -export interface ClusterResizeData extends TrackedResource { - /** Sets the properties. Define cluster resize specific properties. */ - properties?: ClusterResizeProperties; -} - -/** Cluster pool available upgrade. */ -export interface ClusterPoolAvailableUpgrade extends ProxyResource { - /** Gets or sets the properties. Define cluster pool upgrade specific properties. */ - properties?: ClusterPoolAvailableUpgradePropertiesUnion; -} - -/** Cluster pool upgrade history. */ -export interface ClusterPoolUpgradeHistory extends ProxyResource { - /** Properties of cluster pool upgrade history. */ - properties: ClusterPoolUpgradeHistoryPropertiesUnion; -} - -/** Cluster available upgrade. */ -export interface ClusterAvailableUpgrade extends ProxyResource { - /** Gets or sets the properties. Define cluster upgrade specific properties. */ - properties?: ClusterAvailableUpgradePropertiesUnion; -} - -/** Cluster upgrade history. */ -export interface ClusterUpgradeHistory extends ProxyResource { - /** Properties of cluster upgrade history. */ - properties: ClusterUpgradeHistoryPropertiesUnion; -} - -/** 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 properties. */ - properties?: ClusterPoolVersionProperties; -} - -/** Available cluster version. */ -export interface ClusterVersion extends ProxyResource { - /** Cluster version properties. */ - properties?: ClusterVersionProperties; -} - -/** Libraries in the cluster. */ -export interface ClusterLibrary extends ProxyResource { - /** Properties of a library in the cluster. */ - properties: ClusterLibraryPropertiesUnion; -} - -/** Library management operation. */ -export interface ClusterLibraryManagementOperation extends ProxyResource { - /** Properties of a library management operation. */ - properties: ClusterLibraryManagementOperationProperties; -} - -/** Properties of upgrading cluster's hotfix. */ -export interface ClusterHotfixUpgradeProperties - extends ClusterInPlaceUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "HotfixUpgrade"; -} - -/** Properties of upgrading cluster's patch version. */ -export interface ClusterPatchVersionUpgradeProperties - extends ClusterInPlaceUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "PatchVersionUpgrade"; -} - -/** Cluster available hotfix version upgrade. */ -export interface ClusterAvailableUpgradeHotfixUpgradeProperties - extends ClusterAvailableInPlaceUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "HotfixUpgrade"; -} - -/** Cluster available patch version upgrade. */ -export interface ClusterAvailableUpgradePatchVersionUpgradeProperties - extends ClusterAvailableInPlaceUpgradeProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "PatchVersionUpgrade"; -} - -/** Cluster hotfix upgrade history properties. */ -export interface ClusterHotfixUpgradeHistoryProperties - extends ClusterInPlaceUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "HotfixUpgrade"; -} - -/** Cluster hotfix upgrade rollback history properties. */ -export interface ClusterHotfixUpgradeRollbackHistoryProperties - extends ClusterInPlaceUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "HotfixUpgradeRollback"; -} - -/** Cluster patch version upgrade history properties. */ -export interface ClusterPatchVersionUpgradeHistoryProperties - extends ClusterInPlaceUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "PatchVersionUpgrade"; -} - -/** Cluster patch version upgrade rollback history properties. */ -export interface ClusterPatchVersionUpgradeRollbackHistoryProperties - extends ClusterInPlaceUpgradeHistoryProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - upgradeType: "PatchVersionUpgradeRollback"; -} - -/** 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 ClusterPools_upgrade operation. */ -export interface ClusterPoolsUpgradeHeaders { - /** URL to get the status of the resize operation. */ - location?: string; -} - -/** Defines headers for Clusters_upgrade operation. */ -export interface ClustersUpgradeHeaders { - /** URL to get the status of the resize operation. */ - location?: string; -} - -/** Defines headers for Clusters_upgradeManualRollback operation. */ -export interface ClustersUpgradeManualRollbackHeaders { - /** URL to get the status of the rollback operation. */ - 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; -} - -/** Defines headers for ClusterLibraries_manageLibraries operation. */ -export interface ClusterLibrariesManageLibrariesHeaders { - /** URL to get the status of the library management 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 OutboundType} that the service accepts. */ -export enum KnownOutboundType { - /** The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type 'loadBalancer'. */ - LoadBalancer = "loadBalancer", - /** Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. */ - UserDefinedRouting = "userDefinedRouting", -} - -/** - * Defines values for OutboundType. \ - * {@link KnownOutboundType} can be used interchangeably with OutboundType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **loadBalancer**: The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type 'loadBalancer'. \ - * **userDefinedRouting**: Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. - */ -export type OutboundType = 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 ClusterPoolUpgradeType} that the service accepts. */ -export enum KnownClusterPoolUpgradeType { - /** AKSPatchUpgrade */ - AKSPatchUpgrade = "AKSPatchUpgrade", - /** NodeOsUpgrade */ - NodeOsUpgrade = "NodeOsUpgrade", -} - -/** - * Defines values for ClusterPoolUpgradeType. \ - * {@link KnownClusterPoolUpgradeType} can be used interchangeably with ClusterPoolUpgradeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AKSPatchUpgrade** \ - * **NodeOsUpgrade** - */ -export type ClusterPoolUpgradeType = string; - -/** Known values of {@link ClusterPoolAvailableUpgradeType} that the service accepts. */ -export enum KnownClusterPoolAvailableUpgradeType { - /** AKSPatchUpgrade */ - AKSPatchUpgrade = "AKSPatchUpgrade", - /** NodeOsUpgrade */ - NodeOsUpgrade = "NodeOsUpgrade", -} - -/** - * Defines values for ClusterPoolAvailableUpgradeType. \ - * {@link KnownClusterPoolAvailableUpgradeType} can be used interchangeably with ClusterPoolAvailableUpgradeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AKSPatchUpgrade** \ - * **NodeOsUpgrade** - */ -export type ClusterPoolAvailableUpgradeType = string; - -/** Known values of {@link ClusterPoolUpgradeHistoryType} that the service accepts. */ -export enum KnownClusterPoolUpgradeHistoryType { - /** AKSPatchUpgrade */ - AKSPatchUpgrade = "AKSPatchUpgrade", - /** NodeOsUpgrade */ - NodeOsUpgrade = "NodeOsUpgrade", -} - -/** - * Defines values for ClusterPoolUpgradeHistoryType. \ - * {@link KnownClusterPoolUpgradeHistoryType} can be used interchangeably with ClusterPoolUpgradeHistoryType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AKSPatchUpgrade** \ - * **NodeOsUpgrade** - */ -export type ClusterPoolUpgradeHistoryType = string; - -/** Known values of {@link ClusterPoolUpgradeHistoryUpgradeResultType} that the service accepts. */ -export enum KnownClusterPoolUpgradeHistoryUpgradeResultType { - /** Succeed */ - Succeed = "Succeed", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for ClusterPoolUpgradeHistoryUpgradeResultType. \ - * {@link KnownClusterPoolUpgradeHistoryUpgradeResultType} can be used interchangeably with ClusterPoolUpgradeHistoryUpgradeResultType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeed** \ - * **Failed** - */ -export type ClusterPoolUpgradeHistoryUpgradeResultType = string; - -/** Known values of {@link ManagedIdentityType} that the service accepts. */ -export enum KnownManagedIdentityType { - /** Cluster */ - Cluster = "cluster", - /** User */ - User = "user", - /** Internal */ - Internal = "internal", -} - -/** - * Defines values for ManagedIdentityType. \ - * {@link KnownManagedIdentityType} can be used interchangeably with ManagedIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **cluster** \ - * **user** \ - * **internal** - */ -export type ManagedIdentityType = 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 DataDiskType} that the service accepts. */ -export enum KnownDataDiskType { - /** StandardHDDLRS */ - StandardHDDLRS = "Standard_HDD_LRS", - /** StandardSSDLRS */ - StandardSSDLRS = "Standard_SSD_LRS", - /** StandardSSDZRS */ - StandardSSDZRS = "Standard_SSD_ZRS", - /** PremiumSSDLRS */ - PremiumSSDLRS = "Premium_SSD_LRS", - /** PremiumSSDZRS */ - PremiumSSDZRS = "Premium_SSD_ZRS", - /** PremiumSSDV2LRS */ - PremiumSSDV2LRS = "Premium_SSD_v2_LRS", -} - -/** - * Defines values for DataDiskType. \ - * {@link KnownDataDiskType} can be used interchangeably with DataDiskType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard_HDD_LRS** \ - * **Standard_SSD_LRS** \ - * **Standard_SSD_ZRS** \ - * **Premium_SSD_LRS** \ - * **Premium_SSD_ZRS** \ - * **Premium_SSD_v2_LRS** - */ -export type DataDiskType = string; - -/** Known values of {@link MetastoreDbConnectionAuthenticationMode} that the service accepts. */ -export enum KnownMetastoreDbConnectionAuthenticationMode { - /** The password-based authentication to connect to your Hive metastore database. */ - SqlAuth = "SqlAuth", - /** The managed-identity-based authentication to connect to your Hive metastore database. */ - IdentityAuth = "IdentityAuth", -} - -/** - * Defines values for MetastoreDbConnectionAuthenticationMode. \ - * {@link KnownMetastoreDbConnectionAuthenticationMode} can be used interchangeably with MetastoreDbConnectionAuthenticationMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SqlAuth**: The password-based authentication to connect to your Hive metastore database. \ - * **IdentityAuth**: The managed-identity-based authentication to connect to your Hive metastore database. - */ -export type MetastoreDbConnectionAuthenticationMode = string; - -/** Known values of {@link DeploymentMode} that the service accepts. */ -export enum KnownDeploymentMode { - /** Application */ - Application = "Application", - /** Session */ - Session = "Session", -} - -/** - * Defines values for DeploymentMode. \ - * {@link KnownDeploymentMode} can be used interchangeably with DeploymentMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Application** \ - * **Session** - */ -export type DeploymentMode = string; - -/** Known values of {@link UpgradeMode} that the service accepts. */ -export enum KnownUpgradeMode { - /** StatelessUpdate */ - StatelessUpdate = "STATELESS_UPDATE", - /** Update */ - Update = "UPDATE", - /** LastStateUpdate */ - LastStateUpdate = "LAST_STATE_UPDATE", -} - -/** - * Defines values for UpgradeMode. \ - * {@link KnownUpgradeMode} can be used interchangeably with UpgradeMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **STATELESS_UPDATE** \ - * **UPDATE** \ - * **LAST_STATE_UPDATE** - */ -export type UpgradeMode = string; - -/** Known values of {@link DbConnectionAuthenticationMode} that the service accepts. */ -export enum KnownDbConnectionAuthenticationMode { - /** The password-based authentication to connect to your Hive metastore database. */ - SqlAuth = "SqlAuth", - /** The managed-identity-based authentication to connect to your Hive metastore database. */ - IdentityAuth = "IdentityAuth", -} - -/** - * Defines values for DbConnectionAuthenticationMode. \ - * {@link KnownDbConnectionAuthenticationMode} can be used interchangeably with DbConnectionAuthenticationMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SqlAuth**: The password-based authentication to connect to your Hive metastore database. \ - * **IdentityAuth**: The managed-identity-based authentication to connect to your Hive metastore database. - */ -export type DbConnectionAuthenticationMode = string; - -/** Known values of {@link RangerUsersyncMode} that the service accepts. */ -export enum KnownRangerUsersyncMode { - /** Static */ - Static = "static", - /** Automatic */ - Automatic = "automatic", -} - -/** - * Defines values for RangerUsersyncMode. \ - * {@link KnownRangerUsersyncMode} can be used interchangeably with RangerUsersyncMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **static** \ - * **automatic** - */ -export type RangerUsersyncMode = string; - -/** Known values of {@link ClusterUpgradeType} that the service accepts. */ -export enum KnownClusterUpgradeType { - /** AKSPatchUpgrade */ - AKSPatchUpgrade = "AKSPatchUpgrade", - /** HotfixUpgrade */ - HotfixUpgrade = "HotfixUpgrade", - /** PatchVersionUpgrade */ - PatchVersionUpgrade = "PatchVersionUpgrade", -} - -/** - * Defines values for ClusterUpgradeType. \ - * {@link KnownClusterUpgradeType} can be used interchangeably with ClusterUpgradeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AKSPatchUpgrade** \ - * **HotfixUpgrade** \ - * **PatchVersionUpgrade** - */ -export type ClusterUpgradeType = string; - -/** Known values of {@link ClusterAvailableUpgradeType} that the service accepts. */ -export enum KnownClusterAvailableUpgradeType { - /** AKSPatchUpgrade */ - AKSPatchUpgrade = "AKSPatchUpgrade", - /** HotfixUpgrade */ - HotfixUpgrade = "HotfixUpgrade", - /** PatchVersionUpgrade */ - PatchVersionUpgrade = "PatchVersionUpgrade", -} - -/** - * Defines values for ClusterAvailableUpgradeType. \ - * {@link KnownClusterAvailableUpgradeType} can be used interchangeably with ClusterAvailableUpgradeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AKSPatchUpgrade** \ - * **HotfixUpgrade** \ - * **PatchVersionUpgrade** - */ -export type ClusterAvailableUpgradeType = string; - -/** Known values of {@link ClusterUpgradeHistoryType} that the service accepts. */ -export enum KnownClusterUpgradeHistoryType { - /** AKSPatchUpgrade */ - AKSPatchUpgrade = "AKSPatchUpgrade", - /** HotfixUpgrade */ - HotfixUpgrade = "HotfixUpgrade", - /** HotfixUpgradeRollback */ - HotfixUpgradeRollback = "HotfixUpgradeRollback", - /** PatchVersionUpgrade */ - PatchVersionUpgrade = "PatchVersionUpgrade", - /** PatchVersionUpgradeRollback */ - PatchVersionUpgradeRollback = "PatchVersionUpgradeRollback", -} - -/** - * Defines values for ClusterUpgradeHistoryType. \ - * {@link KnownClusterUpgradeHistoryType} can be used interchangeably with ClusterUpgradeHistoryType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AKSPatchUpgrade** \ - * **HotfixUpgrade** \ - * **HotfixUpgradeRollback** \ - * **PatchVersionUpgrade** \ - * **PatchVersionUpgradeRollback** - */ -export type ClusterUpgradeHistoryType = string; - -/** Known values of {@link ClusterUpgradeHistoryUpgradeResultType} that the service accepts. */ -export enum KnownClusterUpgradeHistoryUpgradeResultType { - /** Succeed */ - Succeed = "Succeed", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for ClusterUpgradeHistoryUpgradeResultType. \ - * {@link KnownClusterUpgradeHistoryUpgradeResultType} can be used interchangeably with ClusterUpgradeHistoryUpgradeResultType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeed** \ - * **Failed** - */ -export type ClusterUpgradeHistoryUpgradeResultType = 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 Category} that the service accepts. */ -export enum KnownCategory { - /** Custom */ - Custom = "custom", - /** Predefined */ - Predefined = "predefined", -} - -/** - * Defines values for Category. \ - * {@link KnownCategory} can be used interchangeably with Category, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **custom** \ - * **predefined** - */ -export type Category = string; - -/** Known values of {@link Type} that the service accepts. */ -export enum KnownType { - /** Pypi */ - Pypi = "pypi", - /** Maven */ - Maven = "maven", -} - -/** - * Defines values for Type. \ - * {@link KnownType} can be used interchangeably with Type, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **pypi** \ - * **maven** - */ -export type Type = string; - -/** Known values of {@link Status} that the service accepts. */ -export enum KnownStatus { - /** Installing */ - Installing = "INSTALLING", - /** Installed */ - Installed = "INSTALLED", - /** InstallFailed */ - InstallFailed = "INSTALL_FAILED", - /** Uninstalling */ - Uninstalling = "UNINSTALLING", - /** UninstallFailed */ - UninstallFailed = "UNINSTALL_FAILED", -} - -/** - * Defines values for Status. \ - * {@link KnownStatus} can be used interchangeably with Status, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **INSTALLING** \ - * **INSTALLED** \ - * **INSTALL_FAILED** \ - * **UNINSTALLING** \ - * **UNINSTALL_FAILED** - */ -export type Status = string; - -/** Known values of {@link LibraryManagementAction} that the service accepts. */ -export enum KnownLibraryManagementAction { - /** Install */ - Install = "Install", - /** Uninstall */ - Uninstall = "Uninstall", -} - -/** - * Defines values for LibraryManagementAction. \ - * {@link KnownLibraryManagementAction} can be used interchangeably with LibraryManagementAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Install** \ - * **Uninstall** - */ -export type LibraryManagementAction = 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", - /** LastStateUpdate */ - LastStateUpdate = "LAST_STATE_UPDATE", - /** RELaunch */ - RELaunch = "RE_LAUNCH", -} - -/** - * 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** \ - * **LAST_STATE_UPDATE** \ - * **RE_LAUNCH** - */ -export type Action = string; - -/** Known values of {@link CurrentClusterPoolAksVersionStatus} that the service accepts. */ -export enum KnownCurrentClusterPoolAksVersionStatus { - /** Deprecated */ - Deprecated = "Deprecated", - /** Supported */ - Supported = "Supported", -} - -/** - * Defines values for CurrentClusterPoolAksVersionStatus. \ - * {@link KnownCurrentClusterPoolAksVersionStatus} can be used interchangeably with CurrentClusterPoolAksVersionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Deprecated** \ - * **Supported** - */ -export type CurrentClusterPoolAksVersionStatus = string; - -/** Known values of {@link CurrentClusterAksVersionStatus} that the service accepts. */ -export enum KnownCurrentClusterAksVersionStatus { - /** Deprecated */ - Deprecated = "Deprecated", - /** Supported */ - Supported = "Supported", -} - -/** - * Defines values for CurrentClusterAksVersionStatus. \ - * {@link KnownCurrentClusterAksVersionStatus} can be used interchangeably with CurrentClusterAksVersionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Deprecated** \ - * **Supported** - */ -export type CurrentClusterAksVersionStatus = string; - -/** Known values of {@link Severity} that the service accepts. */ -export enum KnownSeverity { - /** Low */ - Low = "low", - /** Medium */ - Medium = "medium", - /** High */ - High = "high", - /** Critical */ - Critical = "critical", -} - -/** - * Defines values for Severity. \ - * {@link KnownSeverity} can be used interchangeably with Severity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **low** \ - * **medium** \ - * **high** \ - * **critical** - */ -export type Severity = string; - -/** Known values of {@link ClusterUpgradeHistorySeverityType} that the service accepts. */ -export enum KnownClusterUpgradeHistorySeverityType { - /** Low */ - Low = "low", - /** Medium */ - Medium = "medium", - /** High */ - High = "high", - /** Critical */ - Critical = "critical", -} - -/** - * Defines values for ClusterUpgradeHistorySeverityType. \ - * {@link KnownClusterUpgradeHistorySeverityType} can be used interchangeably with ClusterUpgradeHistorySeverityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **low** \ - * **medium** \ - * **high** \ - * **critical** - */ -export type ClusterUpgradeHistorySeverityType = 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 ClusterPoolsUpgradeOptionalParams - 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 upgrade operation. */ -export type ClusterPoolsUpgradeResponse = ClusterPool; - -/** 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 ClusterPoolAvailableUpgradesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClusterPoolAvailableUpgradesListResponse = - ClusterPoolAvailableUpgradeList; - -/** Optional parameters. */ -export interface ClusterPoolAvailableUpgradesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClusterPoolAvailableUpgradesListNextResponse = - ClusterPoolAvailableUpgradeList; - -/** Optional parameters. */ -export interface ClusterPoolUpgradeHistoriesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClusterPoolUpgradeHistoriesListResponse = - ClusterPoolUpgradeHistoryListResult; - -/** Optional parameters. */ -export interface ClusterPoolUpgradeHistoriesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClusterPoolUpgradeHistoriesListNextResponse = - ClusterPoolUpgradeHistoryListResult; - -/** Optional parameters. */ -export interface ClustersListByClusterPoolNameOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByClusterPoolName operation. */ -export type ClustersListByClusterPoolNameResponse = ClusterListResult; - -/** Optional parameters. */ -export interface ClustersUpgradeOptionalParams - 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 upgrade operation. */ -export type ClustersUpgradeResponse = Cluster; - -/** Optional parameters. */ -export interface ClustersUpgradeManualRollbackOptionalParams - 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 upgradeManualRollback operation. */ -export type ClustersUpgradeManualRollbackResponse = Cluster; - -/** 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 ClusterAvailableUpgradesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClusterAvailableUpgradesListResponse = ClusterAvailableUpgradeList; - -/** Optional parameters. */ -export interface ClusterAvailableUpgradesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClusterAvailableUpgradesListNextResponse = - ClusterAvailableUpgradeList; - -/** Optional parameters. */ -export interface ClusterUpgradeHistoriesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClusterUpgradeHistoriesListResponse = - ClusterUpgradeHistoryListResult; - -/** Optional parameters. */ -export interface ClusterUpgradeHistoriesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClusterUpgradeHistoriesListNextResponse = - ClusterUpgradeHistoryListResult; - -/** 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 { - /** The system query option to filter job returned in the response. Allowed value is 'jobName eq {jobName}' or 'jarName eq {jarName}'. */ - filter?: string; -} - -/** 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 ClusterLibrariesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClusterLibrariesListResponse = ClusterLibraryList; - -/** Optional parameters. */ -export interface ClusterLibrariesManageLibrariesOptionalParams - 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 manageLibraries operation. */ -export type ClusterLibrariesManageLibrariesResponse = - ClusterLibrariesManageLibrariesHeaders; - -/** Optional parameters. */ -export interface ClusterLibrariesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClusterLibrariesListNextResponse = ClusterLibraryList; - -/** Optional parameters. */ -export interface HDInsightContainersManagementClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/models/mappers.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/models/mappers.ts deleted file mode 100644 index 27aab9f7e126..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/models/mappers.ts +++ /dev/null @@ -1,5076 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export const ClusterPoolResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolResourceProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - deploymentId: { - serializedName: "deploymentId", - readOnly: true, - type: { - name: "String", - }, - }, - managedResourceGroupName: { - constraints: { - MaxLength: 40, - MinLength: 1, - }, - serializedName: "managedResourceGroupName", - type: { - name: "String", - }, - }, - aksManagedResourceGroupName: { - serializedName: "aksManagedResourceGroupName", - readOnly: true, - type: { - name: "String", - }, - }, - clusterPoolProfile: { - serializedName: "clusterPoolProfile", - type: { - name: "Composite", - className: "ClusterPoolResourcePropertiesClusterPoolProfile", - }, - }, - computeProfile: { - serializedName: "computeProfile", - type: { - name: "Composite", - className: "ClusterPoolResourcePropertiesComputeProfile", - }, - }, - aksClusterProfile: { - serializedName: "aksClusterProfile", - type: { - name: "Composite", - className: "ClusterPoolResourcePropertiesAksClusterProfile", - }, - }, - networkProfile: { - serializedName: "networkProfile", - type: { - name: "Composite", - className: "ClusterPoolResourcePropertiesNetworkProfile", - }, - }, - logAnalyticsProfile: { - serializedName: "logAnalyticsProfile", - type: { - name: "Composite", - className: "ClusterPoolResourcePropertiesLogAnalyticsProfile", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -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", - }, - }, - publicIpTag: { - serializedName: "publicIpTag", - type: { - name: "Composite", - className: "IpTag", - }, - }, - }, - }, -}; - -export const IpTag: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpTag", - modelProperties: { - ipTagType: { - serializedName: "ipTagType", - required: true, - type: { - name: "String", - }, - }, - tag: { - serializedName: "tag", - 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: { - serializedName: "count", - readOnly: true, - type: { - name: "Number", - }, - }, - availabilityZones: { - serializedName: "availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -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", - }, - }, - outboundType: { - defaultValue: "loadBalancer", - serializedName: "outboundType", - type: { - name: "String", - }, - }, - enablePrivateApiServer: { - serializedName: "enablePrivateApiServer", - type: { - name: "Boolean", - }, - }, - apiServerAuthorizedIpRanges: { - serializedName: "apiServerAuthorizedIpRanges", - type: { - name: "Sequence", - element: { - 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 ClusterPoolUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolUpgrade", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterPoolUpgradeProperties", - }, - }, - }, - }, -}; - -export const ClusterPoolUpgradeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolUpgradeProperties", - uberParent: "ClusterPoolUpgradeProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - upgradeType: { - serializedName: "upgradeType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterPoolAvailableUpgradeList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgradeList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgrade", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterPoolAvailableUpgradeProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgradeProperties", - uberParent: "ClusterPoolAvailableUpgradeProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - upgradeType: { - serializedName: "upgradeType", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterPoolUpgradeHistoryListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolUpgradeHistoryListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterPoolUpgradeHistory", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterPoolUpgradeHistoryProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolUpgradeHistoryProperties", - uberParent: "ClusterPoolUpgradeHistoryProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - upgradeType: { - serializedName: "upgradeType", - required: true, - type: { - name: "String", - }, - }, - utcTime: { - serializedName: "utcTime", - required: true, - type: { - name: "String", - }, - }, - upgradeResult: { - serializedName: "upgradeResult", - required: 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 ClusterResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterResourceProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - clusterType: { - constraints: { - Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9]{0,31}$"), - }, - serializedName: "clusterType", - required: true, - type: { - name: "String", - }, - }, - deploymentId: { - serializedName: "deploymentId", - readOnly: true, - type: { - name: "String", - }, - }, - computeProfile: { - serializedName: "computeProfile", - type: { - name: "Composite", - className: "ComputeProfile", - }, - }, - clusterProfile: { - serializedName: "clusterProfile", - type: { - name: "Composite", - className: "ClusterProfile", - }, - }, - status: { - serializedName: "status", - 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", - }, - }, - }, - }, - availabilityZones: { - serializedName: "availabilityZones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -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: 0, - }, - 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", - }, - }, - managedIdentityProfile: { - serializedName: "managedIdentityProfile", - type: { - name: "Composite", - className: "ManagedIdentityProfile", - }, - }, - 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", - }, - }, - clusterAccessProfile: { - serializedName: "clusterAccessProfile", - type: { - name: "Composite", - className: "ClusterAccessProfile", - }, - }, - 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", - }, - }, - rangerPluginProfile: { - serializedName: "rangerPluginProfile", - type: { - name: "Composite", - className: "ClusterRangerPluginProfile", - }, - }, - kafkaProfile: { - serializedName: "kafkaProfile", - type: { - name: "Composite", - className: "KafkaProfile", - }, - }, - 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", - }, - }, - rangerProfile: { - serializedName: "rangerProfile", - type: { - name: "Composite", - className: "RangerProfile", - }, - }, - 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 ManagedIdentityProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentityProfile", - modelProperties: { - identityList: { - serializedName: "identityList", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedIdentitySpec", - }, - }, - }, - }, - }, - }, -}; - -export const ManagedIdentitySpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentitySpec", - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - required: true, - type: { - name: "String", - }, - }, - clientId: { - constraints: { - Pattern: new RegExp( - "^[{(]?[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}[)}]?$", - ), - }, - serializedName: "clientId", - required: true, - type: { - name: "String", - }, - }, - objectId: { - constraints: { - Pattern: new RegExp( - "^[{(]?[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}[)}]?$", - ), - }, - serializedName: "objectId", - required: true, - 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", - }, - }, - privateFqdn: { - serializedName: "privateFqdn", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SshConnectivityEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SshConnectivityEndpoint", - modelProperties: { - endpoint: { - serializedName: "endpoint", - required: true, - type: { - name: "String", - }, - }, - privateSshEndpoint: { - serializedName: "privateSshEndpoint", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterAccessProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterAccessProfile", - modelProperties: { - enableInternalIngress: { - serializedName: "enableInternalIngress", - required: true, - type: { - name: "Boolean", - }, - }, - privateLinkServiceId: { - serializedName: "privateLinkServiceId", - readOnly: 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", - }, - }, - vmSize: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9_\\-]{0,256}$"), - }, - serializedName: "vmSize", - 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 ClusterRangerPluginProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterRangerPluginProfile", - modelProperties: { - enabled: { - defaultValue: false, - serializedName: "enabled", - required: true, - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const KafkaProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KafkaProfile", - modelProperties: { - enableKRaft: { - defaultValue: true, - serializedName: "enableKRaft", - type: { - name: "Boolean", - }, - }, - enablePublicEndpoints: { - defaultValue: false, - serializedName: "enablePublicEndpoints", - type: { - name: "Boolean", - }, - }, - remoteStorageUri: { - constraints: { - Pattern: new RegExp("^(https?|abfss?):\\/\\/[^/]+(?:\\/|$)"), - }, - serializedName: "remoteStorageUri", - type: { - name: "String", - }, - }, - diskStorage: { - serializedName: "diskStorage", - type: { - name: "Composite", - className: "DiskStorageProfile", - }, - }, - connectivityEndpoints: { - serializedName: "connectivityEndpoints", - type: { - name: "Composite", - className: "KafkaConnectivityEndpoints", - }, - }, - }, - }, -}; - -export const DiskStorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiskStorageProfile", - modelProperties: { - dataDiskSize: { - serializedName: "dataDiskSize", - required: true, - type: { - name: "Number", - }, - }, - dataDiskType: { - serializedName: "dataDiskType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KafkaConnectivityEndpoints: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KafkaConnectivityEndpoints", - modelProperties: { - bootstrapServerEndpoint: { - serializedName: "bootstrapServerEndpoint", - type: { - name: "String", - }, - }, - brokerEndpoints: { - serializedName: "brokerEndpoints", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -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", - }, - }, - metastoreDbConnectionAuthenticationMode: { - serializedName: "metastoreDbConnectionAuthenticationMode", - type: { - name: "String", - }, - }, - metastoreDbConnectionPasswordSecret: { - serializedName: "metastoreDbConnectionPasswordSecret", - type: { - name: "String", - }, - }, - metastoreDbConnectionURL: { - serializedName: "metastoreDbConnectionURL", - required: true, - type: { - name: "String", - }, - }, - metastoreDbConnectionUserName: { - serializedName: "metastoreDbConnectionUserName", - type: { - name: "String", - }, - }, - metastoreWarehouseDir: { - serializedName: "metastoreWarehouseDir", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TrinoCoordinator: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrinoCoordinator", - modelProperties: { - debug: { - serializedName: "debug", - type: { - name: "Composite", - className: "TrinoDebugConfig", - }, - }, - highAvailabilityEnabled: { - defaultValue: true, - serializedName: "highAvailabilityEnabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const TrinoDebugConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrinoDebugConfig", - modelProperties: { - enable: { - defaultValue: false, - serializedName: "enable", - type: { - name: "Boolean", - }, - }, - port: { - defaultValue: 8008, - serializedName: "port", - type: { - name: "Number", - }, - }, - suspend: { - defaultValue: false, - serializedName: "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: { - debug: { - serializedName: "debug", - type: { - name: "Composite", - className: "TrinoDebugConfig", - }, - }, - }, - }, -}; - -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", - }, - }, - deploymentMode: { - serializedName: "deploymentMode", - type: { - name: "String", - }, - }, - jobSpec: { - serializedName: "jobSpec", - type: { - name: "Composite", - className: "FlinkJobProfile", - }, - }, - }, - }, -}; - -export const FlinkStorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlinkStorageProfile", - modelProperties: { - storageUri: { - constraints: { - Pattern: new RegExp( - "^(\\w{4,5}):\\/\\/(.*)@(.*).\\b(blob|dfs)\\b.*$", - ), - }, - 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: { - metastoreDbConnectionAuthenticationMode: { - serializedName: "metastoreDbConnectionAuthenticationMode", - type: { - name: "String", - }, - }, - metastoreDbConnectionPasswordSecret: { - serializedName: "metastoreDbConnectionPasswordSecret", - type: { - name: "String", - }, - }, - metastoreDbConnectionURL: { - serializedName: "metastoreDbConnectionURL", - required: true, - type: { - name: "String", - }, - }, - metastoreDbConnectionUserName: { - serializedName: "metastoreDbConnectionUserName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FlinkJobProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FlinkJobProfile", - modelProperties: { - jobJarDirectory: { - serializedName: "jobJarDirectory", - required: true, - type: { - name: "String", - }, - }, - jarName: { - serializedName: "jarName", - required: true, - type: { - name: "String", - }, - }, - entryClass: { - serializedName: "entryClass", - type: { - name: "String", - }, - }, - args: { - serializedName: "args", - type: { - name: "String", - }, - }, - savePointName: { - serializedName: "savePointName", - type: { - name: "String", - }, - }, - upgradeMode: { - serializedName: "upgradeMode", - 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", - required: true, - type: { - name: "String", - }, - }, - dbConnectionAuthenticationMode: { - defaultValue: "IdentityAuth", - serializedName: "dbConnectionAuthenticationMode", - type: { - name: "String", - }, - }, - dbUserName: { - serializedName: "dbUserName", - type: { - name: "String", - }, - }, - dbPasswordSecretName: { - serializedName: "dbPasswordSecretName", - type: { - name: "String", - }, - }, - keyVaultId: { - serializedName: "keyVaultId", - 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 RangerProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RangerProfile", - modelProperties: { - rangerAdmin: { - serializedName: "rangerAdmin", - type: { - name: "Composite", - className: "RangerAdminSpec", - }, - }, - rangerAudit: { - serializedName: "rangerAudit", - type: { - name: "Composite", - className: "RangerAuditSpec", - }, - }, - rangerUsersync: { - serializedName: "rangerUsersync", - type: { - name: "Composite", - className: "RangerUsersyncSpec", - }, - }, - }, - }, -}; - -export const RangerAdminSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RangerAdminSpec", - modelProperties: { - admins: { - serializedName: "admins", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - database: { - serializedName: "database", - type: { - name: "Composite", - className: "RangerAdminSpecDatabase", - }, - }, - }, - }, -}; - -export const RangerAdminSpecDatabase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RangerAdminSpecDatabase", - modelProperties: { - host: { - serializedName: "host", - required: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - passwordSecretRef: { - serializedName: "passwordSecretRef", - type: { - name: "String", - }, - }, - username: { - serializedName: "username", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RangerAuditSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RangerAuditSpec", - modelProperties: { - storageAccount: { - constraints: { - Pattern: new RegExp("^(https)|(abfss):\\/\\/.*$"), - MinLength: 1, - }, - serializedName: "storageAccount", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RangerUsersyncSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RangerUsersyncSpec", - modelProperties: { - enabled: { - defaultValue: true, - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - groups: { - serializedName: "groups", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - mode: { - defaultValue: "automatic", - serializedName: "mode", - type: { - name: "String", - }, - }, - userMappingLocation: { - constraints: { - Pattern: new RegExp("^(https)|(abfss):\\/\\/.*$"), - MinLength: 1, - }, - serializedName: "userMappingLocation", - type: { - name: "String", - }, - }, - users: { - serializedName: "users", - type: { - name: "Sequence", - element: { - 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):\\/\\/.*$"), - }, - 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 ClusterUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgrade", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterUpgradeProperties", - }, - }, - }, - }, -}; - -export const ClusterUpgradeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeProperties", - uberParent: "ClusterUpgradeProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - upgradeType: { - serializedName: "upgradeType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterAvailableUpgradeList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterAvailableUpgradeList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterAvailableUpgrade", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterAvailableUpgradeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterAvailableUpgradeProperties", - uberParent: "ClusterAvailableUpgradeProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - upgradeType: { - serializedName: "upgradeType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterUpgradeHistoryListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeHistoryListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterUpgradeHistory", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterUpgradeHistoryProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeHistoryProperties", - uberParent: "ClusterUpgradeHistoryProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - upgradeType: { - serializedName: "upgradeType", - required: true, - type: { - name: "String", - }, - }, - utcTime: { - serializedName: "utcTime", - required: true, - type: { - name: "String", - }, - }, - upgradeResult: { - serializedName: "upgradeResult", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterUpgradeRollback: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeRollback", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterUpgradeRollbackProperties", - }, - }, - }, - }, -}; - -export const ClusterUpgradeRollbackProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeRollbackProperties", - modelProperties: { - upgradeHistory: { - serializedName: "upgradeHistory", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterResizeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterResizeProperties", - modelProperties: { - targetWorkerNodeCount: { - serializedName: "targetWorkerNodeCount", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ClusterPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPatch", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterPatchProperties", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ClusterPatchProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPatchProperties", - modelProperties: { - clusterProfile: { - serializedName: "clusterProfile", - type: { - name: "Composite", - className: "UpdatableClusterProfile", - }, - }, - }, - }, -}; - -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", - }, - }, - rangerPluginProfile: { - serializedName: "rangerPluginProfile", - type: { - name: "Composite", - className: "ClusterRangerPluginProfile", - }, - }, - rangerProfile: { - serializedName: "rangerProfile", - type: { - name: "Composite", - className: "RangerProfile", - }, - }, - scriptActionProfiles: { - serializedName: "scriptActionProfiles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScriptActionProfile", - }, - }, - }, - }, - secretsProfile: { - serializedName: "secretsProfile", - type: { - name: "Composite", - className: "SecretsProfile", - }, - }, - trinoProfile: { - serializedName: "trinoProfile", - type: { - name: "Composite", - className: "TrinoProfile", - }, - }, - }, - }, -}; - -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: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ServiceConfigResultProperties", - }, - }, - }, - }, -}; - -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", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterInstanceViewResultProperties", - }, - }, - }, - }, -}; - -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 ClusterPoolVersionProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolVersionProperties", - modelProperties: { - clusterPoolVersion: { - constraints: { - Pattern: new RegExp("^(0|[1-9][0-9]{0,18})\\.(0|[1-9][0-9]{0,18})$"), - }, - serializedName: "clusterPoolVersion", - type: { - name: "String", - }, - }, - aksVersion: { - serializedName: "aksVersion", - type: { - name: "String", - }, - }, - isPreview: { - defaultValue: false, - serializedName: "isPreview", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -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 ClusterVersionProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterVersionProperties", - modelProperties: { - clusterType: { - constraints: { - Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9]{0,31}$"), - }, - serializedName: "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: "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: "ossVersion", - type: { - name: "String", - }, - }, - clusterPoolVersion: { - serializedName: "clusterPoolVersion", - type: { - name: "String", - }, - }, - isPreview: { - defaultValue: false, - serializedName: "isPreview", - type: { - name: "Boolean", - }, - }, - components: { - serializedName: "components", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterComponentsItem", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterLibraryList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterLibraryList", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterLibrary", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterLibraryProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterLibraryProperties", - uberParent: "ClusterLibraryProperties", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type", - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - remarks: { - serializedName: "remarks", - type: { - name: "String", - }, - }, - timestamp: { - serializedName: "timestamp", - readOnly: true, - type: { - name: "DateTime", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterLibraryManagementOperationProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ClusterLibraryManagementOperationProperties", - modelProperties: { - action: { - serializedName: "action", - required: true, - type: { - name: "String", - }, - }, - libraries: { - serializedName: "libraries", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterLibrary", - }, - }, - }, - }, - }, - }, - }; - -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 ClusterPoolAKSPatchVersionUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "AKSPatchUpgrade", - type: { - name: "Composite", - className: "ClusterPoolAKSPatchVersionUpgradeProperties", - uberParent: "ClusterPoolUpgradeProperties", - polymorphicDiscriminator: - ClusterPoolUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterPoolUpgradeProperties.type.modelProperties, - upgradeClusterPool: { - defaultValue: false, - serializedName: "upgradeClusterPool", - type: { - name: "Boolean", - }, - }, - upgradeAllClusterNodes: { - defaultValue: false, - serializedName: "upgradeAllClusterNodes", - type: { - name: "Boolean", - }, - }, - targetAksVersion: { - serializedName: "targetAksVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterPoolNodeOsImageUpdateProperties: coreClient.CompositeMapper = - { - serializedName: "NodeOsUpgrade", - type: { - name: "Composite", - className: "ClusterPoolNodeOsImageUpdateProperties", - uberParent: "ClusterPoolUpgradeProperties", - polymorphicDiscriminator: - ClusterPoolUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterPoolUpgradeProperties.type.modelProperties, - }, - }, - }; - -export const ClusterPoolAvailableUpgradeAksPatchUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "AKSPatchUpgrade", - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgradeAksPatchUpgradeProperties", - uberParent: "ClusterPoolAvailableUpgradeProperties", - polymorphicDiscriminator: - ClusterPoolAvailableUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterPoolAvailableUpgradeProperties.type.modelProperties, - currentVersion: { - serializedName: "currentVersion", - type: { - name: "String", - }, - }, - currentVersionStatus: { - serializedName: "currentVersionStatus", - type: { - name: "String", - }, - }, - latestVersion: { - serializedName: "latestVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterPoolAvailableUpgradeNodeOsUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "NodeOsUpgrade", - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgradeNodeOsUpgradeProperties", - uberParent: "ClusterPoolAvailableUpgradeProperties", - polymorphicDiscriminator: - ClusterPoolAvailableUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterPoolAvailableUpgradeProperties.type.modelProperties, - latestVersion: { - serializedName: "latestVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterPoolNodeOsUpgradeHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "NodeOsUpgrade", - type: { - name: "Composite", - className: "ClusterPoolNodeOsUpgradeHistoryProperties", - uberParent: "ClusterPoolUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterPoolUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterPoolUpgradeHistoryProperties.type.modelProperties, - newNodeOs: { - serializedName: "newNodeOs", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterPoolAksPatchUpgradeHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "AKSPatchUpgrade", - type: { - name: "Composite", - className: "ClusterPoolAksPatchUpgradeHistoryProperties", - uberParent: "ClusterPoolUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterPoolUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterPoolUpgradeHistoryProperties.type.modelProperties, - upgradeClusterPool: { - serializedName: "upgradeClusterPool", - type: { - name: "Boolean", - }, - }, - upgradeAllClusterNodes: { - serializedName: "upgradeAllClusterNodes", - type: { - name: "Boolean", - }, - }, - originalVersion: { - serializedName: "originalVersion", - type: { - name: "String", - }, - }, - newVersion: { - serializedName: "newVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ConnectivityProfileWeb: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectivityProfileWeb", - modelProperties: { - ...WebConnectivityEndpoint.type.modelProperties, - }, - }, -}; - -export const ClusterAKSPatchVersionUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "AKSPatchUpgrade", - type: { - name: "Composite", - className: "ClusterAKSPatchVersionUpgradeProperties", - uberParent: "ClusterUpgradeProperties", - polymorphicDiscriminator: - ClusterUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterUpgradeProperties.type.modelProperties, - }, - }, - }; - -export const ClusterInPlaceUpgradeProperties: coreClient.CompositeMapper = { - serializedName: "ClusterInPlaceUpgradeProperties", - type: { - name: "Composite", - className: "ClusterInPlaceUpgradeProperties", - uberParent: "ClusterUpgradeProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - ...ClusterUpgradeProperties.type.modelProperties, - targetOssVersion: { - serializedName: "targetOssVersion", - type: { - name: "String", - }, - }, - targetClusterVersion: { - serializedName: "targetClusterVersion", - type: { - name: "String", - }, - }, - targetBuildNumber: { - serializedName: "targetBuildNumber", - type: { - name: "String", - }, - }, - componentName: { - serializedName: "componentName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterAvailableUpgradeAksPatchUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "AKSPatchUpgrade", - type: { - name: "Composite", - className: "ClusterAvailableUpgradeAksPatchUpgradeProperties", - uberParent: "ClusterAvailableUpgradeProperties", - polymorphicDiscriminator: - ClusterAvailableUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterAvailableUpgradeProperties.type.modelProperties, - currentVersion: { - serializedName: "currentVersion", - type: { - name: "String", - }, - }, - currentVersionStatus: { - serializedName: "currentVersionStatus", - type: { - name: "String", - }, - }, - latestVersion: { - serializedName: "latestVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterAvailableInPlaceUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "ClusterAvailableInPlaceUpgradeProperties", - type: { - name: "Composite", - className: "ClusterAvailableInPlaceUpgradeProperties", - uberParent: "ClusterAvailableUpgradeProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - ...ClusterAvailableUpgradeProperties.type.modelProperties, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - sourceOssVersion: { - serializedName: "sourceOssVersion", - type: { - name: "String", - }, - }, - sourceClusterVersion: { - serializedName: "sourceClusterVersion", - type: { - name: "String", - }, - }, - sourceBuildNumber: { - serializedName: "sourceBuildNumber", - type: { - name: "String", - }, - }, - targetOssVersion: { - serializedName: "targetOssVersion", - type: { - name: "String", - }, - }, - targetClusterVersion: { - serializedName: "targetClusterVersion", - type: { - name: "String", - }, - }, - targetBuildNumber: { - serializedName: "targetBuildNumber", - type: { - name: "String", - }, - }, - componentName: { - serializedName: "componentName", - type: { - name: "String", - }, - }, - severity: { - serializedName: "severity", - type: { - name: "String", - }, - }, - extendedProperties: { - serializedName: "extendedProperties", - type: { - name: "String", - }, - }, - createdTime: { - serializedName: "createdTime", - type: { - name: "DateTime", - }, - }, - }, - }, - }; - -export const ClusterInPlaceUpgradeHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "ClusterInPlaceUpgradeHistoryProperties", - type: { - name: "Composite", - className: "ClusterInPlaceUpgradeHistoryProperties", - uberParent: "ClusterUpgradeHistoryProperties", - polymorphicDiscriminator: { - serializedName: "upgradeType", - clientName: "upgradeType", - }, - modelProperties: { - ...ClusterUpgradeHistoryProperties.type.modelProperties, - sourceClusterVersion: { - 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: "sourceClusterVersion", - type: { - name: "String", - }, - }, - sourceOssVersion: { - 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: "sourceOssVersion", - type: { - name: "String", - }, - }, - sourceBuildNumber: { - serializedName: "sourceBuildNumber", - type: { - name: "String", - }, - }, - targetClusterVersion: { - 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: "targetClusterVersion", - type: { - name: "String", - }, - }, - targetOssVersion: { - 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: "targetOssVersion", - type: { - name: "String", - }, - }, - targetBuildNumber: { - serializedName: "targetBuildNumber", - type: { - name: "String", - }, - }, - componentName: { - serializedName: "componentName", - type: { - name: "String", - }, - }, - severity: { - serializedName: "severity", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ClusterAksPatchUpgradeHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "AKSPatchUpgrade", - type: { - name: "Composite", - className: "ClusterAksPatchUpgradeHistoryProperties", - uberParent: "ClusterUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterUpgradeHistoryProperties.type.modelProperties, - originalVersion: { - serializedName: "originalVersion", - type: { - name: "String", - }, - }, - newVersion: { - serializedName: "newVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const FlinkJobProperties: coreClient.CompositeMapper = { - serializedName: "FlinkJob", - type: { - name: "Composite", - className: "FlinkJobProperties", - uberParent: "ClusterJobProperties", - polymorphicDiscriminator: - ClusterJobProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterJobProperties.type.modelProperties, - runId: { - serializedName: "runId", - type: { - name: "String", - }, - }, - jobName: { - serializedName: "jobName", - 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 PyPiLibraryProperties: coreClient.CompositeMapper = { - serializedName: "pypi", - type: { - name: "Composite", - className: "PyPiLibraryProperties", - uberParent: "ClusterLibraryProperties", - polymorphicDiscriminator: - ClusterLibraryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterLibraryProperties.type.modelProperties, - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MavenLibraryProperties: coreClient.CompositeMapper = { - serializedName: "maven", - type: { - name: "Composite", - className: "MavenLibraryProperties", - uberParent: "ClusterLibraryProperties", - polymorphicDiscriminator: - ClusterLibraryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterLibraryProperties.type.modelProperties, - groupId: { - serializedName: "groupId", - required: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterPool: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPool", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterPoolResourceProperties", - }, - }, - }, - }, -}; - -export const Cluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Cluster", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterResourceProperties", - }, - }, - }, - }, -}; - -export const ClusterResizeData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterResizeData", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterResizeProperties", - }, - }, - }, - }, -}; - -export const ClusterPoolAvailableUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgrade", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterPoolAvailableUpgradeProperties", - }, - }, - }, - }, -}; - -export const ClusterPoolUpgradeHistory: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolUpgradeHistory", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterPoolUpgradeHistoryProperties", - }, - }, - }, - }, -}; - -export const ClusterAvailableUpgrade: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterAvailableUpgrade", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterAvailableUpgradeProperties", - }, - }, - }, - }, -}; - -export const ClusterUpgradeHistory: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeHistory", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterUpgradeHistoryProperties", - }, - }, - }, - }, -}; - -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, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterPoolVersionProperties", - }, - }, - }, - }, -}; - -export const ClusterVersion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterVersion", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterVersionProperties", - }, - }, - }, - }, -}; - -export const ClusterLibrary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterLibrary", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterLibraryProperties", - }, - }, - }, - }, -}; - -export const ClusterLibraryManagementOperation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterLibraryManagementOperation", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterLibraryManagementOperationProperties", - }, - }, - }, - }, -}; - -export const ClusterHotfixUpgradeProperties: coreClient.CompositeMapper = { - serializedName: "HotfixUpgrade", - type: { - name: "Composite", - className: "ClusterHotfixUpgradeProperties", - uberParent: "ClusterInPlaceUpgradeProperties", - polymorphicDiscriminator: - ClusterInPlaceUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterInPlaceUpgradeProperties.type.modelProperties, - }, - }, -}; - -export const ClusterPatchVersionUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "PatchVersionUpgrade", - type: { - name: "Composite", - className: "ClusterPatchVersionUpgradeProperties", - uberParent: "ClusterInPlaceUpgradeProperties", - polymorphicDiscriminator: - ClusterInPlaceUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterInPlaceUpgradeProperties.type.modelProperties, - }, - }, - }; - -export const ClusterAvailableUpgradeHotfixUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "HotfixUpgrade", - type: { - name: "Composite", - className: "ClusterAvailableUpgradeHotfixUpgradeProperties", - uberParent: "ClusterAvailableInPlaceUpgradeProperties", - polymorphicDiscriminator: - ClusterAvailableInPlaceUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterAvailableInPlaceUpgradeProperties.type.modelProperties, - }, - }, - }; - -export const ClusterAvailableUpgradePatchVersionUpgradeProperties: coreClient.CompositeMapper = - { - serializedName: "PatchVersionUpgrade", - type: { - name: "Composite", - className: "ClusterAvailableUpgradePatchVersionUpgradeProperties", - uberParent: "ClusterAvailableInPlaceUpgradeProperties", - polymorphicDiscriminator: - ClusterAvailableInPlaceUpgradeProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterAvailableInPlaceUpgradeProperties.type.modelProperties, - }, - }, - }; - -export const ClusterHotfixUpgradeHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "HotfixUpgrade", - type: { - name: "Composite", - className: "ClusterHotfixUpgradeHistoryProperties", - uberParent: "ClusterInPlaceUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterInPlaceUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterInPlaceUpgradeHistoryProperties.type.modelProperties, - }, - }, - }; - -export const ClusterHotfixUpgradeRollbackHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "HotfixUpgradeRollback", - type: { - name: "Composite", - className: "ClusterHotfixUpgradeRollbackHistoryProperties", - uberParent: "ClusterInPlaceUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterInPlaceUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterInPlaceUpgradeHistoryProperties.type.modelProperties, - }, - }, - }; - -export const ClusterPatchVersionUpgradeHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "PatchVersionUpgrade", - type: { - name: "Composite", - className: "ClusterPatchVersionUpgradeHistoryProperties", - uberParent: "ClusterInPlaceUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterInPlaceUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterInPlaceUpgradeHistoryProperties.type.modelProperties, - }, - }, - }; - -export const ClusterPatchVersionUpgradeRollbackHistoryProperties: coreClient.CompositeMapper = - { - serializedName: "PatchVersionUpgradeRollback", - type: { - name: "Composite", - className: "ClusterPatchVersionUpgradeRollbackHistoryProperties", - uberParent: "ClusterInPlaceUpgradeHistoryProperties", - polymorphicDiscriminator: - ClusterInPlaceUpgradeHistoryProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ClusterInPlaceUpgradeHistoryProperties.type.modelProperties, - }, - }, - }; - -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 ClusterPoolsUpgradeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPoolsUpgradeHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersUpgradeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClustersUpgradeHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClustersUpgradeManualRollbackHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ClustersUpgradeManualRollbackHeaders", - 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 const ClusterLibrariesManageLibrariesHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ClusterLibrariesManageLibrariesHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export let discriminators = { - ClusterPoolUpgradeProperties: ClusterPoolUpgradeProperties, - ClusterPoolAvailableUpgradeProperties: ClusterPoolAvailableUpgradeProperties, - ClusterPoolUpgradeHistoryProperties: ClusterPoolUpgradeHistoryProperties, - ClusterUpgradeProperties: ClusterUpgradeProperties, - ClusterAvailableUpgradeProperties: ClusterAvailableUpgradeProperties, - ClusterUpgradeHistoryProperties: ClusterUpgradeHistoryProperties, - ClusterJobProperties: ClusterJobProperties, - ClusterLibraryProperties: ClusterLibraryProperties, - "ClusterPoolUpgradeProperties.AKSPatchUpgrade": - ClusterPoolAKSPatchVersionUpgradeProperties, - "ClusterPoolUpgradeProperties.NodeOsUpgrade": - ClusterPoolNodeOsImageUpdateProperties, - "ClusterPoolAvailableUpgradeProperties.AKSPatchUpgrade": - ClusterPoolAvailableUpgradeAksPatchUpgradeProperties, - "ClusterPoolAvailableUpgradeProperties.NodeOsUpgrade": - ClusterPoolAvailableUpgradeNodeOsUpgradeProperties, - "ClusterPoolUpgradeHistoryProperties.NodeOsUpgrade": - ClusterPoolNodeOsUpgradeHistoryProperties, - "ClusterPoolUpgradeHistoryProperties.AKSPatchUpgrade": - ClusterPoolAksPatchUpgradeHistoryProperties, - "ClusterUpgradeProperties.AKSPatchUpgrade": - ClusterAKSPatchVersionUpgradeProperties, - "ClusterUpgradeProperties.ClusterInPlaceUpgradeProperties": - ClusterInPlaceUpgradeProperties, - "ClusterAvailableUpgradeProperties.AKSPatchUpgrade": - ClusterAvailableUpgradeAksPatchUpgradeProperties, - "ClusterAvailableUpgradeProperties.ClusterAvailableInPlaceUpgradeProperties": - ClusterAvailableInPlaceUpgradeProperties, - "ClusterUpgradeHistoryProperties.ClusterInPlaceUpgradeHistoryProperties": - ClusterInPlaceUpgradeHistoryProperties, - "ClusterUpgradeHistoryProperties.AKSPatchUpgrade": - ClusterAksPatchUpgradeHistoryProperties, - "ClusterJobProperties.FlinkJob": FlinkJobProperties, - "ClusterLibraryProperties.pypi": PyPiLibraryProperties, - "ClusterLibraryProperties.maven": MavenLibraryProperties, - "ClusterInPlaceUpgradeProperties.HotfixUpgrade": - ClusterHotfixUpgradeProperties, - "ClusterInPlaceUpgradeProperties.PatchVersionUpgrade": - ClusterPatchVersionUpgradeProperties, - "ClusterAvailableInPlaceUpgradeProperties.HotfixUpgrade": - ClusterAvailableUpgradeHotfixUpgradeProperties, - "ClusterAvailableInPlaceUpgradeProperties.PatchVersionUpgrade": - ClusterAvailableUpgradePatchVersionUpgradeProperties, - "ClusterInPlaceUpgradeHistoryProperties.HotfixUpgrade": - ClusterHotfixUpgradeHistoryProperties, - "ClusterInPlaceUpgradeHistoryProperties.HotfixUpgradeRollback": - ClusterHotfixUpgradeRollbackHistoryProperties, - "ClusterInPlaceUpgradeHistoryProperties.PatchVersionUpgrade": - ClusterPatchVersionUpgradeHistoryProperties, - "ClusterInPlaceUpgradeHistoryProperties.PatchVersionUpgradeRollback": - ClusterPatchVersionUpgradeRollbackHistoryProperties, -}; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/models/parameters.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/models/parameters.ts deleted file mode 100644 index 0c407529617b..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/models/parameters.ts +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - ClusterPool as ClusterPoolMapper, - TagsObject as TagsObjectMapper, - ClusterPoolUpgrade as ClusterPoolUpgradeMapper, - ClusterUpgrade as ClusterUpgradeMapper, - ClusterUpgradeRollback as ClusterUpgradeRollbackMapper, - ClusterResizeData as ClusterResizeDataMapper, - Cluster as ClusterMapper, - ClusterPatch as ClusterPatchMapper, - ClusterJob as ClusterJobMapper, - NameAvailabilityParameters as NameAvailabilityParametersMapper, - ClusterLibraryManagementOperation as ClusterLibraryManagementOperationMapper, -} from "../models/mappers.js"; - -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: "2024-05-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 clusterPoolUpgradeRequest: OperationParameter = { - parameterPath: "clusterPoolUpgradeRequest", - mapper: ClusterPoolUpgradeMapper, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const clusterUpgradeRequest: OperationParameter = { - parameterPath: "clusterUpgradeRequest", - mapper: ClusterUpgradeMapper, -}; - -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", - mapper: { - serializedName: "clusterName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const clusterRollbackUpgradeRequest: OperationParameter = { - parameterPath: "clusterRollbackUpgradeRequest", - mapper: ClusterUpgradeRollbackMapper, -}; - -export const clusterResizeRequest: OperationParameter = { - parameterPath: "clusterResizeRequest", - mapper: ClusterResizeDataMapper, -}; - -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 filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - type: { - name: "String", - }, - }, -}; - -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", - }, - }, -}; - -export const category: OperationQueryParameter = { - parameterPath: "category", - mapper: { - serializedName: "$category", - required: true, - type: { - name: "String", - }, - }, -}; - -export const operation: OperationParameter = { - parameterPath: "operation", - mapper: ClusterLibraryManagementOperationMapper, -}; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/availableClusterPoolVersions.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/availableClusterPoolVersions.ts deleted file mode 100644 index c8b9ed0898e9..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/availableClusterPoolVersions.ts +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AvailableClusterPoolVersions } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - ClusterPoolVersion, - AvailableClusterPoolVersionsListByLocationNextOptionalParams, - AvailableClusterPoolVersionsListByLocationOptionalParams, - AvailableClusterPoolVersionsListByLocationResponse, - AvailableClusterPoolVersionsListByLocationNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailableClusterPoolVersions operations. */ -export class AvailableClusterPoolVersionsImpl - implements AvailableClusterPoolVersions -{ - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class AvailableClusterPoolVersions class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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-hdinsightcontainers/src/operations/availableClusterVersions.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/availableClusterVersions.ts deleted file mode 100644 index ac1c700e7276..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/availableClusterVersions.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AvailableClusterVersions } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - ClusterVersion, - AvailableClusterVersionsListByLocationNextOptionalParams, - AvailableClusterVersionsListByLocationOptionalParams, - AvailableClusterVersionsListByLocationResponse, - AvailableClusterVersionsListByLocationNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AvailableClusterVersions operations. */ -export class AvailableClusterVersionsImpl implements AvailableClusterVersions { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class AvailableClusterVersions class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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-hdinsightcontainers/src/operations/clusterAvailableUpgrades.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterAvailableUpgrades.ts deleted file mode 100644 index 262c05014e93..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterAvailableUpgrades.ts +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterAvailableUpgrades } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - ClusterAvailableUpgrade, - ClusterAvailableUpgradesListNextOptionalParams, - ClusterAvailableUpgradesListOptionalParams, - ClusterAvailableUpgradesListResponse, - ClusterAvailableUpgradesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterAvailableUpgrades operations. */ -export class ClusterAvailableUpgradesImpl implements ClusterAvailableUpgrades { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterAvailableUpgrades class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - this.client = client; - } - - /** - * List a cluster available upgrade. - * @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?: ClusterAvailableUpgradesListOptionalParams, - ): 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?: ClusterAvailableUpgradesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterAvailableUpgradesListResponse; - 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?: ClusterAvailableUpgradesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterPoolName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * List a cluster available upgrade. - * @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?: ClusterAvailableUpgradesListOptionalParams, - ): 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?: ClusterAvailableUpgradesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/availableUpgrades", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterAvailableUpgradeList, - }, - 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.ClusterAvailableUpgradeList, - }, - 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-hdinsightcontainers/src/operations/clusterJobs.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterJobs.ts deleted file mode 100644 index aa686ff1f780..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterJobs.ts +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterJobs } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ClusterJob, - ClusterJobsListNextOptionalParams, - ClusterJobsListOptionalParams, - ClusterJobsListResponse, - ClusterJobsRunJobOptionalParams, - ClusterJobsRunJobResponse, - ClusterJobsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterJobs operations. */ -export class ClusterJobsImpl implements ClusterJobs { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterJobs class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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, Parameters.filter], - 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-hdinsightcontainers/src/operations/clusterLibraries.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterLibraries.ts deleted file mode 100644 index ce3672e6cbe4..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterLibraries.ts +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterLibraries } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ClusterLibrary, - ClusterLibrariesListNextOptionalParams, - Category, - ClusterLibrariesListOptionalParams, - ClusterLibrariesListResponse, - ClusterLibraryManagementOperation, - ClusterLibrariesManageLibrariesOptionalParams, - ClusterLibrariesManageLibrariesResponse, - ClusterLibrariesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterLibraries operations. */ -export class ClusterLibrariesImpl implements ClusterLibraries { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterLibraries class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - this.client = client; - } - - /** - * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value - * is 'custom' or 'predefined'. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - category: Category, - options?: ClusterLibrariesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - clusterPoolName, - clusterName, - category, - 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, - category, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - category: Category, - options?: ClusterLibrariesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterLibrariesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - clusterPoolName, - clusterName, - category, - 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, - category: Category, - options?: ClusterLibrariesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterPoolName, - clusterName, - category, - options, - )) { - yield* page; - } - } - - /** - * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value - * is 'custom' or 'predefined'. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - category: Category, - options?: ClusterLibrariesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, clusterName, category, options }, - listOperationSpec, - ); - } - - /** - * Library management operations on 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 operation The library management operation. - * @param options The options parameters. - */ - async beginManageLibraries( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - operation: ClusterLibraryManagementOperation, - options?: ClusterLibrariesManageLibrariesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClusterLibrariesManageLibrariesResponse - > - > { - 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, - operation, - options, - }, - spec: manageLibrariesOperationSpec, - }); - const poller = await createHttpPoller< - ClusterLibrariesManageLibrariesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Library management operations on 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 operation The library management operation. - * @param options The options parameters. - */ - async beginManageLibrariesAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - operation: ClusterLibraryManagementOperation, - options?: ClusterLibrariesManageLibrariesOptionalParams, - ): Promise { - const poller = await this.beginManageLibraries( - resourceGroupName, - clusterPoolName, - clusterName, - operation, - options, - ); - return poller.pollUntilDone(); - } - - /** - * 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?: ClusterLibrariesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/libraries", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterLibraryList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.category], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const manageLibrariesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/manageLibraries", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ClusterLibrariesManageLibrariesHeaders, - }, - 201: { - headersMapper: Mappers.ClusterLibrariesManageLibrariesHeaders, - }, - 202: { - headersMapper: Mappers.ClusterLibrariesManageLibrariesHeaders, - }, - 204: { - headersMapper: Mappers.ClusterLibrariesManageLibrariesHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.operation, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterLibraryList, - }, - 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-hdinsightcontainers/src/operations/clusterPoolAvailableUpgrades.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPoolAvailableUpgrades.ts deleted file mode 100644 index 0f02e447867e..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPoolAvailableUpgrades.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterPoolAvailableUpgrades } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - ClusterPoolAvailableUpgrade, - ClusterPoolAvailableUpgradesListNextOptionalParams, - ClusterPoolAvailableUpgradesListOptionalParams, - ClusterPoolAvailableUpgradesListResponse, - ClusterPoolAvailableUpgradesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterPoolAvailableUpgrades operations. */ -export class ClusterPoolAvailableUpgradesImpl - implements ClusterPoolAvailableUpgrades -{ - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterPoolAvailableUpgrades class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - this.client = client; - } - - /** - * List a cluster pool available upgrade. - * @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 list( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolAvailableUpgradesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - 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.listPagingPage( - resourceGroupName, - clusterPoolName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolAvailableUpgradesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterPoolAvailableUpgradesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, clusterPoolName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterPoolName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolAvailableUpgradesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterPoolName, - options, - )) { - yield* page; - } - } - - /** - * List a cluster pool available upgrade. - * @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 _list( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolAvailableUpgradesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, 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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterPoolName: string, - nextLink: string, - options?: ClusterPoolAvailableUpgradesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/availableUpgrades", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterPoolAvailableUpgradeList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterPoolAvailableUpgradeList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPoolUpgradeHistories.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPoolUpgradeHistories.ts deleted file mode 100644 index 22efe1bdbadb..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPoolUpgradeHistories.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterPoolUpgradeHistories } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - ClusterPoolUpgradeHistory, - ClusterPoolUpgradeHistoriesListNextOptionalParams, - ClusterPoolUpgradeHistoriesListOptionalParams, - ClusterPoolUpgradeHistoriesListResponse, - ClusterPoolUpgradeHistoriesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterPoolUpgradeHistories operations. */ -export class ClusterPoolUpgradeHistoriesImpl - implements ClusterPoolUpgradeHistories -{ - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterPoolUpgradeHistories class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - this.client = client; - } - - /** - * Returns a list of upgrade history. - * @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 list( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolUpgradeHistoriesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - 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.listPagingPage( - resourceGroupName, - clusterPoolName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolUpgradeHistoriesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterPoolUpgradeHistoriesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, clusterPoolName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterPoolName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolUpgradeHistoriesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterPoolName, - options, - )) { - yield* page; - } - } - - /** - * Returns a list of upgrade history. - * @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 _list( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolUpgradeHistoriesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, 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 nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterPoolName: string, - nextLink: string, - options?: ClusterPoolUpgradeHistoriesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/upgradeHistories", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterPoolUpgradeHistoryListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterPoolUpgradeHistoryListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPools.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPools.ts deleted file mode 100644 index a6cd8033797e..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterPools.ts +++ /dev/null @@ -1,845 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterPools } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ClusterPool, - ClusterPoolsListBySubscriptionNextOptionalParams, - ClusterPoolsListBySubscriptionOptionalParams, - ClusterPoolsListBySubscriptionResponse, - ClusterPoolsListByResourceGroupNextOptionalParams, - ClusterPoolsListByResourceGroupOptionalParams, - ClusterPoolsListByResourceGroupResponse, - ClusterPoolsGetOptionalParams, - ClusterPoolsGetResponse, - ClusterPoolsCreateOrUpdateOptionalParams, - ClusterPoolsCreateOrUpdateResponse, - TagsObject, - ClusterPoolsUpdateTagsOptionalParams, - ClusterPoolsUpdateTagsResponse, - ClusterPoolsDeleteOptionalParams, - ClusterPoolUpgrade, - ClusterPoolsUpgradeOptionalParams, - ClusterPoolsUpgradeResponse, - ClusterPoolsListBySubscriptionNextResponse, - ClusterPoolsListByResourceGroupNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterPools operations. */ -export class ClusterPoolsImpl implements ClusterPools { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterPools class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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, - ); - } - - /** - * Upgrade 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 clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param options The options parameters. - */ - async beginUpgrade( - resourceGroupName: string, - clusterPoolName: string, - clusterPoolUpgradeRequest: ClusterPoolUpgrade, - options?: ClusterPoolsUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClusterPoolsUpgradeResponse - > - > { - 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, - clusterPoolUpgradeRequest, - options, - }, - spec: upgradeOperationSpec, - }); - const poller = await createHttpPoller< - ClusterPoolsUpgradeResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Upgrade 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 clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param options The options parameters. - */ - async beginUpgradeAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterPoolUpgradeRequest: ClusterPoolUpgrade, - options?: ClusterPoolsUpgradeOptionalParams, - ): Promise { - const poller = await this.beginUpgrade( - resourceGroupName, - clusterPoolName, - clusterPoolUpgradeRequest, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: 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 upgradeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/upgrade", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClusterPool, - }, - 201: { - bodyMapper: Mappers.ClusterPool, - }, - 202: { - bodyMapper: Mappers.ClusterPool, - }, - 204: { - bodyMapper: Mappers.ClusterPool, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.clusterPoolUpgradeRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - 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-hdinsightcontainers/src/operations/clusterUpgradeHistories.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterUpgradeHistories.ts deleted file mode 100644 index 0118b24be412..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusterUpgradeHistories.ts +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ClusterUpgradeHistories } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - ClusterUpgradeHistory, - ClusterUpgradeHistoriesListNextOptionalParams, - ClusterUpgradeHistoriesListOptionalParams, - ClusterUpgradeHistoriesListResponse, - ClusterUpgradeHistoriesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ClusterUpgradeHistories operations. */ -export class ClusterUpgradeHistoriesImpl implements ClusterUpgradeHistories { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class ClusterUpgradeHistories class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - this.client = client; - } - - /** - * Returns a list of upgrade history. - * @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?: ClusterUpgradeHistoriesListOptionalParams, - ): 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?: ClusterUpgradeHistoriesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ClusterUpgradeHistoriesListResponse; - 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?: ClusterUpgradeHistoriesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterPoolName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Returns a list of upgrade history. - * @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?: ClusterUpgradeHistoriesListOptionalParams, - ): 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?: ClusterUpgradeHistoriesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterPoolName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/upgradeHistories", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterUpgradeHistoryListResult, - }, - 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.ClusterUpgradeHistoryListResult, - }, - 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-hdinsightcontainers/src/operations/clusters.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusters.ts deleted file mode 100644 index f2c37394b9a1..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/clusters.ts +++ /dev/null @@ -1,1477 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Clusters } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - Cluster, - ClustersListByClusterPoolNameNextOptionalParams, - ClustersListByClusterPoolNameOptionalParams, - ClustersListByClusterPoolNameResponse, - ServiceConfigResult, - ClustersListServiceConfigsNextOptionalParams, - ClustersListServiceConfigsOptionalParams, - ClustersListServiceConfigsResponse, - ClusterInstanceViewResult, - ClustersListInstanceViewsNextOptionalParams, - ClustersListInstanceViewsOptionalParams, - ClustersListInstanceViewsResponse, - ClusterUpgrade, - ClustersUpgradeOptionalParams, - ClustersUpgradeResponse, - ClusterUpgradeRollback, - ClustersUpgradeManualRollbackOptionalParams, - ClustersUpgradeManualRollbackResponse, - ClusterResizeData, - ClustersResizeOptionalParams, - ClustersResizeResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOptionalParams, - ClustersCreateResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - ClustersGetInstanceViewOptionalParams, - ClustersGetInstanceViewResponse, - ClustersListByClusterPoolNameNextResponse, - ClustersListServiceConfigsNextResponse, - ClustersListInstanceViewsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class Clusters class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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, - ); - } - - /** - * Upgrade 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 clusterUpgradeRequest Upgrade a cluster. - * @param options The options parameters. - */ - async beginUpgrade( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterUpgradeRequest: ClusterUpgrade, - options?: ClustersUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpgradeResponse - > - > { - 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, - clusterUpgradeRequest, - options, - }, - spec: upgradeOperationSpec, - }); - const poller = await createHttpPoller< - ClustersUpgradeResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Upgrade 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 clusterUpgradeRequest Upgrade a cluster. - * @param options The options parameters. - */ - async beginUpgradeAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterUpgradeRequest: ClusterUpgrade, - options?: ClustersUpgradeOptionalParams, - ): Promise { - const poller = await this.beginUpgrade( - resourceGroupName, - clusterPoolName, - clusterName, - clusterUpgradeRequest, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for a cluster. - * @param options The options parameters. - */ - async beginUpgradeManualRollback( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterRollbackUpgradeRequest: ClusterUpgradeRollback, - options?: ClustersUpgradeManualRollbackOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpgradeManualRollbackResponse - > - > { - 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, - clusterRollbackUpgradeRequest, - options, - }, - spec: upgradeManualRollbackOperationSpec, - }); - const poller = await createHttpPoller< - ClustersUpgradeManualRollbackResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for a cluster. - * @param options The options parameters. - */ - async beginUpgradeManualRollbackAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterRollbackUpgradeRequest: ClusterUpgradeRollback, - options?: ClustersUpgradeManualRollbackOptionalParams, - ): Promise { - const poller = await this.beginUpgradeManualRollback( - resourceGroupName, - clusterPoolName, - clusterName, - clusterRollbackUpgradeRequest, - options, - ); - return poller.pollUntilDone(); - } - - /** - * 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 upgradeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/upgrade", - 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.clusterUpgradeRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const upgradeManualRollbackOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/rollback", - 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.clusterRollbackUpgradeRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterPoolName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - 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-hdinsightcontainers/src/operations/index.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/index.ts deleted file mode 100644 index ed7fc5880668..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./clusterPools.js"; -export * from "./clusterPoolAvailableUpgrades.js"; -export * from "./clusterPoolUpgradeHistories.js"; -export * from "./clusters.js"; -export * from "./clusterAvailableUpgrades.js"; -export * from "./clusterUpgradeHistories.js"; -export * from "./clusterJobs.js"; -export * from "./locations.js"; -export * from "./operations.js"; -export * from "./availableClusterPoolVersions.js"; -export * from "./availableClusterVersions.js"; -export * from "./clusterLibraries.js"; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/locations.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/locations.ts deleted file mode 100644 index dc7acb376d17..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/locations.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { Locations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - NameAvailabilityParameters, - LocationsCheckNameAvailabilityOptionalParams, - LocationsCheckNameAvailabilityResponse, -} from "../models/index.js"; - -/** Class containing Locations operations. */ -export class LocationsImpl implements Locations { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class Locations class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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-hdinsightcontainers/src/operations/operations.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operations/operations.ts deleted file mode 100644 index 23c008daf5d0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operations/operations.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { HDInsightContainersManagementClient } from "../hDInsightContainersManagementClient.js"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: HDInsightContainersManagementClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: HDInsightContainersManagementClient) { - 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-hdinsightcontainers/src/operationsInterfaces/availableClusterPoolVersions.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/availableClusterPoolVersions.ts deleted file mode 100644 index f0f965a8010a..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/availableClusterPoolVersions.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ClusterPoolVersion, - AvailableClusterPoolVersionsListByLocationOptionalParams, -} from "../models/index.js"; - -/// -/** 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-hdinsightcontainers/src/operationsInterfaces/availableClusterVersions.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/availableClusterVersions.ts deleted file mode 100644 index 2f9f785fd9c5..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/availableClusterVersions.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ClusterVersion, - AvailableClusterVersionsListByLocationOptionalParams, -} from "../models/index.js"; - -/// -/** 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-hdinsightcontainers/src/operationsInterfaces/clusterAvailableUpgrades.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterAvailableUpgrades.ts deleted file mode 100644 index cfab58d98458..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterAvailableUpgrades.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ClusterAvailableUpgrade, - ClusterAvailableUpgradesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ClusterAvailableUpgrades. */ -export interface ClusterAvailableUpgrades { - /** - * List a cluster available upgrade. - * @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?: ClusterAvailableUpgradesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterJobs.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterJobs.ts deleted file mode 100644 index 4da58d8147db..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterJobs.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ClusterJob, - ClusterJobsListOptionalParams, - ClusterJobsRunJobOptionalParams, - ClusterJobsRunJobResponse, -} from "../models/index.js"; - -/// -/** 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-hdinsightcontainers/src/operationsInterfaces/clusterLibraries.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterLibraries.ts deleted file mode 100644 index 52a1aed4c508..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterLibraries.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ClusterLibrary, - Category, - ClusterLibrariesListOptionalParams, - ClusterLibraryManagementOperation, - ClusterLibrariesManageLibrariesOptionalParams, - ClusterLibrariesManageLibrariesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ClusterLibraries. */ -export interface ClusterLibraries { - /** - * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value - * is 'custom' or 'predefined'. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - category: Category, - options?: ClusterLibrariesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Library management operations on 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 operation The library management operation. - * @param options The options parameters. - */ - beginManageLibraries( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - operation: ClusterLibraryManagementOperation, - options?: ClusterLibrariesManageLibrariesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClusterLibrariesManageLibrariesResponse - > - >; - /** - * Library management operations on 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 operation The library management operation. - * @param options The options parameters. - */ - beginManageLibrariesAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - operation: ClusterLibraryManagementOperation, - options?: ClusterLibrariesManageLibrariesOptionalParams, - ): Promise; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPoolAvailableUpgrades.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPoolAvailableUpgrades.ts deleted file mode 100644 index d97c30dfc2c8..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPoolAvailableUpgrades.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ClusterPoolAvailableUpgrade, - ClusterPoolAvailableUpgradesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ClusterPoolAvailableUpgrades. */ -export interface ClusterPoolAvailableUpgrades { - /** - * List a cluster pool available upgrade. - * @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. - */ - list( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolAvailableUpgradesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPoolUpgradeHistories.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPoolUpgradeHistories.ts deleted file mode 100644 index 69275868afc4..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPoolUpgradeHistories.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ClusterPoolUpgradeHistory, - ClusterPoolUpgradeHistoriesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ClusterPoolUpgradeHistories. */ -export interface ClusterPoolUpgradeHistories { - /** - * Returns a list of upgrade history. - * @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. - */ - list( - resourceGroupName: string, - clusterPoolName: string, - options?: ClusterPoolUpgradeHistoriesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPools.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPools.ts deleted file mode 100644 index ae461a179a4a..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterPools.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -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, - ClusterPoolUpgrade, - ClusterPoolsUpgradeOptionalParams, - ClusterPoolsUpgradeResponse, -} from "../models/index.js"; - -/// -/** 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; - /** - * Upgrade 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 clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param options The options parameters. - */ - beginUpgrade( - resourceGroupName: string, - clusterPoolName: string, - clusterPoolUpgradeRequest: ClusterPoolUpgrade, - options?: ClusterPoolsUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClusterPoolsUpgradeResponse - > - >; - /** - * Upgrade 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 clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param options The options parameters. - */ - beginUpgradeAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterPoolUpgradeRequest: ClusterPoolUpgrade, - options?: ClusterPoolsUpgradeOptionalParams, - ): Promise; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterUpgradeHistories.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterUpgradeHistories.ts deleted file mode 100644 index ec7b2f2aa19d..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusterUpgradeHistories.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ClusterUpgradeHistory, - ClusterUpgradeHistoriesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ClusterUpgradeHistories. */ -export interface ClusterUpgradeHistories { - /** - * Returns a list of upgrade history. - * @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?: ClusterUpgradeHistoriesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusters.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusters.ts deleted file mode 100644 index bd2da6add700..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/clusters.ts +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - Cluster, - ClustersListByClusterPoolNameOptionalParams, - ServiceConfigResult, - ClustersListServiceConfigsOptionalParams, - ClusterInstanceViewResult, - ClustersListInstanceViewsOptionalParams, - ClusterUpgrade, - ClustersUpgradeOptionalParams, - ClustersUpgradeResponse, - ClusterUpgradeRollback, - ClustersUpgradeManualRollbackOptionalParams, - ClustersUpgradeManualRollbackResponse, - ClusterResizeData, - ClustersResizeOptionalParams, - ClustersResizeResponse, - ClustersGetOptionalParams, - ClustersGetResponse, - ClustersCreateOptionalParams, - ClustersCreateResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersDeleteOptionalParams, - ClustersGetInstanceViewOptionalParams, - ClustersGetInstanceViewResponse, -} from "../models/index.js"; - -/// -/** 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; - /** - * Upgrade 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 clusterUpgradeRequest Upgrade a cluster. - * @param options The options parameters. - */ - beginUpgrade( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterUpgradeRequest: ClusterUpgrade, - options?: ClustersUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpgradeResponse - > - >; - /** - * Upgrade 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 clusterUpgradeRequest Upgrade a cluster. - * @param options The options parameters. - */ - beginUpgradeAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterUpgradeRequest: ClusterUpgrade, - options?: ClustersUpgradeOptionalParams, - ): Promise; - /** - * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for a cluster. - * @param options The options parameters. - */ - beginUpgradeManualRollback( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterRollbackUpgradeRequest: ClusterUpgradeRollback, - options?: ClustersUpgradeManualRollbackOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ClustersUpgradeManualRollbackResponse - > - >; - /** - * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for a cluster. - * @param options The options parameters. - */ - beginUpgradeManualRollbackAndWait( - resourceGroupName: string, - clusterPoolName: string, - clusterName: string, - clusterRollbackUpgradeRequest: ClusterUpgradeRollback, - options?: ClustersUpgradeManualRollbackOptionalParams, - ): Promise; - /** - * 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-hdinsightcontainers/src/operationsInterfaces/index.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/index.ts deleted file mode 100644 index ed7fc5880668..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./clusterPools.js"; -export * from "./clusterPoolAvailableUpgrades.js"; -export * from "./clusterPoolUpgradeHistories.js"; -export * from "./clusters.js"; -export * from "./clusterAvailableUpgrades.js"; -export * from "./clusterUpgradeHistories.js"; -export * from "./clusterJobs.js"; -export * from "./locations.js"; -export * from "./operations.js"; -export * from "./availableClusterPoolVersions.js"; -export * from "./availableClusterVersions.js"; -export * from "./clusterLibraries.js"; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/locations.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/locations.ts deleted file mode 100644 index 333e653b1ae1..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/locations.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - NameAvailabilityParameters, - LocationsCheckNameAvailabilityOptionalParams, - LocationsCheckNameAvailabilityResponse, -} from "../models/index.js"; - -/** 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-hdinsightcontainers/src/operationsInterfaces/operations.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/operations.ts deleted file mode 100644 index e46483f09fd0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** 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-hdinsightcontainers/src/pagingHelper.ts b/sdk/hdinsight/arm-hdinsightcontainers/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/src/pagingHelper.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export 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-hdinsightcontainers/test/hdinsightcontainers_operations_test.spec.ts b/sdk/hdinsight/arm-hdinsightcontainers/test/hdinsightcontainers_operations_test.spec.ts deleted file mode 100644 index 187172567c60..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/test/hdinsightcontainers_operations_test.spec.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import type { RecorderStartOptions } from "@azure-tools/test-recorder"; -import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { HDInsightContainersManagementClient } from "../src/hDInsightContainersManagementClient.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -const replaceableVariables: Record = { - SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888", -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("HDInsightOnAks test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: HDInsightContainersManagementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - - beforeEach(async (ctx) => { - recorder = new Recorder(ctx); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new HDInsightContainersManagementClient( - credential, - subscriptionId, - recorder.configureClientOptions({}), - ); - location = "eastus2euap"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("clusterPools create test", async () => { - const res = await client.clusterPools.beginCreateOrUpdateAndWait( - resourceGroup, - resourcename, - { - properties: { - clusterPoolProfile: { clusterPoolVersion: "1.1" }, - computeProfile: { vmSize: "Standard_F4s_v2" }, - }, - location, - }, - testPollingOptions, - ); - assert.equal(res.name, resourcename); - }); - - it("clusterPools get test", async () => { - const res = await client.clusterPools.get(resourceGroup, resourcename); - assert.equal(res.name, resourcename); - }); - - it("clusterPools list test", async () => { - const resArray = new Array(); - for await (const item of client.clusterPools.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 1); - }); - - it("operation list test", async () => { - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - }); - - it("clusterPools delete test", async () => { - const resArray = new Array(); - for await (const item of client.clusterPools.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }); -}); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/test/snippets.spec.ts b/sdk/hdinsight/arm-hdinsightcontainers/test/snippets.spec.ts deleted file mode 100644 index fa40ea66c7b0..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/test/snippets.spec.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { HDInsightContainersManagementClient } from "../src/index.js"; -import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; -import { setLogLevel } from "@azure/logger"; -import { describe, it } from "vitest"; - -describe("snippets", () => { - it("ReadmeSampleCreateClient_Node", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new HDInsightContainersManagementClient( - new DefaultAzureCredential(), - subscriptionId, - ); - }); - - it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", - }); - const client = new HDInsightContainersManagementClient(credential, subscriptionId); - }); - - it("SetLogLevel", async () => { - setLogLevel("info"); - }); -}); diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.browser.config.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.browser.config.json deleted file mode 100644 index ede3ab8ae732..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.browser.config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.browser.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-hdinsightcontainers": ["./dist/browser/index.d.ts"], - "@azure/arm-hdinsightcontainers/*": ["./dist/browser/*"], - "$internal/*": ["./dist/browser/*"] - } - } -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.json deleted file mode 100644 index d466f1460665..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "references": [ - { - "path": "./tsconfig.src.json" - }, - { - "path": "./tsconfig.samples.json" - }, - { - "path": "./tsconfig.test.json" - }, - { - "path": "./tsconfig.snippets.json" - } - ], - "files": [] -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.samples.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.samples.json deleted file mode 100644 index 49dc0d382299..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.samples.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../../tsconfig.samples.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-hdinsightcontainers": ["./dist/esm"] - } - } -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.snippets.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.snippets.json deleted file mode 100644 index 6f3148b5ed97..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.snippets.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["../../../tsconfig.snippets.base.json"] -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.src.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.src.json deleted file mode 100644 index bae70752dd38..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.src.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.lib.json" -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.test.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.test.json deleted file mode 100644 index 42798ad68913..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.test.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "references": [ - { - "path": "./tsconfig.test.node.json" - }, - { - "path": "./tsconfig.browser.config.json" - } - ], - "compilerOptions": { - "composite": true - }, - "files": [] -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.test.node.json b/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.test.node.json deleted file mode 100644 index d5e32125fb52..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/tsconfig.test.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.test.node.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-hdinsightcontainers": ["./src/index.ts"], - "@azure/arm-hdinsightcontainers/*": ["./src/*"], - "$internal/*": ["./src/*"] - } - } -} diff --git a/sdk/hdinsight/arm-hdinsightcontainers/vitest.browser.config.ts b/sdk/hdinsight/arm-hdinsightcontainers/vitest.browser.config.ts deleted file mode 100644 index 72964f281efe..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/vitest.browser.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import viteConfig from "../../../vitest.browser.shared.config.ts"; - -export default viteConfig; diff --git a/sdk/hdinsight/arm-hdinsightcontainers/vitest.config.ts b/sdk/hdinsight/arm-hdinsightcontainers/vitest.config.ts deleted file mode 100644 index 0dfa15cc4498..000000000000 --- a/sdk/hdinsight/arm-hdinsightcontainers/vitest.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import viteConfig from "../../../vitest.shared.config.ts"; - -export default viteConfig;