From dd0154591f19f9739b50bdb1ad938b922cc5cfa2 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 27 Feb 2025 20:06:15 +0000 Subject: [PATCH] CodeGen from PR 32790 in Azure/azure-rest-api-specs Merge 1b1e4cdad170c228134b2cd0535521ea26a36f80 into c39f72c162b0ca345a4745cdfc9a1e276a725d5d --- common/config/rush/pnpm-lock.yaml | 13 +- .../CHANGELOG.md | 363 ++ .../arm-servicefabricmanagedclusters/LICENSE | 8 +- .../README.md | 62 +- .../_meta.json | 8 - .../api-extractor.json | 6 +- .../assets.json | 6 - .../eslint.config.mjs | 16 + .../package.json | 164 +- .../arm-servicefabricmanagedclusters.api.md | 1404 ++--- .../sample.env | 1 - ...icationTypeVersionsCreateOrUpdateSample.ts | 47 - .../applicationTypeVersionsDeleteSample.ts | 41 - .../applicationTypeVersionsGetSample.ts | 41 - ...ypeVersionsListByApplicationTypesSample.ts | 42 - .../applicationTypeVersionsUpdateSample.ts | 46 - .../applicationTypesCreateOrUpdateSample.ts | 42 - .../applicationTypesDeleteSample.ts | 39 - .../samples-dev/applicationTypesGetSample.ts | 39 - .../samples-dev/applicationTypesListSample.ts | 37 - .../applicationTypesUpdateSample.ts | 42 - .../applicationsCreateOrUpdateSample.ts | 109 - .../samples-dev/applicationsDeleteSample.ts | 39 - .../samples-dev/applicationsGetSample.ts | 35 - .../samples-dev/applicationsListSample.ts | 37 - .../applicationsReadUpgradeSample.ts | 39 - .../applicationsResumeUpgradeSample.ts | 44 - .../applicationsStartRollbackSample.ts | 39 - .../samples-dev/applicationsUpdateSample.ts | 42 - ...managedApplyMaintenanceWindowPostSample.ts | 35 - .../managedAzResiliencyStatusGetSample.ts | 38 - ...gedClusterVersionGetByEnvironmentSample.ts | 39 - .../managedClusterVersionGetSample.ts | 34 - ...edClusterVersionListByEnvironmentSample.ts | 34 - .../managedClusterVersionListSample.ts | 33 - .../managedClustersCreateOrUpdateSample.ts | 193 - .../managedClustersDeleteSample.ts | 34 - .../samples-dev/managedClustersGetSample.ts | 34 - ...anagedClustersListByResourceGroupSample.ts | 36 - ...managedClustersListBySubscriptionSample.ts | 35 - .../managedClustersUpdateSample.ts | 36 - ...managedMaintenanceWindowStatusGetSample.ts | 38 - .../managedUnsupportedVMSizesGetSample.ts | 34 - .../managedUnsupportedVMSizesListSample.ts | 36 - .../samples-dev/nodeTypeSkusListSample.ts | 38 - .../nodeTypesCreateOrUpdateSample.ts | 484 -- .../samples-dev/nodeTypesDeleteNodeSample.ts | 42 - .../samples-dev/nodeTypesDeleteSample.ts | 39 - .../samples-dev/nodeTypesGetSample.ts | 35 - .../nodeTypesListByManagedClustersSample.ts | 37 - .../samples-dev/nodeTypesReimageSample.ts | 70 - .../samples-dev/nodeTypesRestartSample.ts | 42 - .../samples-dev/nodeTypesUpdateSample.ts | 71 - .../samples-dev/operationResultsGetSample.ts | 34 - .../samples-dev/operationStatusGetSample.ts | 53 - .../samples-dev/operationsListSample.ts | 35 - .../servicesCreateOrUpdateSample.ts | 121 - .../samples-dev/servicesDeleteSample.ts | 41 - .../samples-dev/servicesGetSample.ts | 41 - .../servicesListByApplicationsSample.ts | 42 - .../samples-dev/servicesUpdateSample.ts | 44 - .../samples/v1-beta/javascript/README.md | 148 - ...icationTypeVersionsCreateOrUpdateSample.js | 51 - .../applicationTypeVersionsDeleteSample.js | 46 - .../applicationTypeVersionsGetSample.js | 46 - ...ypeVersionsListByApplicationTypesSample.js | 47 - .../applicationTypeVersionsUpdateSample.js | 50 - .../applicationTypesCreateOrUpdateSample.js | 46 - .../applicationTypesDeleteSample.js | 44 - .../javascript/applicationTypesGetSample.js | 44 - .../javascript/applicationTypesListSample.js | 42 - .../applicationTypesUpdateSample.js | 46 - .../applicationsCreateOrUpdateSample.js | 113 - .../javascript/applicationsDeleteSample.js | 44 - .../javascript/applicationsGetSample.js | 40 - .../javascript/applicationsListSample.js | 42 - .../applicationsReadUpgradeSample.js | 44 - .../applicationsResumeUpgradeSample.js | 48 - .../applicationsStartRollbackSample.js | 44 - .../javascript/applicationsUpdateSample.js | 46 - ...managedApplyMaintenanceWindowPostSample.js | 40 - .../managedAzResiliencyStatusGetSample.js | 43 - ...gedClusterVersionGetByEnvironmentSample.js | 44 - .../managedClusterVersionGetSample.js | 39 - ...edClusterVersionListByEnvironmentSample.js | 39 - .../managedClusterVersionListSample.js | 38 - .../managedClustersCreateOrUpdateSample.js | 197 - .../javascript/managedClustersDeleteSample.js | 39 - .../javascript/managedClustersGetSample.js | 39 - ...anagedClustersListByResourceGroupSample.js | 41 - ...managedClustersListBySubscriptionSample.js | 40 - .../javascript/managedClustersUpdateSample.js | 40 - ...managedMaintenanceWindowStatusGetSample.js | 43 - .../managedUnsupportedVMSizesGetSample.js | 39 - .../managedUnsupportedVMSizesListSample.js | 41 - .../javascript/nodeTypeSkusListSample.js | 43 - .../nodeTypesCreateOrUpdateSample.js | 488 -- .../javascript/nodeTypesDeleteNodeSample.js | 46 - .../javascript/nodeTypesDeleteSample.js | 44 - .../v1-beta/javascript/nodeTypesGetSample.js | 40 - .../nodeTypesListByManagedClustersSample.js | 42 - .../javascript/nodeTypesReimageSample.js | 74 - .../javascript/nodeTypesRestartSample.js | 46 - .../javascript/nodeTypesUpdateSample.js | 75 - .../javascript/operationResultsGetSample.js | 39 - .../javascript/operationStatusGetSample.js | 58 - .../javascript/operationsListSample.js | 40 - .../samples/v1-beta/javascript/package.json | 32 - .../samples/v1-beta/javascript/sample.env | 1 - .../servicesCreateOrUpdateSample.js | 125 - .../javascript/servicesDeleteSample.js | 46 - .../v1-beta/javascript/servicesGetSample.js | 46 - .../servicesListByApplicationsSample.js | 47 - .../javascript/servicesUpdateSample.js | 48 - .../samples/v1-beta/typescript/README.md | 161 - .../samples/v1-beta/typescript/package.json | 41 - .../samples/v1-beta/typescript/sample.env | 1 - ...icationTypeVersionsCreateOrUpdateSample.ts | 57 - .../applicationTypeVersionsDeleteSample.ts | 48 - .../src/applicationTypeVersionsGetSample.ts | 48 - ...ypeVersionsListByApplicationTypesSample.ts | 49 - .../applicationTypeVersionsUpdateSample.ts | 55 - .../applicationTypesCreateOrUpdateSample.ts | 51 - .../src/applicationTypesDeleteSample.ts | 46 - .../src/applicationTypesGetSample.ts | 46 - .../src/applicationTypesListSample.ts | 47 - .../src/applicationTypesUpdateSample.ts | 51 - .../src/applicationsCreateOrUpdateSample.ts | 122 - .../src/applicationsDeleteSample.ts | 46 - .../typescript/src/applicationsGetSample.ts | 46 - .../typescript/src/applicationsListSample.ts | 47 - .../src/applicationsReadUpgradeSample.ts | 46 - .../src/applicationsResumeUpgradeSample.ts | 53 - .../src/applicationsStartRollbackSample.ts | 46 - .../src/applicationsUpdateSample.ts | 51 - ...managedApplyMaintenanceWindowPostSample.ts | 45 - .../src/managedAzResiliencyStatusGetSample.ts | 45 - ...gedClusterVersionGetByEnvironmentSample.ts | 45 - .../src/managedClusterVersionGetSample.ts | 43 - ...edClusterVersionListByEnvironmentSample.ts | 43 - .../src/managedClusterVersionListSample.ts | 39 - .../managedClustersCreateOrUpdateSample.ts | 212 - .../src/managedClustersDeleteSample.ts | 44 - .../src/managedClustersGetSample.ts | 44 - ...anagedClustersListByResourceGroupSample.ts | 45 - ...managedClustersListBySubscriptionSample.ts | 41 - .../src/managedClustersUpdateSample.ts | 49 - ...managedMaintenanceWindowStatusGetSample.ts | 45 - .../src/managedUnsupportedVMSizesGetSample.ts | 40 - .../managedUnsupportedVMSizesListSample.ts | 42 - .../typescript/src/nodeTypeSkusListSample.ts | 49 - .../src/nodeTypesCreateOrUpdateSample.ts | 521 -- .../src/nodeTypesDeleteNodeSample.ts | 51 - .../typescript/src/nodeTypesDeleteSample.ts | 46 - .../typescript/src/nodeTypesGetSample.ts | 46 - .../nodeTypesListByManagedClustersSample.ts | 47 - .../typescript/src/nodeTypesReimageSample.ts | 83 - .../typescript/src/nodeTypesRestartSample.ts | 51 - .../typescript/src/nodeTypesUpdateSample.ts | 84 - .../src/operationResultsGetSample.ts | 40 - .../src/operationStatusGetSample.ts | 62 - .../typescript/src/operationsListSample.ts | 41 - .../src/servicesCreateOrUpdateSample.ts | 134 - .../typescript/src/servicesDeleteSample.ts | 48 - .../typescript/src/servicesGetSample.ts | 48 - .../src/servicesListByApplicationsSample.ts | 49 - .../typescript/src/servicesUpdateSample.ts | 53 - .../samples/v1-beta/typescript/tsconfig.json | 17 - .../src/api/applicationTypeVersions/index.ts | 357 ++ .../src/api/applicationTypes/index.ts | 325 ++ .../src/api/applications/index.ts | 491 ++ .../src/api/index.ts | 71 + .../src/api/managedClusterVersion/index.ts | 225 + .../src/api/managedClusters/index.ts | 752 +++ .../src/api/managedVMSizes/index.ts | 119 + .../src/api/nodeTypes/index.ts | 985 ++++ .../src/api/operationResults/index.ts | 62 + .../src/api/operationStatus/index.ts | 62 + .../src/api/operations/index.ts | 61 + .../src/api/options.ts | 268 + .../src/api/serviceFabricContext.ts | 68 + .../src/api/services/index.ts | 339 ++ .../classic/applicationTypeVersions/index.ts | 142 + .../src/classic/applicationTypes/index.ts | 112 + .../src/classic/applications/index.ts | 161 + .../src/classic/index.ts | 14 + .../classic/managedClusterVersion/index.ts | 76 + .../src/classic/managedClusters/index.ts | 213 + .../src/classic/managedVMSizes/index.ts | 43 + .../src/classic/nodeTypes/index.ts | 323 ++ .../src/classic/operationResults/index.ts | 32 + .../src/classic/operationStatus/index.ts | 32 + .../src/classic/operations/index.ts | 26 + .../src/classic/services/index.ts | 136 + .../src/index.ts | 262 +- .../src/logger.ts | 5 + .../src/lroImpl.ts | 38 - .../src/models/index.ts | 3220 +----------- .../src/models/mappers.ts | 4491 ---------------- .../src/models/models.ts | 4681 +++++++++++++++++ .../src/models/parameters.ts | 302 -- .../src/operations/applicationTypeVersions.ts | 606 --- .../src/operations/applicationTypes.ts | 463 -- .../src/operations/applications.ts | 949 ---- .../src/operations/index.ts | 23 - .../managedApplyMaintenanceWindow.ts | 69 - .../managedAzResiliencyStatusOperations.ts | 74 - .../src/operations/managedClusterVersion.ts | 212 - .../src/operations/managedClusters.ts | 631 --- ...anagedMaintenanceWindowStatusOperations.ts | 73 - .../operations/managedUnsupportedVMSizes.ts | 211 - .../src/operations/nodeTypeSkus.ts | 216 - .../src/operations/nodeTypes.ts | 1023 ---- .../src/operations/operationResults.ts | 73 - .../src/operations/operationStatus.ts | 71 - .../src/operations/operations.ts | 149 - .../src/operations/services.ts | 606 --- .../applicationTypeVersions.ts | 143 - .../operationsInterfaces/applicationTypes.ts | 109 - .../src/operationsInterfaces/applications.ts | 239 - .../src/operationsInterfaces/index.ts | 23 - .../managedApplyMaintenanceWindow.ts | 25 - .../managedAzResiliencyStatusOperations.ts | 28 - .../managedClusterVersion.ts | 67 - .../operationsInterfaces/managedClusters.ts | 124 - ...anagedMaintenanceWindowStatusOperations.ts | 27 - .../managedUnsupportedVMSizes.ts | 40 - .../src/operationsInterfaces/nodeTypeSkus.ts | 31 - .../src/operationsInterfaces/nodeTypes.ts | 247 - .../operationsInterfaces/operationResults.ts | 27 - .../operationsInterfaces/operationStatus.ts | 27 - .../src/operationsInterfaces/operations.ts | 22 - .../src/operationsInterfaces/services.ts | 149 - .../src/pagingHelper.ts | 39 - .../src/restorePollerHelpers.ts | 287 + .../src/serviceFabricClient.ts | 104 + ...ceFabricManagedClustersManagementClient.ts | 206 - .../src/static-helpers/pagingHelpers.ts | 241 + .../src/static-helpers/pollingHelpers.ts | 126 + .../test/public/sampleTest.spec.ts | 20 + .../test/public/utils/recordedClient.ts | 23 + ...ricmanagedclusters_operations_test.spec.ts | 62 - .../test/snippets.spec.ts | 28 - .../tsconfig.browser.config.json | 5 +- .../tsconfig.json | 25 +- .../tsconfig.samples.json | 4 +- .../tsconfig.test.json | 5 +- .../tsp-location.yaml | 4 + sdk/servicefabricmanagedclusters/ci.yml | 39 + 249 files changed, 12396 insertions(+), 25525 deletions(-) delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/eslint.config.mjs delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/tsconfig.json create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedVMSizes/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/options.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricContext.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedVMSizes/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/logger.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/lroImpl.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypeVersions.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypes.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applications.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/index.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedApplyMaintenanceWindow.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedAzResiliencyStatusOperations.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusterVersion.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusters.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedMaintenanceWindowStatusOperations.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedUnsupportedVMSizes.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypeSkus.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationResults.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationStatus.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operations.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/services.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypeVersions.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypes.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applications.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/index.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedApplyMaintenanceWindow.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedAzResiliencyStatusOperations.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusterVersion.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusters.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedMaintenanceWindowStatusOperations.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedUnsupportedVMSizes.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypeSkus.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationResults.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationStatus.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operations.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/services.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/pagingHelper.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricClient.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/sampleTest.spec.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/servicefabricmanagedclusters_operations_test.spec.ts delete mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/snippets.spec.ts create mode 100644 sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml create mode 100644 sdk/servicefabricmanagedclusters/ci.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index abae50eccb73..aab7b5caebcc 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3218,7 +3218,7 @@ packages: version: 0.0.0 '@rush-temp/arm-networkcloud@file:projects/arm-networkcloud.tgz': - resolution: {integrity: sha512-Vget+Btjm5TB3NqDnubucSSFQxs2rp+rX5CQ9tIQ/m6vPwVTd8blkJ6IUqSIVsxxpgrFEhsJ8cbHbOwEuJ1dlA==, tarball: file:projects/arm-networkcloud.tgz} + resolution: {integrity: sha512-VhAlzN09Jw7ZFw8pdEML1m6X5WzGMXiopKrdfQ2Bou2XDD/mncjuIV0MCrYIFQFcVKvaame0Xh9qH+HIW9VWdA==, tarball: file:projects/arm-networkcloud.tgz} version: 0.0.0 '@rush-temp/arm-networkfunction@file:projects/arm-networkfunction.tgz': @@ -3230,7 +3230,7 @@ packages: version: 0.0.0 '@rush-temp/arm-nginx@file:projects/arm-nginx.tgz': - resolution: {integrity: sha512-0Zr+dEe7RW/QTtMzMKwynKxi9E2O8VUD7A4wPGxh/ehH5g11ea4Ay97Li0k/v4HCiizyeLRkXc0SC0bWuoeZxg==, tarball: file:projects/arm-nginx.tgz} + resolution: {integrity: sha512-T2JX94sR7Z2fyia9XglIcbr8Rx3o0M97D71+1xkmHlz1K/yqnGo/QyXhKo84lZMWC2voB2XxzjmpEPftoDHhxg==, tarball: file:projects/arm-nginx.tgz} version: 0.0.0 '@rush-temp/arm-notificationhubs@file:projects/arm-notificationhubs.tgz': @@ -3434,7 +3434,7 @@ packages: version: 0.0.0 '@rush-temp/arm-servicefabricmanagedclusters@file:projects/arm-servicefabricmanagedclusters.tgz': - resolution: {integrity: sha512-sRZXJnbEYmDzrVJtJ0dgX/FAdbsDCjVjoZ6cawbIRHGjXEkx0q3ieeBkXkD4uxUvAJp4gye44HwMGbigDxciUg==, tarball: file:projects/arm-servicefabricmanagedclusters.tgz} + resolution: {integrity: sha512-mNkGsSq2e98/JcEwmes9kPie/DbHasGNpzfx0jDL6eZeMon0chcd3L4l6qorrTuY9/3v3xrcMkVHBDw/ajkyiA==, tarball: file:projects/arm-servicefabricmanagedclusters.tgz} version: 0.0.0 '@rush-temp/arm-servicefabricmesh@file:projects/arm-servicefabricmesh.tgz': @@ -17794,14 +17794,15 @@ snapshots: '@rush-temp/arm-servicefabricmanagedclusters@file:projects/arm-servicefabricmanagedclusters.tgz(@types/debug@4.1.12)(msw@2.7.2(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(yaml@2.7.0)': dependencies: - '@azure/core-lro': 2.7.2 + '@microsoft/api-extractor': 7.50.1(@types/node@18.19.76) '@types/node': 18.19.76 - '@vitest/browser': 3.0.6(@types/node@18.19.76)(playwright@1.50.1)(typescript@5.7.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.6) + '@vitest/browser': 3.0.6(@types/node@18.19.76)(playwright@1.50.1)(typescript@5.6.3)(vite@6.1.1(@types/node@22.7.9)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.6) '@vitest/coverage-istanbul': 3.0.6(vitest@3.0.6) dotenv: 16.4.7 + eslint: 9.21.0 playwright: 1.50.1 tslib: 2.8.1 - typescript: 5.7.3 + typescript: 5.6.3 vitest: 3.0.6(@types/debug@4.1.12)(@types/node@18.19.76)(@vitest/browser@3.0.6)(msw@2.7.2(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - '@edge-runtime/vm' diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md index 80b078da46ad..d4dc44b4da6b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md @@ -1,5 +1,368 @@ # Release History +## 1.0.0-beta.4 (2025-02-27) +Compared with version 1.0.0-beta.3 + +### Features Added + + - Added operation group ManagedVMSizesOperations + - Added operation ApplicationsOperations.createOrUpdate + - Added operation ApplicationsOperations.delete + - Added operation ApplicationsOperations.readUpgrade + - Added operation ApplicationsOperations.resumeUpgrade + - Added operation ApplicationsOperations.startRollback + - Added operation ApplicationTypesOperations.delete + - Added operation ApplicationTypeVersionsOperations.createOrUpdate + - Added operation ApplicationTypeVersionsOperations.delete + - Added operation ManagedClustersOperations.createOrUpdate + - Added operation ManagedClustersOperations.delete + - Added operation ManagedClustersOperations.getFaultSimulation + - Added operation ManagedClustersOperations.listFaultSimulation + - Added operation ManagedClustersOperations.managedAzResiliencyStatusGet + - Added operation ManagedClustersOperations.managedMaintenanceWindowStatusGet + - Added operation ManagedClustersOperations.post + - Added operation ManagedClustersOperations.startFaultSimulation + - Added operation ManagedClustersOperations.stopFaultSimulation + - Added operation NodeTypesOperations.createOrUpdate + - Added operation NodeTypesOperations.deallocate + - Added operation NodeTypesOperations.delete + - Added operation NodeTypesOperations.deleteNode + - Added operation NodeTypesOperations.getFaultSimulation + - Added operation NodeTypesOperations.list + - Added operation NodeTypesOperations.listFaultSimulation + - Added operation NodeTypesOperations.redeploy + - Added operation NodeTypesOperations.reimage + - Added operation NodeTypesOperations.restart + - Added operation NodeTypesOperations.start + - Added operation NodeTypesOperations.startFaultSimulation + - Added operation NodeTypesOperations.stopFaultSimulation + - Added operation NodeTypesOperations.update + - Added operation ServicesOperations.createOrUpdate + - Added operation ServicesOperations.delete + - Added Interface ApplicationResourceProperties + - Added Interface ApplicationTypeResourceProperties + - Added Interface ApplicationTypeVersionResourceProperties + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface FaultSimulation + - Added Interface FaultSimulationConstraints + - Added Interface FaultSimulationDetails + - Added Interface FaultSimulationIdParameters + - Added Interface FaultSimulationParameters + - Added Interface ManagedClusterProperties + - Added Interface ManagedClustersGetFaultSimulationOptionalParams + - Added Interface ManagedClustersListFaultSimulationOptionalParams + - Added Interface ManagedClustersManagedAzResiliencyStatusGetOptionalParams + - Added Interface ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams + - Added Interface ManagedClustersPostOptionalParams + - Added Interface ManagedClustersStartFaultSimulationOptionalParams + - Added Interface ManagedClustersStopFaultSimulationOptionalParams + - Added Interface ManagedClusterVersionDetails + - Added Interface ManagedVMSizesGetOptionalParams + - Added Interface ManagedVMSizesListOptionalParams + - Added Interface NodeTypeFaultSimulation + - Added Interface NodeTypeProperties + - Added Interface NodeTypesDeallocateOptionalParams + - Added Interface NodeTypesGetFaultSimulationOptionalParams + - Added Interface NodeTypesListFaultSimulationOptionalParams + - Added Interface NodeTypesListOptionalParams + - Added Interface NodeTypesRedeployOptionalParams + - Added Interface NodeTypesStartFaultSimulationOptionalParams + - Added Interface NodeTypesStartOptionalParams + - Added Interface NodeTypesStopFaultSimulationOptionalParams + - Added Interface Operation + - Added Interface OperationDisplay + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface RestorePollerOptions + - Added Interface ServiceFabricClientOptionalParams + - Added Interface TrackedResource + - Added Interface VmssExtensionProperties + - Added Interface ZoneFaultSimulationParameters + - Added Class ServiceFabricClient + - Added Type Alias ActionType + - Added Type Alias ContinuablePage + - Added Type Alias CreatedByType + - Added Type Alias Environment + - Added Type Alias FaultKind + - Added Type Alias FaultSimulationParametersUnion + - Added Type Alias FaultSimulationStatus + - Added Type Alias Origin + - Added Type Alias SfmcOperationStatus + - Interface ApplicationResource has a new optional parameter location + - Interface ApplicationResource has a new optional parameter properties + - Interface ApplicationResource has a new optional parameter tags + - Interface ApplicationTypeResource has a new optional parameter location + - Interface ApplicationTypeResource has a new optional parameter properties + - Interface ApplicationTypeResource has a new optional parameter tags + - Interface ApplicationTypeVersionResource has a new optional parameter location + - Interface ApplicationTypeVersionResource has a new optional parameter properties + - Interface ApplicationTypeVersionResource has a new optional parameter tags + - Interface ManagedCluster has a new optional parameter etag + - Interface ManagedCluster has a new optional parameter properties + - Interface ManagedClusterCodeVersionResult has a new optional parameter properties + - Interface NodeType has a new optional parameter properties + - Interface NodeType has a new optional parameter tags + - Interface OperationResultsGetOptionalParams has a new optional parameter updateIntervalInMs + - Interface ServiceResource has a new optional parameter location + - Interface ServiceResource has a new optional parameter tags + - Added Enum KnownVersions + - Added function restorePoller + +### Breaking Changes + + - Removed operation group ManagedApplyMaintenanceWindow + - Removed operation group ManagedAzResiliencyStatusOperations + - Removed operation group ManagedMaintenanceWindowStatusOperations + - Removed operation group ManagedUnsupportedVMSizes + - Removed operation group NodeTypeSkus + - Removed operation Applications.beginCreateOrUpdate + - Removed operation Applications.beginCreateOrUpdateAndWait + - Removed operation Applications.beginDelete + - Removed operation Applications.beginDeleteAndWait + - Removed operation Applications.beginReadUpgrade + - Removed operation Applications.beginReadUpgradeAndWait + - Removed operation Applications.beginResumeUpgrade + - Removed operation Applications.beginResumeUpgradeAndWait + - Removed operation Applications.beginStartRollback + - Removed operation Applications.beginStartRollbackAndWait + - Removed operation ApplicationTypes.beginDelete + - Removed operation ApplicationTypes.beginDeleteAndWait + - Removed operation ApplicationTypeVersions.beginCreateOrUpdate + - Removed operation ApplicationTypeVersions.beginCreateOrUpdateAndWait + - Removed operation ApplicationTypeVersions.beginDelete + - Removed operation ApplicationTypeVersions.beginDeleteAndWait + - Removed operation ManagedClusters.beginCreateOrUpdate + - Removed operation ManagedClusters.beginCreateOrUpdateAndWait + - Removed operation ManagedClusters.beginDelete + - Removed operation ManagedClusters.beginDeleteAndWait + - Removed operation NodeTypes.beginCreateOrUpdate + - Removed operation NodeTypes.beginCreateOrUpdateAndWait + - Removed operation NodeTypes.beginDelete + - Removed operation NodeTypes.beginDeleteAndWait + - Removed operation NodeTypes.beginDeleteNode + - Removed operation NodeTypes.beginDeleteNodeAndWait + - Removed operation NodeTypes.beginReimage + - Removed operation NodeTypes.beginReimageAndWait + - Removed operation NodeTypes.beginRestart + - Removed operation NodeTypes.beginRestartAndWait + - Removed operation NodeTypes.beginUpdate + - Removed operation NodeTypes.beginUpdateAndWait + - Removed operation Services.beginCreateOrUpdate + - Removed operation Services.beginCreateOrUpdateAndWait + - Removed operation Services.beginDelete + - Removed operation Services.beginDeleteAndWait + - Deleted Class ServiceFabricManagedClustersManagementClient + - Interface ApplicationResource no longer has parameter managedIdentities + - Interface ApplicationResource no longer has parameter parameters + - Interface ApplicationResource no longer has parameter provisioningState + - Interface ApplicationResource no longer has parameter upgradePolicy + - Interface ApplicationResource no longer has parameter version + - Interface ApplicationsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface ApplicationsDeleteOptionalParams no longer has parameter resumeFrom + - Interface ApplicationsReadUpgradeOptionalParams no longer has parameter resumeFrom + - Interface ApplicationsResumeUpgradeOptionalParams no longer has parameter resumeFrom + - Interface ApplicationsStartRollbackOptionalParams no longer has parameter resumeFrom + - Interface ApplicationTypeResource no longer has parameter provisioningState + - Interface ApplicationTypesDeleteOptionalParams no longer has parameter resumeFrom + - Interface ApplicationTypeVersionResource no longer has parameter appPackageUrl + - Interface ApplicationTypeVersionResource no longer has parameter provisioningState + - Interface ApplicationTypeVersionsCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface ApplicationTypeVersionsDeleteOptionalParams no longer has parameter resumeFrom + - Interface ManagedCluster no longer has parameter addonFeatures + - Interface ManagedCluster no longer has parameter adminPassword + - Interface ManagedCluster no longer has parameter adminUserName + - Interface ManagedCluster no longer has parameter allocatedOutboundPorts + - Interface ManagedCluster no longer has parameter allowRdpAccess + - Interface ManagedCluster no longer has parameter applicationTypeVersionsCleanupPolicy + - Interface ManagedCluster no longer has parameter autoGeneratedDomainNameLabelScope + - Interface ManagedCluster no longer has parameter auxiliarySubnets + - Interface ManagedCluster no longer has parameter azureActiveDirectory + - Interface ManagedCluster no longer has parameter clientConnectionPort + - Interface ManagedCluster no longer has parameter clients + - Interface ManagedCluster no longer has parameter clusterCertificateThumbprints + - Interface ManagedCluster no longer has parameter clusterCodeVersion + - Interface ManagedCluster no longer has parameter clusterId + - Interface ManagedCluster no longer has parameter clusterState + - Interface ManagedCluster no longer has parameter clusterUpgradeCadence + - Interface ManagedCluster no longer has parameter clusterUpgradeMode + - Interface ManagedCluster no longer has parameter ddosProtectionPlanId + - Interface ManagedCluster no longer has parameter dnsName + - Interface ManagedCluster no longer has parameter enableAutoOSUpgrade + - Interface ManagedCluster no longer has parameter enableHttpGatewayExclusiveAuthMode + - Interface ManagedCluster no longer has parameter enableIpv6 + - Interface ManagedCluster no longer has parameter enableServicePublicIP + - Interface ManagedCluster no longer has parameter fabricSettings + - Interface ManagedCluster no longer has parameter fqdn + - Interface ManagedCluster no longer has parameter httpGatewayConnectionPort + - Interface ManagedCluster no longer has parameter httpGatewayTokenAuthConnectionPort + - Interface ManagedCluster no longer has parameter ipTags + - Interface ManagedCluster no longer has parameter ipv4Address + - Interface ManagedCluster no longer has parameter ipv6Address + - Interface ManagedCluster no longer has parameter loadBalancingRules + - Interface ManagedCluster no longer has parameter networkSecurityRules + - Interface ManagedCluster no longer has parameter provisioningState + - Interface ManagedCluster no longer has parameter publicIPPrefixId + - Interface ManagedCluster no longer has parameter publicIPv6PrefixId + - Interface ManagedCluster no longer has parameter serviceEndpoints + - Interface ManagedCluster no longer has parameter subnetId + - Interface ManagedCluster no longer has parameter upgradeDescription + - Interface ManagedCluster no longer has parameter useCustomVnet + - Interface ManagedCluster no longer has parameter zonalResiliency + - Interface ManagedCluster no longer has parameter zonalUpdateMode + - Interface ManagedClusterCodeVersionResult no longer has parameter clusterCodeVersion + - Interface ManagedClusterCodeVersionResult no longer has parameter osType + - Interface ManagedClusterCodeVersionResult no longer has parameter supportExpiryUtc + - Interface ManagedClustersCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface ManagedClustersDeleteOptionalParams no longer has parameter resumeFrom + - Interface NodeType no longer has parameter additionalDataDisks + - Interface NodeType no longer has parameter additionalNetworkInterfaceConfigurations + - Interface NodeType no longer has parameter applicationPorts + - Interface NodeType no longer has parameter capacities + - Interface NodeType no longer has parameter computerNamePrefix + - Interface NodeType no longer has parameter dataDiskLetter + - Interface NodeType no longer has parameter dataDiskSizeGB + - Interface NodeType no longer has parameter dataDiskType + - Interface NodeType no longer has parameter dscpConfigurationId + - Interface NodeType no longer has parameter enableAcceleratedNetworking + - Interface NodeType no longer has parameter enableEncryptionAtHost + - Interface NodeType no longer has parameter enableNodePublicIP + - Interface NodeType no longer has parameter enableNodePublicIPv6 + - Interface NodeType no longer has parameter enableOverProvisioning + - Interface NodeType no longer has parameter ephemeralPorts + - Interface NodeType no longer has parameter evictionPolicy + - Interface NodeType no longer has parameter frontendConfigurations + - Interface NodeType no longer has parameter hostGroupId + - Interface NodeType no longer has parameter isPrimary + - Interface NodeType no longer has parameter isSpotVM + - Interface NodeType no longer has parameter isStateless + - Interface NodeType no longer has parameter multiplePlacementGroups + - Interface NodeType no longer has parameter natConfigurations + - Interface NodeType no longer has parameter natGatewayId + - Interface NodeType no longer has parameter networkSecurityRules + - Interface NodeType no longer has parameter placementProperties + - Interface NodeType no longer has parameter provisioningState + - Interface NodeType no longer has parameter secureBootEnabled + - Interface NodeType no longer has parameter securityType + - Interface NodeType no longer has parameter serviceArtifactReferenceId + - Interface NodeType no longer has parameter spotRestoreTimeout + - Interface NodeType no longer has parameter subnetId + - Interface NodeType no longer has parameter useDefaultPublicLoadBalancer + - Interface NodeType no longer has parameter useEphemeralOSDisk + - Interface NodeType no longer has parameter useTempDataDisk + - Interface NodeType no longer has parameter vmApplications + - Interface NodeType no longer has parameter vmExtensions + - Interface NodeType no longer has parameter vmImageOffer + - Interface NodeType no longer has parameter vmImagePlan + - Interface NodeType no longer has parameter vmImagePublisher + - Interface NodeType no longer has parameter vmImageResourceId + - Interface NodeType no longer has parameter vmImageSku + - Interface NodeType no longer has parameter vmImageVersion + - Interface NodeType no longer has parameter vmInstanceCount + - Interface NodeType no longer has parameter vmManagedIdentity + - Interface NodeType no longer has parameter vmSecrets + - Interface NodeType no longer has parameter vmSetupActions + - Interface NodeType no longer has parameter vmSharedGalleryImageId + - Interface NodeType no longer has parameter vmSize + - Interface NodeType no longer has parameter zones + - Interface NodeTypesCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface NodeTypesDeleteNodeOptionalParams no longer has parameter resumeFrom + - Interface NodeTypesDeleteOptionalParams no longer has parameter resumeFrom + - Interface NodeTypesReimageOptionalParams no longer has parameter resumeFrom + - Interface NodeTypesRestartOptionalParams no longer has parameter resumeFrom + - Interface NodeTypesUpdateOptionalParams no longer has parameter resumeFrom + - Interface ProxyResource no longer has parameter location + - Interface ProxyResource no longer has parameter tags + - Interface Resource no longer has parameter etag + - Interface Resource no longer has parameter location + - Interface Resource no longer has parameter tags + - Interface ServicesCreateOrUpdateOptionalParams no longer has parameter resumeFrom + - Interface ServicesDeleteOptionalParams no longer has parameter resumeFrom + - Interface VmssExtension no longer has parameter autoUpgradeMinorVersion + - Interface VmssExtension no longer has parameter enableAutomaticUpgrade + - Interface VmssExtension no longer has parameter forceUpdateTag + - Interface VmssExtension no longer has parameter protectedSettings + - Interface VmssExtension no longer has parameter provisionAfterExtensions + - Interface VmssExtension no longer has parameter provisioningState + - Interface VmssExtension no longer has parameter publisher + - Interface VmssExtension no longer has parameter settings + - Interface VmssExtension no longer has parameter setupOrder + - Interface VmssExtension no longer has parameter type + - Interface VmssExtension no longer has parameter typeHandlerVersion + - Interface VmssExtension has a new required parameter properties + - Type of parameter serviceTypeHealthPolicyMap of interface ApplicationHealthPolicy is changed from { + [propertyName: string]: ServiceTypeHealthPolicy; + } to Record + - Type of parameter tags of interface ApplicationTypeUpdateParameters is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter tags of interface ApplicationTypeVersionUpdateParameters is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter tags of interface ApplicationUpdateParameters is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter tags of interface ManagedClusterUpdateParameters is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter userAssignedIdentities of interface ManagedIdentity is changed from { + [propertyName: string]: UserAssignedIdentity; + } to Record + - Type of parameter tags of interface NodeTypeUpdateParameters is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter partitionScheme of interface Partition is changed from "Named" | "Singleton" | "UniformInt64Range" to PartitionScheme + - Type of parameter kind of interface ScalingMechanism is changed from "AddRemoveIncrementalNamedPartition" | "ScalePartitionInstanceCount" to ServiceScalingMechanismKind + - Type of parameter kind of interface ScalingTrigger is changed from "AveragePartitionLoadTrigger" | "AverageServiceLoadTrigger" to ServiceScalingTriggerKind + - Type of parameter type of interface ServicePlacementPolicy is changed from "InvalidDomain" | "NonPartiallyPlaceService" | "PreferredPrimaryDomain" | "RequiredDomain" | "RequiredDomainDistribution" to ServicePlacementPolicyType + - Type of parameter tags of interface ServiceUpdateParameters is changed from { + [propertyName: string]: string; + } to Record + - Type of parameter createdByType of interface SystemData is changed from string to CreatedByType + - Type of parameter lastModifiedByType of interface SystemData is changed from string to CreatedByType + - Removed Enum KnownAccess + - Removed Enum KnownAutoGeneratedDomainNameLabelScope + - Removed Enum KnownClusterState + - Removed Enum KnownClusterUpgradeCadence + - Removed Enum KnownClusterUpgradeMode + - Removed Enum KnownDirection + - Removed Enum KnownDiskType + - Removed Enum KnownEvictionPolicyType + - Removed Enum KnownFailureAction + - Removed Enum KnownIPAddressType + - Removed Enum KnownManagedClusterAddOnFeature + - Removed Enum KnownManagedClusterVersionEnvironment + - Removed Enum KnownManagedResourceProvisioningState + - Removed Enum KnownMoveCost + - Removed Enum KnownNodeTypeSkuScaleType + - Removed Enum KnownNsgProtocol + - Removed Enum KnownOsType + - Removed Enum KnownPartitionScheme + - Removed Enum KnownPrivateEndpointNetworkPolicies + - Removed Enum KnownPrivateIPAddressVersion + - Removed Enum KnownPrivateLinkServiceNetworkPolicies + - Removed Enum KnownProbeProtocol + - Removed Enum KnownProtocol + - Removed Enum KnownPublicIPAddressVersion + - Removed Enum KnownRollingUpgradeMode + - Removed Enum KnownSecurityType + - Removed Enum KnownServiceCorrelationScheme + - Removed Enum KnownServiceKind + - Removed Enum KnownServiceLoadMetricWeight + - Removed Enum KnownServicePackageActivationMode + - Removed Enum KnownServicePlacementPolicyType + - Removed Enum KnownServiceScalingMechanismKind + - Removed Enum KnownServiceScalingTriggerKind + - Removed Enum KnownSkuName + - Removed Enum KnownUpdateType + - Removed Enum KnownUpgradeMode + - Removed Enum KnownVmSetupAction + - Removed Enum KnownVmssExtensionSetupOrder + - Removed Enum KnownZonalUpdateMode + - Removed function getContinuationToken + + ## 1.0.0-beta.3 (2024-12-12) Compared with version 1.0.0-beta.2 diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/LICENSE b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/LICENSE index b2f52a2bad4e..2ad4de7b17f0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/LICENSE +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/LICENSE @@ -1,6 +1,6 @@ -Copyright (c) Microsoft Corporation. +The MIT License (MIT) -MIT License +Copyright (c) 2025 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -12,10 +12,10 @@ 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 +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. +SOFTWARE. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md index a9021525afdd..20fc9f71303b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md @@ -4,10 +4,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f Service Fabric Managed Clusters Management Client -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-servicefabricmanagedclusters) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-servicefabricmanagedclusters?view=azure-node-preview) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-servicefabricmanagedclusters) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-servicefabricmanagedclusters?view=azure-node-preview) ## Getting started @@ -30,7 +31,7 @@ Install the Azure ServiceFabricManagedClustersManagement client library for Java npm install @azure/arm-servicefabricmanagedclusters ``` -### Create and authenticate a `ServiceFabricManagedClustersManagementClient` +### Create and authenticate a `ServiceFabricClient` To create a client object to access the Azure ServiceFabricManagedClustersManagement API, you will need the `endpoint` of your Azure ServiceFabricManagedClustersManagement resource and a `credential`. The Azure ServiceFabricManagedClustersManagement client can use Azure Active Directory credentials to authenticate. You can find the endpoint for your Azure ServiceFabricManagedClustersManagement resource in the [Azure Portal][azure_portal]. @@ -47,42 +48,31 @@ You will also need to **register a new AAD application and grant access to Azure 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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; +```javascript +const { ServiceFabricClient } = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new ServiceFabricManagedClustersManagementClient( - new DefaultAzureCredential(), - subscriptionId, -); +const client = new ServiceFabricClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new ServiceFabricClient(credential, subscriptionId); ``` - -For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. - -```ts snippet:ReadmeSampleCreateClient_Browser -import { InteractiveBrowserCredential } from "@azure/identity"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", -}); -const client = new ServiceFabricManagedClustersManagementClient(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 -### ServiceFabricManagedClustersManagementClient +### ServiceFabricClient -`ServiceFabricManagedClustersManagementClient` is the primary interface for developers using the Azure ServiceFabricManagedClustersManagement client library. Explore the methods on this client object to understand the different features of the Azure ServiceFabricManagedClustersManagement service that you can access. +`ServiceFabricClient` is the primary interface for developers using the Azure ServiceFabricManagedClustersManagement client library. Explore the methods on this client object to understand the different features of the Azure ServiceFabricManagedClustersManagement service that you can access. ## Troubleshooting @@ -90,17 +80,13 @@ To use this client library in the browser, first you need to use a bundler. For 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"; - +```javascript +const { setLogLevel } = require("@azure/logger"); setLogLevel("info"); ``` For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). -## Next steps - -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. ## Contributing @@ -110,10 +96,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [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 diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json deleted file mode 100644 index 0b48c26e7d41..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "552b4dd311f90f4a7b2f7adf45461d7a8774a1cc", - "readme": "specification/servicefabricmanagedclusters/resource-manager/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\\servicefabricmanagedclusters\\resource-manager\\readme.md --use=@autorest/typescript@6.0.29 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", - "use": "@autorest/typescript@6.0.29" -} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json index 201a1bbbe0a5..43cf8d0430b6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "dist/esm/index.d.ts", + "mainEntryPointFilePath": "./dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "dist/arm-servicefabricmanagedclusters.d.ts" + "publicTrimmedFilePath": "./types/arm-servicefabricmanagedclusters.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json deleted file mode 100644 index dd55a7791a66..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/servicefabricmanagedclusters/arm-servicefabricmanagedclusters", - "Tag": "js/servicefabricmanagedclusters/arm-servicefabricmanagedclusters_6ace53711e" -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/eslint.config.mjs b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/eslint.config.mjs new file mode 100644 index 000000000000..a9fcfbef11ff --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/eslint.config.mjs @@ -0,0 +1,16 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json index 9a441bf02cdc..73565e458143 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json @@ -1,122 +1,112 @@ { "name": "@azure/arm-servicefabricmanagedclusters", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for ServiceFabricManagedClustersManagementClient.", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", + "description": "A generated SDK for ServiceFabricClient.", "engines": { "node": ">=18.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.19.0", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", + "files": [ + "dist/", + "README.md", + "LICENSE", + "review/", + "CHANGELOG.md" + ], + "sdk-type": "mgmt", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/serviceFabricContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@azure-rest/core-client": "^2.3.1", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.19.0", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "tslib": "^2.8.1" + }, "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", - "@azure/logger": "^1.1.4", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.7.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "@vitest/browser": "^3.0.5", - "@vitest/coverage-istanbul": "^3.0.5", + "@vitest/browser": "^3.0.6", + "@vitest/coverage-istanbul": "^3.0.6", "dotenv": "^16.0.0", + "eslint": "^9.9.0", "playwright": "^1.50.1", - "typescript": "~5.7.2", - "vitest": "^3.0.5" + "typescript": "~5.6.2", + "vitest": "^3.0.6" }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", + "build:samples": "echo skipped", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", "clean": "dev-tool run vendored 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", + "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", "integration-test:node": "dev-tool run test:vitest --esm", - "lint": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run integration-test", - "test:browser": "echo skipped", - "test:node": "echo skipped", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run test:vitest", - "update-snippets": "dev-tool run update-snippets" - }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/serviceFabricManagedClustersManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-servicefabricmanagedclusters?view=azure-node-preview" - }, - "type": "module", - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false + "update-snippets": "echo skipped" }, "browser": "./dist/browser/index.js", "react-native": "./dist/react-native/index.js", @@ -140,5 +130,7 @@ "default": "./dist/commonjs/index.js" } } - } -} + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts" +} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md index ea0dd11a26a6..9f3f757ae1f5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters.api.md @@ -4,14 +4,20 @@ ```ts -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { ClientOptions } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure-rest/core-client'; import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } from '@azure/core-lro'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { Pipeline } from '@azure/core-rest-pipeline'; +import { PollerLike } from '@azure/core-lro'; +import { TokenCredential } from '@azure/core-auth'; // @public -export type Access = string; +export type Access = "allow" | "deny"; + +// @public +export type ActionType = "Internal"; // @public export interface AdditionalNetworkInterfaceConfiguration { @@ -34,239 +40,133 @@ export interface ApplicationHealthPolicy { considerWarningAsError: boolean; defaultServiceTypeHealthPolicy?: ServiceTypeHealthPolicy; maxPercentUnhealthyDeployedApplications: number; - serviceTypeHealthPolicyMap?: { - [propertyName: string]: ServiceTypeHealthPolicy; - }; + serviceTypeHealthPolicyMap?: Record; } // @public export interface ApplicationResource extends ProxyResource { identity?: ManagedIdentity; + location?: string; + properties?: ApplicationResourceProperties; + tags?: Record; +} + +// @public +export interface ApplicationResourceProperties { managedIdentities?: ApplicationUserAssignedIdentity[]; - parameters?: { - [propertyName: string]: string; - }; + parameters?: Record; readonly provisioningState?: string; upgradePolicy?: ApplicationUpgradePolicy; version?: string; } // @public -export interface ApplicationResourceList { - readonly nextLink?: string; - // (undocumented) - value?: ApplicationResource[]; -} - -// @public -export interface Applications { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationResource, options?: ApplicationsCreateOrUpdateOptionalParams): Promise, ApplicationsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationResource, options?: ApplicationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): Promise; - beginReadUpgrade(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsReadUpgradeOptionalParams): Promise, ApplicationsReadUpgradeResponse>>; - beginReadUpgradeAndWait(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsReadUpgradeOptionalParams): Promise; - beginResumeUpgrade(resourceGroupName: string, clusterName: string, applicationName: string, parameters: RuntimeResumeApplicationUpgradeParameters, options?: ApplicationsResumeUpgradeOptionalParams): Promise, ApplicationsResumeUpgradeResponse>>; - beginResumeUpgradeAndWait(resourceGroupName: string, clusterName: string, applicationName: string, parameters: RuntimeResumeApplicationUpgradeParameters, options?: ApplicationsResumeUpgradeOptionalParams): Promise; - beginStartRollback(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsStartRollbackOptionalParams): Promise, ApplicationsStartRollbackResponse>>; - beginStartRollbackAndWait(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsStartRollbackOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsGetOptionalParams): Promise; - list(resourceGroupName: string, clusterName: string, options?: ApplicationsListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationUpdateParameters, options?: ApplicationsUpdateOptionalParams): Promise; -} - -// @public -export interface ApplicationsCreateOrUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApplicationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApplicationsCreateOrUpdateResponse = ApplicationResource; - -// @public -export interface ApplicationsDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApplicationsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface ApplicationsGetOptionalParams extends coreClient.OperationOptions { +export interface ApplicationsGetOptionalParams extends OperationOptions { } // @public -export type ApplicationsGetResponse = ApplicationResource; - -// @public -export interface ApplicationsListNextOptionalParams extends coreClient.OperationOptions { +export interface ApplicationsListOptionalParams extends OperationOptions { } // @public -export type ApplicationsListNextResponse = ApplicationResourceList; - -// @public -export interface ApplicationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApplicationsListResponse = ApplicationResourceList; - -// @public -export interface ApplicationsReadUpgradeHeaders { - azureAsyncOperation?: string; - location?: string; +export interface ApplicationsOperations { + createOrUpdate: (resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationResource, options?: ApplicationsCreateOrUpdateOptionalParams) => PollerLike, void>; + delete: (resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsGetOptionalParams) => Promise; + list: (resourceGroupName: string, clusterName: string, options?: ApplicationsListOptionalParams) => PagedAsyncIterableIterator; + readUpgrade: (resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsReadUpgradeOptionalParams) => PollerLike, void>; + resumeUpgrade: (resourceGroupName: string, clusterName: string, applicationName: string, parameters: RuntimeResumeApplicationUpgradeParameters, options?: ApplicationsResumeUpgradeOptionalParams) => PollerLike, void>; + startRollback: (resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsStartRollbackOptionalParams) => PollerLike, void>; + update: (resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationUpdateParameters, options?: ApplicationsUpdateOptionalParams) => Promise; } // @public -export interface ApplicationsReadUpgradeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationsReadUpgradeOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApplicationsReadUpgradeResponse = ApplicationsReadUpgradeHeaders; - -// @public -export interface ApplicationsResumeUpgradeHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApplicationsResumeUpgradeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationsResumeUpgradeOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApplicationsResumeUpgradeResponse = ApplicationsResumeUpgradeHeaders; - -// @public -export interface ApplicationsStartRollbackHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApplicationsStartRollbackOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationsStartRollbackOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApplicationsStartRollbackResponse = ApplicationsStartRollbackHeaders; - -// @public -export interface ApplicationsUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApplicationsUpdateOptionalParams extends OperationOptions { } -// @public -export type ApplicationsUpdateResponse = ApplicationResource; - // @public export interface ApplicationTypeResource extends ProxyResource { - readonly provisioningState?: string; -} - -// @public -export interface ApplicationTypeResourceList { - readonly nextLink?: string; - // (undocumented) - value?: ApplicationTypeResource[]; + location?: string; + properties?: ApplicationTypeResourceProperties; + tags?: Record; } // @public -export interface ApplicationTypes { - beginDelete(resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, clusterName: string, applicationTypeName: string, parameters: ApplicationTypeResource, options?: ApplicationTypesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypesGetOptionalParams): Promise; - list(resourceGroupName: string, clusterName: string, options?: ApplicationTypesListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, applicationTypeName: string, parameters: ApplicationTypeUpdateParameters, options?: ApplicationTypesUpdateOptionalParams): Promise; +export interface ApplicationTypeResourceProperties { + readonly provisioningState?: string; } // @public -export interface ApplicationTypesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypesCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export type ApplicationTypesCreateOrUpdateResponse = ApplicationTypeResource; - -// @public -export interface ApplicationTypesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationTypesDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface ApplicationTypesGetOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypesGetOptionalParams extends OperationOptions { } // @public -export type ApplicationTypesGetResponse = ApplicationTypeResource; - -// @public -export interface ApplicationTypesListNextOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypesListOptionalParams extends OperationOptions { } // @public -export type ApplicationTypesListNextResponse = ApplicationTypeResourceList; - -// @public -export interface ApplicationTypesListOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypesOperations { + createOrUpdate: (resourceGroupName: string, clusterName: string, applicationTypeName: string, parameters: ApplicationTypeResource, options?: ApplicationTypesCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypesDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypesGetOptionalParams) => Promise; + list: (resourceGroupName: string, clusterName: string, options?: ApplicationTypesListOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterName: string, applicationTypeName: string, parameters: ApplicationTypeUpdateParameters, options?: ApplicationTypesUpdateOptionalParams) => Promise; } // @public -export type ApplicationTypesListResponse = ApplicationTypeResourceList; - -// @public -export interface ApplicationTypesUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypesUpdateOptionalParams extends OperationOptions { } -// @public -export type ApplicationTypesUpdateResponse = ApplicationTypeResource; - // @public export interface ApplicationTypeUpdateParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public export interface ApplicationTypeVersionResource extends ProxyResource { - appPackageUrl?: string; - readonly provisioningState?: string; -} - -// @public -export interface ApplicationTypeVersionResourceList { - readonly nextLink?: string; - // (undocumented) - value?: ApplicationTypeVersionResource[]; + location?: string; + properties?: ApplicationTypeVersionResourceProperties; + tags?: Record; } // @public -export interface ApplicationTypeVersions { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, parameters: ApplicationTypeVersionResource, options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams): Promise, ApplicationTypeVersionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, parameters: ApplicationTypeVersionResource, options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, options?: ApplicationTypeVersionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, options?: ApplicationTypeVersionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, options?: ApplicationTypeVersionsGetOptionalParams): Promise; - listByApplicationTypes(resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, parameters: ApplicationTypeVersionUpdateParameters, options?: ApplicationTypeVersionsUpdateOptionalParams): Promise; +export interface ApplicationTypeVersionResourceProperties { + appPackageUrl: string; + readonly provisioningState?: string; } // @public @@ -275,72 +175,44 @@ export interface ApplicationTypeVersionsCleanupPolicy { } // @public -export interface ApplicationTypeVersionsCreateOrUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApplicationTypeVersionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationTypeVersionsCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApplicationTypeVersionsCreateOrUpdateResponse = ApplicationTypeVersionResource; - -// @public -export interface ApplicationTypeVersionsDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApplicationTypeVersionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApplicationTypeVersionsDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface ApplicationTypeVersionsGetOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypeVersionsGetOptionalParams extends OperationOptions { } // @public -export type ApplicationTypeVersionsGetResponse = ApplicationTypeVersionResource; - -// @public -export interface ApplicationTypeVersionsListByApplicationTypesNextOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypeVersionsListByApplicationTypesOptionalParams extends OperationOptions { } // @public -export type ApplicationTypeVersionsListByApplicationTypesNextResponse = ApplicationTypeVersionResourceList; - -// @public -export interface ApplicationTypeVersionsListByApplicationTypesOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypeVersionsOperations { + createOrUpdate: (resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, parameters: ApplicationTypeVersionResource, options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams) => PollerLike, void>; + delete: (resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, options?: ApplicationTypeVersionsDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, options?: ApplicationTypeVersionsGetOptionalParams) => Promise; + listByApplicationTypes: (resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, parameters: ApplicationTypeVersionUpdateParameters, options?: ApplicationTypeVersionsUpdateOptionalParams) => Promise; } // @public -export type ApplicationTypeVersionsListByApplicationTypesResponse = ApplicationTypeVersionResourceList; - -// @public -export interface ApplicationTypeVersionsUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApplicationTypeVersionsUpdateOptionalParams extends OperationOptions { } -// @public -export type ApplicationTypeVersionsUpdateResponse = ApplicationTypeVersionResource; - // @public export interface ApplicationTypeVersionUpdateParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public export interface ApplicationUpdateParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public @@ -354,22 +226,14 @@ export interface ApplicationUpgradePolicy { upgradeReplicaSetCheckTimeout?: number; } -// @public (undocumented) +// @public export interface ApplicationUserAssignedIdentity { name: string; principalId: string; } // @public -export type AutoGeneratedDomainNameLabelScope = string; - -// @public -export interface AvailableOperationDisplay { - description?: string; - operation?: string; - provider?: string; - resource?: string; -} +export type AutoGeneratedDomainNameLabelScope = "TenantReuse" | "SubscriptionReuse" | "ResourceGroupReuse" | "NoReuse"; // @public export interface AveragePartitionLoadScalingTrigger extends ScalingTrigger { @@ -421,10 +285,10 @@ export interface ClusterMonitoringPolicy { } // @public -export type ClusterState = string; +export type ClusterState = "WaitingForNodes" | "Deploying" | "BaselineUpgrade" | "Upgrading" | "UpgradeFailed" | "Ready"; // @public -export type ClusterUpgradeCadence = string; +export type ClusterUpgradeCadence = "Wave0" | "Wave1" | "Wave2"; // @public export interface ClusterUpgradeDeltaHealthPolicy { @@ -434,7 +298,7 @@ export interface ClusterUpgradeDeltaHealthPolicy { } // @public -export type ClusterUpgradeMode = string; +export type ClusterUpgradeMode = "Automatic" | "Manual"; // @public export interface ClusterUpgradePolicy { @@ -446,334 +310,141 @@ export interface ClusterUpgradePolicy { } // @public -export type Direction = string; - -// @public -export type DiskType = string; - -// @public -export interface EndpointRangeDescription { - endPort: number; - startPort: number; -} - -// @public -export interface ErrorModel { - error?: ErrorModelError; -} - -// @public -export interface ErrorModelError { - code?: string; - message?: string; -} - -// @public -export type EvictionPolicyType = string; - -// @public -export type FailureAction = string; +export type ContinuablePage = TPage & { + continuationToken?: string; +}; // @public -export interface FrontendConfiguration { - applicationGatewayBackendAddressPoolId?: string; - ipAddressType?: IPAddressType; - loadBalancerBackendAddressPoolId?: string; - loadBalancerInboundNatPoolId?: string; -} - -// @public -export function getContinuationToken(page: unknown): string | undefined; +export type CreatedByType = "User" | "Application" | "ManagedIdentity" | "Key"; // @public -export type IPAddressType = string; +export type Direction = "inbound" | "outbound"; // @public -export interface IpConfiguration { - applicationGatewayBackendAddressPools?: SubResource[]; - loadBalancerBackendAddressPools?: SubResource[]; - loadBalancerInboundNatPools?: SubResource[]; - name: string; - privateIPAddressVersion?: PrivateIPAddressVersion; - publicIPAddressConfiguration?: IpConfigurationPublicIPAddressConfiguration; - subnet?: SubResource; -} +export type DiskType = "Standard_LRS" | "StandardSSD_LRS" | "Premium_LRS" | "PremiumV2_LRS" | "StandardSSD_ZRS" | "Premium_ZRS"; // @public -export interface IpConfigurationPublicIPAddressConfiguration { - ipTags?: IpTag[]; - name: string; - publicIPAddressVersion?: PublicIPAddressVersion; -} - -// @public -export interface IpTag { - ipTagType: string; - tag: string; -} - -// @public -export enum KnownAccess { - Allow = "allow", - Deny = "deny" -} - -// @public -export enum KnownAutoGeneratedDomainNameLabelScope { - NoReuse = "NoReuse", - ResourceGroupReuse = "ResourceGroupReuse", - SubscriptionReuse = "SubscriptionReuse", - TenantReuse = "TenantReuse" -} - -// @public -export enum KnownClusterState { - BaselineUpgrade = "BaselineUpgrade", - Deploying = "Deploying", - Ready = "Ready", - UpgradeFailed = "UpgradeFailed", - Upgrading = "Upgrading", - WaitingForNodes = "WaitingForNodes" -} - -// @public -export enum KnownClusterUpgradeCadence { - Wave0 = "Wave0", - Wave1 = "Wave1", - Wave2 = "Wave2" -} - -// @public -export enum KnownClusterUpgradeMode { - Automatic = "Automatic", - Manual = "Manual" -} - -// @public -export enum KnownDirection { - Inbound = "inbound", - Outbound = "outbound" -} - -// @public -export enum KnownDiskType { - PremiumLRS = "Premium_LRS", - StandardLRS = "Standard_LRS", - StandardSSDLRS = "StandardSSD_LRS" -} - -// @public -export enum KnownEvictionPolicyType { - Deallocate = "Deallocate", - Delete = "Delete" -} - -// @public -export enum KnownFailureAction { - Manual = "Manual", - Rollback = "Rollback" -} - -// @public -export enum KnownIPAddressType { - IPv4 = "IPv4", - IPv6 = "IPv6" -} - -// @public -export enum KnownManagedClusterAddOnFeature { - BackupRestoreService = "BackupRestoreService", - DnsService = "DnsService", - ResourceMonitorService = "ResourceMonitorService" -} - -// @public -export enum KnownManagedClusterVersionEnvironment { - Windows = "Windows" -} - -// @public -export enum KnownManagedResourceProvisioningState { - Canceled = "Canceled", - Created = "Created", - Creating = "Creating", - Deleted = "Deleted", - Deleting = "Deleting", - Failed = "Failed", - None = "None", - Other = "Other", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownMoveCost { - High = "High", - Low = "Low", - Medium = "Medium", - Zero = "Zero" -} - -// @public -export enum KnownNodeTypeSkuScaleType { - Automatic = "Automatic", - Manual = "Manual", - None = "None" -} - -// @public -export enum KnownNsgProtocol { - Ah = "ah", - Esp = "esp", - Http = "http", - Https = "https", - Icmp = "icmp", - Tcp = "tcp", - Udp = "udp" -} - -// @public -export enum KnownOsType { - Windows = "Windows" -} - -// @public -export enum KnownPartitionScheme { - Named = "Named", - Singleton = "Singleton", - UniformInt64Range = "UniformInt64Range" +export interface EndpointRangeDescription { + endPort: number; + startPort: number; } // @public -export enum KnownPrivateEndpointNetworkPolicies { - Disabled = "disabled", - Enabled = "enabled" -} +export type Environment = "Windows" | "Linux"; // @public -export enum KnownPrivateIPAddressVersion { - IPv4 = "IPv4", - IPv6 = "IPv6" +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; } // @public -export enum KnownPrivateLinkServiceNetworkPolicies { - Disabled = "disabled", - Enabled = "enabled" +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; } // @public -export enum KnownProbeProtocol { - Http = "http", - Https = "https", - Tcp = "tcp" +export interface ErrorModelError { + code?: string; + message?: string; } // @public -export enum KnownProtocol { - Tcp = "tcp", - Udp = "udp" +export interface ErrorResponse { + error?: ErrorDetail; } // @public -export enum KnownPublicIPAddressVersion { - IPv4 = "IPv4", - IPv6 = "IPv6" -} +export type EvictionPolicyType = "Delete" | "Deallocate"; // @public -export enum KnownRollingUpgradeMode { - Monitored = "Monitored", - UnmonitoredAuto = "UnmonitoredAuto" -} +export type FailureAction = "Rollback" | "Manual"; // @public -export enum KnownSecurityType { - Standard = "Standard", - TrustedLaunch = "TrustedLaunch" -} +export type FaultKind = "Zone"; // @public -export enum KnownServiceCorrelationScheme { - AlignedAffinity = "AlignedAffinity", - NonAlignedAffinity = "NonAlignedAffinity" +export interface FaultSimulation { + details?: FaultSimulationDetails; + endTime?: Date; + simulationId?: string; + startTime?: Date; + status?: FaultSimulationStatus; } // @public -export enum KnownServiceKind { - Stateful = "Stateful", - Stateless = "Stateless" +export interface FaultSimulationConstraints { + expirationTime?: Date; } // @public -export enum KnownServiceLoadMetricWeight { - High = "High", - Low = "Low", - Medium = "Medium", - Zero = "Zero" +export interface FaultSimulationDetails { + clusterId?: string; + nodeTypeFaultSimulation?: NodeTypeFaultSimulation[]; + operationId?: string; + parameters?: FaultSimulationParametersUnion; } // @public -export enum KnownServicePackageActivationMode { - ExclusiveProcess = "ExclusiveProcess", - SharedProcess = "SharedProcess" +export interface FaultSimulationIdParameters { + simulationId: string; } // @public -export enum KnownServicePlacementPolicyType { - InvalidDomain = "InvalidDomain", - NonPartiallyPlaceService = "NonPartiallyPlaceService", - PreferredPrimaryDomain = "PreferredPrimaryDomain", - RequiredDomain = "RequiredDomain", - RequiredDomainDistribution = "RequiredDomainDistribution" +export interface FaultSimulationParameters { + constraints?: FaultSimulationConstraints; + faultKind: FaultKind; + force?: boolean; } // @public -export enum KnownServiceScalingMechanismKind { - AddRemoveIncrementalNamedPartition = "AddRemoveIncrementalNamedPartition", - ScalePartitionInstanceCount = "ScalePartitionInstanceCount" -} +export type FaultSimulationParametersUnion = ZoneFaultSimulationParameters | FaultSimulationParameters; // @public -export enum KnownServiceScalingTriggerKind { - AveragePartitionLoadTrigger = "AveragePartitionLoadTrigger", - AverageServiceLoadTrigger = "AverageServiceLoadTrigger" -} +export type FaultSimulationStatus = "Starting" | "Active" | "Stopping" | "Done" | "StartFailed" | "StopFailed"; // @public -export enum KnownSkuName { - Basic = "Basic", - Standard = "Standard" +export interface FrontendConfiguration { + applicationGatewayBackendAddressPoolId?: string; + ipAddressType?: IPAddressType; + loadBalancerBackendAddressPoolId?: string; + loadBalancerInboundNatPoolId?: string; } // @public -export enum KnownUpdateType { - ByUpgradeDomain = "ByUpgradeDomain", - Default = "Default" -} +export type IPAddressType = "IPv4" | "IPv6"; // @public -export enum KnownUpgradeMode { - Monitored = "Monitored", - UnmonitoredAuto = "UnmonitoredAuto", - UnmonitoredManual = "UnmonitoredManual" +export interface IpConfiguration { + applicationGatewayBackendAddressPools?: SubResource[]; + loadBalancerBackendAddressPools?: SubResource[]; + loadBalancerInboundNatPools?: SubResource[]; + name: string; + privateIPAddressVersion?: PrivateIPAddressVersion; + publicIPAddressConfiguration?: IpConfigurationPublicIPAddressConfiguration; + subnet?: SubResource; } // @public -export enum KnownVmSetupAction { - EnableContainers = "EnableContainers", - EnableHyperV = "EnableHyperV" +export interface IpConfigurationPublicIPAddressConfiguration { + ipTags?: IpTag[]; + name: string; + publicIPAddressVersion?: PublicIPAddressVersion; } // @public -export enum KnownVmssExtensionSetupOrder { - BeforeSFRuntime = "BeforeSFRuntime" +export interface IpTag { + ipTagType: string; + tag: string; } // @public -export enum KnownZonalUpdateMode { - Fast = "Fast", - Standard = "Standard" +export enum KnownVersions { + v2024_11_01_preview = "2024-11-01-preview" } // @public @@ -797,15 +468,6 @@ export interface LongRunningOperationResult { status?: string; } -// @public -export interface ManagedApplyMaintenanceWindow { - post(resourceGroupName: string, clusterName: string, options?: ManagedApplyMaintenanceWindowPostOptionalParams): Promise; -} - -// @public -export interface ManagedApplyMaintenanceWindowPostOptionalParams extends coreClient.OperationOptions { -} - // @public export interface ManagedAzResiliencyStatus { baseResourceStatus?: ResourceAzStatus[]; @@ -813,22 +475,28 @@ export interface ManagedAzResiliencyStatus { } // @public -export interface ManagedAzResiliencyStatusGetOptionalParams extends coreClient.OperationOptions { +export interface ManagedCluster extends TrackedResource { + readonly etag?: string; + properties?: ManagedClusterProperties; + sku?: Sku; } // @public -export type ManagedAzResiliencyStatusGetResponse = ManagedAzResiliencyStatus; +export type ManagedClusterAddOnFeature = "DnsService" | "BackupRestoreService" | "ResourceMonitorService"; // @public -export interface ManagedAzResiliencyStatusOperations { - get(resourceGroupName: string, clusterName: string, options?: ManagedAzResiliencyStatusGetOptionalParams): Promise; +export interface ManagedClusterCodeVersionResult { + id?: string; + name?: string; + properties?: ManagedClusterVersionDetails; + type?: string; } // @public -export interface ManagedCluster extends Resource { +export interface ManagedClusterProperties { addonFeatures?: ManagedClusterAddOnFeature[]; adminPassword?: string; - adminUserName?: string; + adminUserName: string; allocatedOutboundPorts?: number; allowRdpAccess?: boolean; applicationTypeVersionsCleanupPolicy?: ApplicationTypeVersionsCleanupPolicy; @@ -844,7 +512,7 @@ export interface ManagedCluster extends Resource { clusterUpgradeCadence?: ClusterUpgradeCadence; clusterUpgradeMode?: ClusterUpgradeMode; ddosProtectionPlanId?: string; - dnsName?: string; + dnsName: string; enableAutoOSUpgrade?: boolean; enableHttpGatewayExclusiveAuthMode?: boolean; enableIpv6?: boolean; @@ -862,169 +530,128 @@ export interface ManagedCluster extends Resource { publicIPPrefixId?: string; publicIPv6PrefixId?: string; serviceEndpoints?: ServiceEndpoint[]; - sku: Sku; subnetId?: string; - upgradeDescription?: ClusterUpgradePolicy; - useCustomVnet?: boolean; - zonalResiliency?: boolean; - zonalUpdateMode?: ZonalUpdateMode; -} - -// @public -export type ManagedClusterAddOnFeature = string; - -// @public -export interface ManagedClusterCodeVersionResult { - clusterCodeVersion?: string; - id?: string; - name?: string; - osType?: OsType; - supportExpiryUtc?: string; - type?: string; -} - -// @public -export interface ManagedClusterListResult { - nextLink?: string; - // (undocumented) - value?: ManagedCluster[]; -} - -// @public -export interface ManagedClusters { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise, ManagedClustersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ManagedClustersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ManagedClustersDeleteOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, options?: ManagedClustersGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ManagedClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ManagedClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, parameters: ManagedClusterUpdateParameters, options?: ManagedClustersUpdateOptionalParams): Promise; + upgradeDescription?: ClusterUpgradePolicy; + useCustomVnet?: boolean; + zonalResiliency?: boolean; + zonalUpdateMode?: ZonalUpdateMode; } // @public -export interface ManagedClustersCreateOrUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface ManagedClustersCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ManagedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ManagedClustersDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ManagedClustersCreateOrUpdateResponse = ManagedCluster; - -// @public -export interface ManagedClustersDeleteHeaders { - azureAsyncOperation?: string; - location?: string; +export interface ManagedClustersGetFaultSimulationOptionalParams extends OperationOptions { } // @public -export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ManagedClustersGetOptionalParams extends OperationOptions { } // @public -export interface ManagedClustersGetOptionalParams extends coreClient.OperationOptions { +export interface ManagedClustersListByResourceGroupOptionalParams extends OperationOptions { } // @public -export type ManagedClustersGetResponse = ManagedCluster; - -// @public -export interface ManagedClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface ManagedClustersListBySubscriptionOptionalParams extends OperationOptions { } // @public -export type ManagedClustersListByResourceGroupNextResponse = ManagedClusterListResult; - -// @public -export interface ManagedClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface ManagedClustersListFaultSimulationOptionalParams extends OperationOptions { } // @public -export type ManagedClustersListByResourceGroupResponse = ManagedClusterListResult; +export interface ManagedClustersManagedAzResiliencyStatusGetOptionalParams extends OperationOptions { +} // @public -export interface ManagedClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export interface ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams extends OperationOptions { } // @public -export type ManagedClustersListBySubscriptionNextResponse = ManagedClusterListResult; +export interface ManagedClustersOperations { + createOrUpdate: (resourceGroupName: string, clusterName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams) => PollerLike, void>; + delete: (resourceGroupName: string, clusterName: string, options?: ManagedClustersDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, clusterName: string, options?: ManagedClustersGetOptionalParams) => Promise; + getFaultSimulation: (resourceGroupName: string, clusterName: string, parameters: FaultSimulationIdParameters, options?: ManagedClustersGetFaultSimulationOptionalParams) => Promise; + listByResourceGroup: (resourceGroupName: string, options?: ManagedClustersListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (options?: ManagedClustersListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + listFaultSimulation: (resourceGroupName: string, clusterName: string, options?: ManagedClustersListFaultSimulationOptionalParams) => PagedAsyncIterableIterator; + managedAzResiliencyStatusGet: (resourceGroupName: string, clusterName: string, options?: ManagedClustersManagedAzResiliencyStatusGetOptionalParams) => Promise; + managedMaintenanceWindowStatusGet: (resourceGroupName: string, clusterName: string, options?: ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams) => Promise; + post: (resourceGroupName: string, clusterName: string, options?: ManagedClustersPostOptionalParams) => Promise; + startFaultSimulation: (resourceGroupName: string, clusterName: string, parameters: FaultSimulationParametersUnion, options?: ManagedClustersStartFaultSimulationOptionalParams) => PollerLike, void>; + stopFaultSimulation: (resourceGroupName: string, clusterName: string, parameters: FaultSimulationIdParameters, options?: ManagedClustersStopFaultSimulationOptionalParams) => PollerLike, void>; + update: (resourceGroupName: string, clusterName: string, parameters: ManagedClusterUpdateParameters, options?: ManagedClustersUpdateOptionalParams) => Promise; +} // @public -export interface ManagedClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface ManagedClustersPostOptionalParams extends OperationOptions { } // @public -export type ManagedClustersListBySubscriptionResponse = ManagedClusterListResult; +export interface ManagedClustersStartFaultSimulationOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface ManagedClustersUpdateOptionalParams extends coreClient.OperationOptions { +export interface ManagedClustersStopFaultSimulationOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type ManagedClustersUpdateResponse = ManagedCluster; +export interface ManagedClustersUpdateOptionalParams extends OperationOptions { +} // @public export interface ManagedClusterUpdateParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export interface ManagedClusterVersion { - get(location: string, clusterVersion: string, options?: ManagedClusterVersionGetOptionalParams): Promise; - getByEnvironment(location: string, environment: ManagedClusterVersionEnvironment, clusterVersion: string, options?: ManagedClusterVersionGetByEnvironmentOptionalParams): Promise; - list(location: string, options?: ManagedClusterVersionListOptionalParams): Promise; - listByEnvironment(location: string, environment: ManagedClusterVersionEnvironment, options?: ManagedClusterVersionListByEnvironmentOptionalParams): Promise; +export interface ManagedClusterVersionDetails { + clusterCodeVersion?: string; + osType?: OsType; + supportExpiryUtc?: string; } // @public -export type ManagedClusterVersionEnvironment = string; - -// @public -export interface ManagedClusterVersionGetByEnvironmentOptionalParams extends coreClient.OperationOptions { +export interface ManagedClusterVersionGetByEnvironmentOptionalParams extends OperationOptions { } // @public -export type ManagedClusterVersionGetByEnvironmentResponse = ManagedClusterCodeVersionResult; - -// @public -export interface ManagedClusterVersionGetOptionalParams extends coreClient.OperationOptions { +export interface ManagedClusterVersionGetOptionalParams extends OperationOptions { } // @public -export type ManagedClusterVersionGetResponse = ManagedClusterCodeVersionResult; - -// @public -export interface ManagedClusterVersionListByEnvironmentOptionalParams extends coreClient.OperationOptions { +export interface ManagedClusterVersionListByEnvironmentOptionalParams extends OperationOptions { } // @public -export type ManagedClusterVersionListByEnvironmentResponse = ManagedClusterCodeVersionResult[]; - -// @public -export interface ManagedClusterVersionListOptionalParams extends coreClient.OperationOptions { +export interface ManagedClusterVersionListOptionalParams extends OperationOptions { } // @public -export type ManagedClusterVersionListResponse = ManagedClusterCodeVersionResult[]; +export interface ManagedClusterVersionOperations { + get: (location: string, clusterVersion: string, options?: ManagedClusterVersionGetOptionalParams) => Promise; + getByEnvironment: (location: string, environment: Environment, clusterVersion: string, options?: ManagedClusterVersionGetByEnvironmentOptionalParams) => Promise; + list: (location: string, options?: ManagedClusterVersionListOptionalParams) => Promise; + listByEnvironment: (location: string, environment: Environment, options?: ManagedClusterVersionListByEnvironmentOptionalParams) => Promise; +} // @public export interface ManagedIdentity { readonly principalId?: string; readonly tenantId?: string; type?: ManagedIdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentity; - }; + userAssignedIdentities?: Record; } // @public @@ -1042,74 +669,32 @@ export interface ManagedMaintenanceWindowStatus { } // @public -export interface ManagedMaintenanceWindowStatusGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedMaintenanceWindowStatusGetResponse = ManagedMaintenanceWindowStatus; - -// @public -export interface ManagedMaintenanceWindowStatusOperations { - get(resourceGroupName: string, clusterName: string, options?: ManagedMaintenanceWindowStatusGetOptionalParams): Promise; -} +export type ManagedResourceProvisioningState = "None" | "Creating" | "Created" | "Updating" | "Succeeded" | "Failed" | "Canceled" | "Deleting" | "Deleted" | "Other"; // @public -export interface ManagedProxyResource { +export interface ManagedVMSize { readonly id?: string; readonly name?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; + readonly properties?: VMSize; readonly type?: string; } // @public -export type ManagedResourceProvisioningState = string; - -// @public -export interface ManagedUnsupportedVMSizes { - get(location: string, vmSize: string, options?: ManagedUnsupportedVMSizesGetOptionalParams): Promise; - list(location: string, options?: ManagedUnsupportedVMSizesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ManagedUnsupportedVMSizesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedUnsupportedVMSizesGetResponse = ManagedVMSize; - -// @public -export interface ManagedUnsupportedVMSizesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedUnsupportedVMSizesListNextResponse = ManagedVMSizesResult; - -// @public -export interface ManagedUnsupportedVMSizesListOptionalParams extends coreClient.OperationOptions { +export interface ManagedVMSizesGetOptionalParams extends OperationOptions { } // @public -export type ManagedUnsupportedVMSizesListResponse = ManagedVMSizesResult; - -// @public -export interface ManagedVMSize { - readonly id?: string; - readonly name?: string; - readonly properties?: VMSize; - readonly type?: string; +export interface ManagedVMSizesListOptionalParams extends OperationOptions { } // @public -export interface ManagedVMSizesResult { - readonly nextLink?: string; - value?: ManagedVMSize[]; +export interface ManagedVMSizesOperations { + get: (location: string, vmSize: string, options?: ManagedVMSizesGetOptionalParams) => Promise; + list: (location: string, options?: ManagedVMSizesListOptionalParams) => PagedAsyncIterableIterator; } // @public -export type MoveCost = string; +export type MoveCost = "Zero" | "Low" | "Medium" | "High"; // @public export interface NamedPartitionScheme extends Partition { @@ -1136,13 +721,47 @@ export interface NetworkSecurityRule { } // @public -export interface NodeType extends ManagedProxyResource { +export interface NodeType extends ProxyResource { + properties?: NodeTypeProperties; + sku?: NodeTypeSku; + tags?: Record; +} + +// @public +export interface NodeTypeActionParameters { + force?: boolean; + nodes?: string[]; + updateType?: UpdateType; +} + +// @public +export interface NodeTypeAvailableSku { + readonly capacity?: NodeTypeSkuCapacity; + readonly resourceType?: string; + readonly sku?: NodeTypeSupportedSku; +} + +// @public +export interface NodeTypeFaultSimulation { + nodeTypeName?: string; + operationId?: string; + operationStatus?: SfmcOperationStatus; + status?: FaultSimulationStatus; +} + +// @public +export interface NodeTypeNatConfig { + backendPort?: number; + frontendPortRangeEnd?: number; + frontendPortRangeStart?: number; +} + +// @public +export interface NodeTypeProperties { additionalDataDisks?: VmssDataDisk[]; additionalNetworkInterfaceConfigurations?: AdditionalNetworkInterfaceConfiguration[]; applicationPorts?: EndpointRangeDescription; - capacities?: { - [propertyName: string]: string; - }; + capacities?: Record; computerNamePrefix?: string; dataDiskLetter?: string; dataDiskSizeGB?: number; @@ -1157,21 +776,18 @@ export interface NodeType extends ManagedProxyResource { evictionPolicy?: EvictionPolicyType; frontendConfigurations?: FrontendConfiguration[]; hostGroupId?: string; - isPrimary?: boolean; + isPrimary: boolean; isSpotVM?: boolean; isStateless?: boolean; multiplePlacementGroups?: boolean; natConfigurations?: NodeTypeNatConfig[]; natGatewayId?: string; networkSecurityRules?: NetworkSecurityRule[]; - placementProperties?: { - [propertyName: string]: string; - }; + placementProperties?: Record; readonly provisioningState?: ManagedResourceProvisioningState; secureBootEnabled?: boolean; securityType?: SecurityType; serviceArtifactReferenceId?: string; - sku?: NodeTypeSku; spotRestoreTimeout?: string; subnetId?: string; useDefaultPublicLoadBalancer?: boolean; @@ -1185,7 +801,7 @@ export interface NodeType extends ManagedProxyResource { vmImageResourceId?: string; vmImageSku?: string; vmImageVersion?: string; - vmInstanceCount?: number; + vmInstanceCount: number; vmManagedIdentity?: VmManagedIdentity; vmSecrets?: VaultSecretGroup[]; vmSetupActions?: VmSetupAction[]; @@ -1195,101 +811,32 @@ export interface NodeType extends ManagedProxyResource { } // @public -export interface NodeTypeActionParameters { - force?: boolean; - nodes?: string[]; - updateType?: UpdateType; -} - -// @public -export interface NodeTypeAvailableSku { - readonly capacity?: NodeTypeSkuCapacity; - readonly resourceType?: string; - readonly sku?: NodeTypeSupportedSku; -} - -// @public -export interface NodeTypeListResult { - nextLink?: string; - value?: NodeType[]; -} - -// @public -export interface NodeTypeListSkuResult { - nextLink?: string; - value?: NodeTypeAvailableSku[]; -} - -// @public -export interface NodeTypeNatConfig { - backendPort?: number; - frontendPortRangeEnd?: number; - frontendPortRangeStart?: number; -} - -// @public -export interface NodeTypes { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeType, options?: NodeTypesCreateOrUpdateOptionalParams): Promise, NodeTypesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeType, options?: NodeTypesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesDeleteOptionalParams): Promise; - beginDeleteNode(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesDeleteNodeOptionalParams): Promise, void>>; - beginDeleteNodeAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesDeleteNodeOptionalParams): Promise; - beginReimage(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesReimageOptionalParams): Promise, void>>; - beginReimageAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesReimageOptionalParams): Promise; - beginRestart(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesRestartOptionalParams): Promise, void>>; - beginRestartAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesRestartOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams): Promise, NodeTypesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesGetOptionalParams): Promise; - listByManagedClusters(resourceGroupName: string, clusterName: string, options?: NodeTypesListByManagedClustersOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface NodeTypesCreateOrUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface NodeTypesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface NodeTypesCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type NodeTypesCreateOrUpdateResponse = NodeType; - -// @public -export interface NodeTypesDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface NodeTypesDeleteNodeHeaders { - azureAsyncOperation?: string; - location?: string; +export interface NodeTypesDeallocateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface NodeTypesDeleteNodeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface NodeTypesDeleteNodeOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface NodeTypesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface NodeTypesDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface NodeTypesGetOptionalParams extends coreClient.OperationOptions { +export interface NodeTypesGetFaultSimulationOptionalParams extends OperationOptions { } // @public -export type NodeTypesGetResponse = NodeType; +export interface NodeTypesGetOptionalParams extends OperationOptions { +} // @public export interface NodeTypeSku { @@ -1307,79 +854,74 @@ export interface NodeTypeSkuCapacity { } // @public -export interface NodeTypeSkus { - list(resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypeSkusListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export type NodeTypeSkuScaleType = string; +export type NodeTypeSkuScaleType = "None" | "Manual" | "Automatic"; // @public -export interface NodeTypeSkusListNextOptionalParams extends coreClient.OperationOptions { +export interface NodeTypesListByManagedClustersOptionalParams extends OperationOptions { } // @public -export type NodeTypeSkusListNextResponse = NodeTypeListSkuResult; - -// @public -export interface NodeTypeSkusListOptionalParams extends coreClient.OperationOptions { +export interface NodeTypesListFaultSimulationOptionalParams extends OperationOptions { } // @public -export type NodeTypeSkusListResponse = NodeTypeListSkuResult; - -// @public -export interface NodeTypesListByManagedClustersNextOptionalParams extends coreClient.OperationOptions { +export interface NodeTypesListOptionalParams extends OperationOptions { } // @public -export type NodeTypesListByManagedClustersNextResponse = NodeTypeListResult; - -// @public -export interface NodeTypesListByManagedClustersOptionalParams extends coreClient.OperationOptions { +export interface NodeTypesOperations { + createOrUpdate: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeType, options?: NodeTypesCreateOrUpdateOptionalParams) => PollerLike, void>; + deallocate: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesDeallocateOptionalParams) => PollerLike, void>; + delete: (resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesDeleteOptionalParams) => PollerLike, void>; + deleteNode: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesDeleteNodeOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesGetOptionalParams) => Promise; + getFaultSimulation: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: FaultSimulationIdParameters, options?: NodeTypesGetFaultSimulationOptionalParams) => Promise; + list: (resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesListOptionalParams) => PagedAsyncIterableIterator; + listByManagedClusters: (resourceGroupName: string, clusterName: string, options?: NodeTypesListByManagedClustersOptionalParams) => PagedAsyncIterableIterator; + listFaultSimulation: (resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesListFaultSimulationOptionalParams) => PagedAsyncIterableIterator; + redeploy: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesRedeployOptionalParams) => PollerLike, void>; + reimage: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesReimageOptionalParams) => PollerLike, void>; + restart: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesRestartOptionalParams) => PollerLike, void>; + start: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeActionParameters, options?: NodeTypesStartOptionalParams) => PollerLike, void>; + startFaultSimulation: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: FaultSimulationParametersUnion, options?: NodeTypesStartFaultSimulationOptionalParams) => PollerLike, void>; + stopFaultSimulation: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: FaultSimulationIdParameters, options?: NodeTypesStopFaultSimulationOptionalParams) => PollerLike, void>; + update: (resourceGroupName: string, clusterName: string, nodeTypeName: string, parameters: NodeTypeUpdateParameters, options?: NodeTypesUpdateOptionalParams) => PollerLike, NodeType>; } // @public -export type NodeTypesListByManagedClustersResponse = NodeTypeListResult; - -// @public -export interface NodeTypesReimageHeaders { - azureAsyncOperation?: string; - location?: string; +export interface NodeTypesRedeployOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface NodeTypesReimageOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface NodeTypesReimageOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface NodeTypesRestartHeaders { - azureAsyncOperation?: string; - location?: string; +export interface NodeTypesRestartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface NodeTypesRestartOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface NodeTypesStartFaultSimulationOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface NodeTypesUpdateHeaders { - azureAsyncOperation?: string; - location?: string; +export interface NodeTypesStartOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface NodeTypesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface NodeTypesStopFaultSimulationOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type NodeTypesUpdateResponse = NodeType; +export interface NodeTypesUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public export interface NodeTypeSupportedSku { @@ -1390,83 +932,79 @@ export interface NodeTypeSupportedSku { // @public export interface NodeTypeUpdateParameters { sku?: NodeTypeSku; - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public -export type NsgProtocol = string; +export type NsgProtocol = "http" | "https" | "tcp" | "udp" | "icmp" | "ah" | "esp"; // @public -export interface OperationListResult { - readonly nextLink?: string; - value?: OperationResult[]; +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; } // @public -export interface OperationResult { - display?: AvailableOperationDisplay; - isDataAction?: boolean; - name?: string; - nextLink?: string; - origin?: string; +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; } // @public -export interface OperationResults { - get(location: string, operationId: string, options?: OperationResultsGetOptionalParams): Promise; +export interface OperationResultsGetOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface OperationResultsGetHeaders { - location?: string; +export interface OperationResultsOperations { + get: (location: string, operationId: string, options?: OperationResultsGetOptionalParams) => PollerLike, void>; } // @public -export interface OperationResultsGetOptionalParams extends coreClient.OperationOptions { +export interface OperationsListOptionalParams extends OperationOptions { } // @public -export type OperationResultsGetResponse = OperationResultsGetHeaders; - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +export interface OperationsOperations { + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +export interface OperationStatusGetOptionalParams extends OperationOptions { } // @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface OperationStatusOperations { + get: (location: string, operationId: string, options?: OperationStatusGetOptionalParams) => Promise; } // @public -export type OperationsListResponse = OperationListResult; +export type Origin = "user" | "system" | "user,system"; // @public -export interface OperationStatus { - get(location: string, operationId: string, options?: OperationStatusGetOptionalParams): Promise; -} +export type OsType = "Windows"; // @public -export interface OperationStatusGetOptionalParams extends coreClient.OperationOptions { +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; } // @public -export type OperationStatusGetResponse = LongRunningOperationResult; - -// @public -export type OsType = string; +export interface PageSettings { + continuationToken?: string; +} // @public export interface Partition { - partitionScheme: "Named" | "Singleton" | "UniformInt64Range"; + // (undocumented) + partitionScheme: PartitionScheme; } // @public @@ -1478,51 +1016,38 @@ export interface PartitionInstanceCountScaleMechanism extends ScalingMechanism { } // @public -export type PartitionScheme = string; +export type PartitionScheme = "Singleton" | "UniformInt64Range" | "Named"; -// @public (undocumented) -export type PartitionUnion = Partition | NamedPartitionScheme | SingletonPartitionScheme | UniformInt64RangePartitionScheme; +// @public +export type PartitionUnion = NamedPartitionScheme | SingletonPartitionScheme | UniformInt64RangePartitionScheme | Partition; // @public -export type PrivateEndpointNetworkPolicies = string; +export type PrivateEndpointNetworkPolicies = "enabled" | "disabled"; // @public -export type PrivateIPAddressVersion = string; +export type PrivateIPAddressVersion = "IPv4" | "IPv6"; // @public -export type PrivateLinkServiceNetworkPolicies = string; +export type PrivateLinkServiceNetworkPolicies = "enabled" | "disabled"; // @public -export type ProbeProtocol = string; +export type ProbeProtocol = "tcp" | "http" | "https"; // @public -export type Protocol = string; +export type Protocol = "tcp" | "udp"; // @public -export interface ProxyResource { - readonly id?: string; - location?: string; - readonly name?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; +export interface ProxyResource extends Resource { } // @public -export type PublicIPAddressVersion = string; +export type PublicIPAddressVersion = "IPv4" | "IPv6"; // @public export interface Resource { - readonly etag?: string; readonly id?: string; - location: string; readonly name?: string; readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; readonly type?: string; } @@ -1535,7 +1060,17 @@ export interface ResourceAzStatus { } // @public -export type RollingUpgradeMode = string; +export function restorePoller(client: ServiceFabricClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; + +// @public (undocumented) +export interface RestorePollerOptions extends OperationOptions { + abortSignal?: AbortSignalLike; + processResponseBody?: (result: TResponse) => Promise; + updateIntervalInMs?: number; +} + +// @public +export type RollingUpgradeMode = "Monitored" | "UnmonitoredAuto"; // @public export interface RollingUpgradeMonitoringPolicy { @@ -1554,11 +1089,12 @@ export interface RuntimeResumeApplicationUpgradeParameters { // @public export interface ScalingMechanism { - kind: "AddRemoveIncrementalNamedPartition" | "ScalePartitionInstanceCount"; + // (undocumented) + kind: ServiceScalingMechanismKind; } -// @public (undocumented) -export type ScalingMechanismUnion = ScalingMechanism | AddRemoveIncrementalNamedPartitionScalingMechanism | PartitionInstanceCountScaleMechanism; +// @public +export type ScalingMechanismUnion = AddRemoveIncrementalNamedPartitionScalingMechanism | PartitionInstanceCountScaleMechanism | ScalingMechanism; // @public export interface ScalingPolicy { @@ -1568,14 +1104,15 @@ export interface ScalingPolicy { // @public export interface ScalingTrigger { - kind: "AveragePartitionLoadTrigger" | "AverageServiceLoadTrigger"; + // (undocumented) + kind: ServiceScalingTriggerKind; } -// @public (undocumented) -export type ScalingTriggerUnion = ScalingTrigger | AveragePartitionLoadScalingTrigger | AverageServiceLoadScalingTrigger; +// @public +export type ScalingTriggerUnion = AveragePartitionLoadScalingTrigger | AverageServiceLoadScalingTrigger | ScalingTrigger; // @public -export type SecurityType = string; +export type SecurityType = "TrustedLaunch" | "Standard"; // @public export interface ServiceCorrelation { @@ -1584,7 +1121,7 @@ export interface ServiceCorrelation { } // @public -export type ServiceCorrelationScheme = string; +export type ServiceCorrelationScheme = "AlignedAffinity" | "NonAlignedAffinity"; // @public export interface ServiceEndpoint { @@ -1593,55 +1130,29 @@ export interface ServiceEndpoint { } // @public (undocumented) -export class ServiceFabricManagedClustersManagementClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ServiceFabricManagedClustersManagementClientOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - applications: Applications; - // (undocumented) - applicationTypes: ApplicationTypes; - // (undocumented) - applicationTypeVersions: ApplicationTypeVersions; - // (undocumented) - managedApplyMaintenanceWindow: ManagedApplyMaintenanceWindow; - // (undocumented) - managedAzResiliencyStatusOperations: ManagedAzResiliencyStatusOperations; - // (undocumented) - managedClusters: ManagedClusters; - // (undocumented) - managedClusterVersion: ManagedClusterVersion; - // (undocumented) - managedMaintenanceWindowStatusOperations: ManagedMaintenanceWindowStatusOperations; - // (undocumented) - managedUnsupportedVMSizes: ManagedUnsupportedVMSizes; - // (undocumented) - nodeTypes: NodeTypes; - // (undocumented) - nodeTypeSkus: NodeTypeSkus; - // (undocumented) - operationResults: OperationResults; - // (undocumented) - operations: Operations; - // (undocumented) - operationStatus: OperationStatus; - // (undocumented) - services: Services; - // (undocumented) - subscriptionId: string; -} - -// @public -export interface ServiceFabricManagedClustersManagementClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; +export class ServiceFabricClient { + constructor(credential: TokenCredential, subscriptionId: string, options?: ServiceFabricClientOptionalParams); + readonly applications: ApplicationsOperations; + readonly applicationTypes: ApplicationTypesOperations; + readonly applicationTypeVersions: ApplicationTypeVersionsOperations; + readonly managedClusters: ManagedClustersOperations; + readonly managedClusterVersion: ManagedClusterVersionOperations; + readonly managedVMSizes: ManagedVMSizesOperations; + readonly nodeTypes: NodeTypesOperations; + readonly operationResults: OperationResultsOperations; + readonly operations: OperationsOperations; + readonly operationStatus: OperationStatusOperations; + readonly pipeline: Pipeline; + readonly services: ServicesOperations; +} + +// @public +export interface ServiceFabricClientOptionalParams extends ClientOptions { apiVersion?: string; - endpoint?: string; } // @public -export type ServiceKind = string; +export type ServiceKind = "Stateless" | "Stateful"; // @public export interface ServiceLoadMetric { @@ -1653,10 +1164,10 @@ export interface ServiceLoadMetric { } // @public -export type ServiceLoadMetricWeight = string; +export type ServiceLoadMetricWeight = "Zero" | "Low" | "Medium" | "High"; // @public -export type ServicePackageActivationMode = string; +export type ServicePackageActivationMode = "SharedProcess" | "ExclusiveProcess"; // @public export interface ServicePlacementInvalidDomainPolicy extends ServicePlacementPolicy { @@ -1666,19 +1177,21 @@ export interface ServicePlacementInvalidDomainPolicy extends ServicePlacementPol // @public export interface ServicePlacementNonPartiallyPlaceServicePolicy extends ServicePlacementPolicy { + // (undocumented) type: "NonPartiallyPlaceService"; } // @public export interface ServicePlacementPolicy { - type: "InvalidDomain" | "NonPartiallyPlaceService" | "PreferredPrimaryDomain" | "RequiredDomain" | "RequiredDomainDistribution"; + // (undocumented) + type: ServicePlacementPolicyType; } // @public -export type ServicePlacementPolicyType = string; +export type ServicePlacementPolicyType = "InvalidDomain" | "RequiredDomain" | "PreferredPrimaryDomain" | "RequiredDomainDistribution" | "NonPartiallyPlaceService"; -// @public (undocumented) -export type ServicePlacementPolicyUnion = ServicePlacementPolicy | ServicePlacementInvalidDomainPolicy | ServicePlacementNonPartiallyPlaceServicePolicy | ServicePlacementPreferPrimaryDomainPolicy | ServicePlacementRequiredDomainPolicy | ServicePlacementRequireDomainDistributionPolicy; +// @public +export type ServicePlacementPolicyUnion = ServicePlacementInvalidDomainPolicy | ServicePlacementNonPartiallyPlaceServicePolicy | ServicePlacementPreferPrimaryDomainPolicy | ServicePlacementRequireDomainDistributionPolicy | ServicePlacementRequiredDomainPolicy | ServicePlacementPolicy; // @public export interface ServicePlacementPreferPrimaryDomainPolicy extends ServicePlacementPolicy { @@ -1700,14 +1213,9 @@ export interface ServicePlacementRequireDomainDistributionPolicy extends Service // @public export interface ServiceResource extends ProxyResource { + location?: string; properties?: ServiceResourcePropertiesUnion; -} - -// @public -export interface ServiceResourceList { - readonly nextLink?: string; - // (undocumented) - value?: ServiceResource[]; + tags?: Record; } // @public @@ -1730,81 +1238,46 @@ export interface ServiceResourcePropertiesBase { servicePlacementPolicies?: ServicePlacementPolicyUnion[]; } -// @public (undocumented) -export type ServiceResourcePropertiesUnion = ServiceResourceProperties | StatefulServiceProperties | StatelessServiceProperties; - -// @public -export interface Services { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, parameters: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, parameters: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, options?: ServicesGetOptionalParams): Promise; - listByApplications(resourceGroupName: string, clusterName: string, applicationName: string, options?: ServicesListByApplicationsOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, parameters: ServiceUpdateParameters, options?: ServicesUpdateOptionalParams): Promise; -} - // @public -export type ServiceScalingMechanismKind = string; +export type ServiceResourcePropertiesUnion = StatefulServiceProperties | StatelessServiceProperties | ServiceResourceProperties; // @public -export type ServiceScalingTriggerKind = string; +export type ServiceScalingMechanismKind = "ScalePartitionInstanceCount" | "AddRemoveIncrementalNamedPartition"; // @public -export interface ServicesCreateOrUpdateHeaders { - azureAsyncOperation?: string; - location?: string; -} +export type ServiceScalingTriggerKind = "AveragePartitionLoadTrigger" | "AverageServiceLoadTrigger"; // @public -export interface ServicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ServicesCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ServicesCreateOrUpdateResponse = ServiceResource; - -// @public -export interface ServicesDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ServicesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ServicesDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export interface ServicesGetOptionalParams extends coreClient.OperationOptions { +export interface ServicesGetOptionalParams extends OperationOptions { } // @public -export type ServicesGetResponse = ServiceResource; - -// @public -export interface ServicesListByApplicationsNextOptionalParams extends coreClient.OperationOptions { +export interface ServicesListByApplicationsOptionalParams extends OperationOptions { } // @public -export type ServicesListByApplicationsNextResponse = ServiceResourceList; - -// @public -export interface ServicesListByApplicationsOptionalParams extends coreClient.OperationOptions { +export interface ServicesOperations { + createOrUpdate: (resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, parameters: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams) => PollerLike, void>; + delete: (resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, options?: ServicesDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, options?: ServicesGetOptionalParams) => Promise; + listByApplications: (resourceGroupName: string, clusterName: string, applicationName: string, options?: ServicesListByApplicationsOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, parameters: ServiceUpdateParameters, options?: ServicesUpdateOptionalParams) => Promise; } // @public -export type ServicesListByApplicationsResponse = ServiceResourceList; - -// @public -export interface ServicesUpdateOptionalParams extends coreClient.OperationOptions { +export interface ServicesUpdateOptionalParams extends OperationOptions { } -// @public -export type ServicesUpdateResponse = ServiceResource; - // @public export interface ServiceTypeHealthPolicy { maxPercentUnhealthyPartitionsPerService: number; @@ -1814,9 +1287,7 @@ export interface ServiceTypeHealthPolicy { // @public export interface ServiceUpdateParameters { - tags?: { - [propertyName: string]: string; - }; + tags?: Record; } // @public @@ -1831,6 +1302,9 @@ export interface SettingsSectionDescription { parameters: SettingsParameterDescription[]; } +// @public +export type SfmcOperationStatus = "Created" | "Started" | "Succeeded" | "Failed" | "Aborted" | "Canceled"; + // @public export interface SingletonPartitionScheme extends Partition { partitionScheme: "Singleton"; @@ -1842,7 +1316,7 @@ export interface Sku { } // @public -export type SkuName = string; +export type SkuName = "Basic" | "Standard"; // @public export interface StatefulServiceProperties extends ServiceResourceProperties { @@ -1882,10 +1356,16 @@ export interface SubResource { export interface SystemData { createdAt?: Date; createdBy?: string; - createdByType?: string; + createdByType?: CreatedByType; lastModifiedAt?: Date; lastModifiedBy?: string; - lastModifiedByType?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: Record; } // @public @@ -1897,12 +1377,9 @@ export interface UniformInt64RangePartitionScheme extends Partition { } // @public -export type UpdateType = string; +export type UpdateType = "Default" | "ByUpgradeDomain"; // @public -export type UpgradeMode = string; - -// @public (undocumented) export interface UserAssignedIdentity { readonly clientId?: string; readonly principalId?: string; @@ -1944,7 +1421,7 @@ export interface VmManagedIdentity { } // @public -export type VmSetupAction = string; +export type VmSetupAction = "EnableContainers" | "EnableHyperV"; // @public export interface VMSize { @@ -1961,25 +1438,36 @@ export interface VmssDataDisk { // @public export interface VmssExtension { + name: string; + properties: VmssExtensionProperties; +} + +// @public +export interface VmssExtensionProperties { autoUpgradeMinorVersion?: boolean; enableAutomaticUpgrade?: boolean; forceUpdateTag?: string; - name: string; - protectedSettings?: Record; + protectedSettings?: Record; provisionAfterExtensions?: string[]; readonly provisioningState?: string; publisher: string; - settings?: Record; + settings?: Record; setupOrder?: VmssExtensionSetupOrder[]; type: string; typeHandlerVersion: string; } // @public -export type VmssExtensionSetupOrder = string; +export type VmssExtensionSetupOrder = "BeforeSFRuntime"; // @public -export type ZonalUpdateMode = string; +export type ZonalUpdateMode = "Standard" | "Fast"; + +// @public +export interface ZoneFaultSimulationParameters extends FaultSimulationParameters { + faultKind: "Zone"; + zones?: string[]; +} // (No @packageDocumentation comment for this package) diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts deleted file mode 100644 index 3a84dd5b5aa0..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.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. - */ -import type { ApplicationTypeVersionResource } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application type version resource with the specified name. - * - * @summary Create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json - */ -async function putAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const parameters: ApplicationTypeVersionResource = { - appPackageUrl: "http://fakelink.test.com/MyAppType", - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts deleted file mode 100644 index bab4a092dfb9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed application type version resource with the specified name. - * - * @summary Delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json - */ -async function deleteAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - version, - ); - console.log(result); -} - -async function main(): Promise { - await deleteAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts deleted file mode 100644 index 8d9adb8bb501..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * - * @summary Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - */ -async function getAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.get( - resourceGroupName, - clusterName, - applicationTypeName, - version, - ); - console.log(result); -} - -async function main(): Promise { - await getAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts deleted file mode 100644 index 364e4683c92d..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * - * @summary Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json - */ -async function getAListOfApplicationTypeVersionResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationTypeVersions.listByApplicationTypes( - resourceGroupName, - clusterName, - applicationTypeName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAListOfApplicationTypeVersionResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts deleted file mode 100644 index 2adf12cd208e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.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. - */ -import type { ApplicationTypeVersionUpdateParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of an application type version resource of a given managed cluster. - * - * @summary Updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json - */ -async function patchAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const parameters: ApplicationTypeVersionUpdateParameters = { - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.update( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts deleted file mode 100644 index b8087f28f40d..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts +++ /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. - */ -import type { ApplicationTypeResource } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application type name resource with the specified name. - * - * @summary Create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json - */ -async function putAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const parameters: ApplicationTypeResource = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.createOrUpdate( - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts deleted file mode 100644 index bd969fd97082..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed application type name resource with the specified name. - * - * @summary Delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json - */ -async function deleteAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts deleted file mode 100644 index 66a531c74809..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * - * @summary Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - */ -async function getAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.get( - resourceGroupName, - clusterName, - applicationTypeName, - ); - console.log(result); -} - -async function main(): Promise { - await getAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts deleted file mode 100644 index 7b7edaf5bf62..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * - * @summary Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json - */ -async function getAListOfApplicationTypeNameResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applicationTypes.list(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAListOfApplicationTypeNameResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts deleted file mode 100644 index 262012d23e71..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts +++ /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. - */ -import type { ApplicationTypeUpdateParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of an application type resource of a given managed cluster. - * - * @summary Updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json - */ -async function patchAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const parameters: ApplicationTypeUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.update( - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts deleted file mode 100644 index 101dd2b6e709..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,109 +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 { ApplicationResource } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. - * - * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json - */ -async function putAnApplicationWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: ApplicationResource = { - location: "eastus", - parameters: { param1: "value1" }, - tags: { a: "b" }, - upgradePolicy: { - applicationHealthPolicy: { - considerWarningAsError: true, - defaultServiceTypeHealthPolicy: { - maxPercentUnhealthyPartitionsPerService: 0, - maxPercentUnhealthyReplicasPerPartition: 0, - maxPercentUnhealthyServices: 0, - }, - maxPercentUnhealthyDeployedApplications: 0, - serviceTypeHealthPolicyMap: { - service1: { - maxPercentUnhealthyPartitionsPerService: 30, - maxPercentUnhealthyReplicasPerPartition: 30, - maxPercentUnhealthyServices: 30, - }, - }, - }, - forceRestart: false, - instanceCloseDelayDuration: 600, - recreateApplication: false, - rollingUpgradeMonitoringPolicy: { - failureAction: "Rollback", - healthCheckRetryTimeout: "00:10:00", - healthCheckStableDuration: "00:05:00", - healthCheckWaitDuration: "00:02:00", - upgradeDomainTimeout: "00:15:00", - upgradeTimeout: "01:00:00", - }, - upgradeMode: "UnmonitoredAuto", - upgradeReplicaSetCheckTimeout: 3600, - }, - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. - * - * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json - */ -async function putAnApplicationWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: ApplicationResource = { - location: "eastus", - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putAnApplicationWithMaximumParameters(); - await putAnApplicationWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts deleted file mode 100644 index 68543c9e5dda..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed application resource with the specified name. - * - * @summary Delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json - */ -async function deleteAnApplication(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts deleted file mode 100644 index 6ae4f6a3d6c7..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts +++ /dev/null @@ -1,35 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * - * @summary Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - */ -async function getAnApplication(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.get(resourceGroupName, clusterName, applicationName); - console.log(result); -} - -async function main(): Promise { - await getAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts deleted file mode 100644 index 3c0584e9d292..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * - * @summary Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json - */ -async function getAListOfApplicationResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.applications.list(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAListOfApplicationResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts deleted file mode 100644 index 5c9ecc46a08c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * - * @summary Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json - */ -async function getAnApplicationUpgrade(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginReadUpgradeAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - await getAnApplicationUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts deleted file mode 100644 index 8e1d4c7a123e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.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. - */ -import type { RuntimeResumeApplicationUpgradeParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * - * @summary Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json - */ -async function resumeUpgrade(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: RuntimeResumeApplicationUpgradeParameters = { - upgradeDomainName: "UD1", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginResumeUpgradeAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await resumeUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts deleted file mode 100644 index a611f4ba95b2..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * - * @summary Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json - */ -async function startAnApplicationUpgradeRollback(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginStartRollbackAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - await startAnApplicationUpgradeRollback(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts deleted file mode 100644 index 5bc7c81c9acc..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts +++ /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. - */ -import type { ApplicationUpdateParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of an application resource of a given managed cluster. - * - * @summary Updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json - */ -async function patchAnApplication(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: ApplicationUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.update( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts deleted file mode 100644 index c7b3ee249926..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts +++ /dev/null @@ -1,35 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * - * @summary Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json - */ -async function maintenanceWindowStatus(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedApplyMaintenanceWindow.post(resourceGroupName, clusterName); - console.log(result); -} - -async function main(): Promise { - await maintenanceWindowStatus(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts deleted file mode 100644 index f1799809bd93..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * - * @summary Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json - */ -async function azResiliencyStatusOfBaseResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedAzResiliencyStatusOperations.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - await azResiliencyStatusOfBaseResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts deleted file mode 100644 index 71f19019ece7..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about an available Service Fabric cluster code version by environment. - * - * @summary Gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json - */ -async function getClusterVersionByEnvironment(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const environment = "Windows"; - const clusterVersion = "7.2.477.9590"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.getByEnvironment( - location, - environment, - clusterVersion, - ); - console.log(result); -} - -async function main(): Promise { - await getClusterVersionByEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts deleted file mode 100644 index 8ef875df5e2e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts +++ /dev/null @@ -1,34 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about an available Service Fabric managed cluster code version. - * - * @summary Gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json - */ -async function getClusterVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const clusterVersion = "7.2.477.9590"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.get(location, clusterVersion); - console.log(result); -} - -async function main(): Promise { - await getClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts deleted file mode 100644 index 5377c6c04026..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts +++ /dev/null @@ -1,34 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by environment. - * - * @summary Gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json - */ -async function listClusterVersionsByEnvironment(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const environment = "Windows"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.listByEnvironment(location, environment); - console.log(result); -} - -async function main(): Promise { - await listClusterVersionsByEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts deleted file mode 100644 index 8e361be12ecd..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts +++ /dev/null @@ -1,33 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by location. - * - * @summary Gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json - */ -async function listClusterVersions(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.list(location); - console.log(result); -} - -async function main(): Promise { - await listClusterVersions(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts deleted file mode 100644 index b83eb913c409..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,193 +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 { ManagedCluster } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. - * - * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json - */ -async function putAClusterWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "mycluster"; - const parameters: ManagedCluster = { - addonFeatures: ["DnsService", "BackupRestoreService", "ResourceMonitorService"], - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - allocatedOutboundPorts: 0, - allowRdpAccess: true, - applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, - autoGeneratedDomainNameLabelScope: "SubscriptionReuse", - auxiliarySubnets: [ - { - name: "testSubnet1", - enableIpv6: true, - networkSecurityGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1", - privateEndpointNetworkPolicies: "enabled", - privateLinkServiceNetworkPolicies: "enabled", - }, - ], - clientConnectionPort: 19000, - clusterCodeVersion: "7.1.168.9494", - clusterUpgradeMode: "Manual", - ddosProtectionPlanId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan", - dnsName: "mycluster", - enableAutoOSUpgrade: true, - enableHttpGatewayExclusiveAuthMode: true, - enableIpv6: true, - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - httpGatewayConnectionPort: 19080, - httpGatewayTokenAuthConnectionPort: 19081, - ipTags: [{ ipTagType: "FirstPartyUsage", tag: "SQL" }], - loadBalancingRules: [ - { - backendPort: 80, - frontendPort: 80, - probePort: 80, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 443, - frontendPort: 443, - probePort: 443, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 10000, - frontendPort: 10000, - loadDistribution: "Default", - probePort: 10000, - probeProtocol: "http", - protocol: "tcp", - }, - ], - location: "eastus", - networkSecurityRules: [ - { - name: "TestName", - description: "Test description", - access: "allow", - destinationAddressPrefixes: ["*"], - destinationPortRanges: ["*"], - direction: "inbound", - priority: 1010, - sourceAddressPrefixes: ["*"], - sourcePortRanges: ["*"], - protocol: "tcp", - }, - { - name: "AllowARM", - access: "allow", - destinationAddressPrefix: "*", - destinationPortRange: "33500-33699", - direction: "inbound", - priority: 2002, - sourceAddressPrefix: "AzureResourceManager", - sourcePortRange: "*", - protocol: "*", - }, - ], - publicIPPrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", - publicIPv6PrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", - serviceEndpoints: [{ locations: ["eastus2", "usnorth"], service: "Microsoft.Storage" }], - sku: { name: "Basic" }, - tags: {}, - upgradeDescription: { - deltaHealthPolicy: { - maxPercentDeltaUnhealthyApplications: 40, - maxPercentDeltaUnhealthyNodes: 20, - maxPercentUpgradeDomainDeltaUnhealthyNodes: 40, - }, - forceRestart: false, - healthPolicy: { - maxPercentUnhealthyApplications: 30, - maxPercentUnhealthyNodes: 10, - }, - monitoringPolicy: { - healthCheckRetryTimeout: "00:55:00", - healthCheckStableDuration: "00:45:00", - healthCheckWaitDuration: "00:05:00", - upgradeDomainTimeout: "03:00:00", - upgradeTimeout: "12:00:00", - }, - }, - useCustomVnet: true, - zonalResiliency: true, - zonalUpdateMode: "Fast", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. - * - * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json - */ -async function putAClusterWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const parameters: ManagedCluster = { - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - clusterUpgradeCadence: "Wave1", - clusterUpgradeMode: "Automatic", - dnsName: "myCluster", - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - location: "eastus", - sku: { name: "Basic" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putAClusterWithMaximumParameters(); - await putAClusterWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts deleted file mode 100644 index 58f888034792..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts +++ /dev/null @@ -1,34 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed cluster resource with the specified name. - * - * @summary Delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json - */ -async function deleteACluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.beginDeleteAndWait(resourceGroupName, clusterName); - console.log(result); -} - -async function main(): Promise { - await deleteACluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts deleted file mode 100644 index d1a647936ff7..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts +++ /dev/null @@ -1,34 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * - * @summary Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - */ -async function getACluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main(): Promise { - await getACluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts deleted file mode 100644 index 093d5fac3120..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * - * @summary Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json - */ -async function listClusterByResourceGroup(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.managedClusters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listClusterByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts deleted file mode 100644 index a3c1abf6e037..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts +++ /dev/null @@ -1,35 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * - * @summary Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json - */ -async function listManagedClusters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.managedClusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listManagedClusters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts deleted file mode 100644 index 5719c3ba991e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts +++ /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. - */ -import type { ManagedClusterUpdateParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the tags of of a Service Fabric managed cluster resource with the specified name. - * - * @summary Update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json - */ -async function patchAManagedCluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const parameters: ManagedClusterUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.update(resourceGroupName, clusterName, parameters); - console.log(result); -} - -async function main(): Promise { - await patchAManagedCluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts deleted file mode 100644 index 5479458d6205..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * - * @summary Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json - */ -async function maintenanceWindowStatus(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedMaintenanceWindowStatusOperations.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - await maintenanceWindowStatus(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts deleted file mode 100644 index c0b3ea831b18..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts +++ /dev/null @@ -1,34 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get unsupported vm size for Service Fabric Managed Clusters. - * - * @summary Get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json - */ -async function getUnsupportedVMSizes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const vmSize = "Standard_B1ls1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedUnsupportedVMSizes.get(location, vmSize); - console.log(result); -} - -async function main(): Promise { - await getUnsupportedVMSizes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts deleted file mode 100644 index 97d0c4500564..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * - * @summary Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json - */ -async function listUnsupportedVMSizes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.managedUnsupportedVMSizes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listUnsupportedVMSizes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts deleted file mode 100644 index 48513c531faa..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric node type supported SKUs. - * - * @summary Get a Service Fabric node type supported SKUs. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json - */ -async function listANodeTypeSkUs(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.nodeTypeSkus.list(resourceGroupName, clusterName, nodeTypeName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listANodeTypeSkUs(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts deleted file mode 100644 index 3ebdf91489ef..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts +++ /dev/null @@ -1,484 +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 { NodeType } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json - */ -async function putANodeTypeWithAutoScaleParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - capacities: { clientConnections: "65536" }, - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - placementProperties: { - hasSSD: "true", - nodeColor: "green", - someProperty: "5", - }, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: -1, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], - }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, - ], - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json - */ -async function putANodeTypeWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE-testResourceGroup-testRegion-test"; - const parameters: NodeType = { - additionalDataDisks: [ - { diskLetter: "F", diskSizeGB: 256, diskType: "StandardSSD_LRS", lun: 1 }, - { diskLetter: "G", diskSizeGB: 150, diskType: "Premium_LRS", lun: 2 }, - ], - additionalNetworkInterfaceConfigurations: [ - { - name: "nic-1", - dscpConfiguration: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig", - }, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig-1", - applicationGatewayBackendAddressPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest", - }, - ], - loadBalancerBackendAddressPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool", - }, - ], - loadBalancerInboundNatPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool", - }, - ], - privateIPAddressVersion: "IPv4", - publicIPAddressConfiguration: { - name: "publicip-1", - ipTags: [{ ipTagType: "RoutingPreference", tag: "Internet" }], - publicIPAddressVersion: "IPv4", - }, - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - ], - }, - ], - capacities: { clientConnections: "65536" }, - computerNamePrefix: "BE", - dataDiskLetter: "S", - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - dscpConfigurationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig", - enableAcceleratedNetworking: true, - enableEncryptionAtHost: true, - enableNodePublicIP: true, - enableNodePublicIPv6: true, - enableOverProvisioning: false, - evictionPolicy: "Deallocate", - frontendConfigurations: [ - { - applicationGatewayBackendAddressPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest", - loadBalancerBackendAddressPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool", - loadBalancerInboundNatPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool", - }, - ], - isPrimary: false, - isSpotVM: true, - isStateless: true, - multiplePlacementGroups: true, - natGatewayId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway", - placementProperties: { - hasSSD: "true", - nodeColor: "green", - someProperty: "5", - }, - secureBootEnabled: true, - securityType: "TrustedLaunch", - serviceArtifactReferenceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile", - spotRestoreTimeout: "PT30M", - subnetId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - useDefaultPublicLoadBalancer: true, - useEphemeralOSDisk: true, - vmApplications: [ - { - configurationReference: - "https://mystorageaccount.blob.core.windows.net/containername/blobname", - enableAutomaticUpgrade: true, - order: 1, - packageReferenceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0", - treatFailureAsDeploymentFailure: false, - vmGalleryTags: '{"Tag1":"Value1","Tag2":"Value2"}', - }, - ], - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - enableAutomaticUpgrade: true, - forceUpdateTag: "v.1.0", - publisher: "Microsoft.Azure.Geneva", - settings: {}, - setupOrder: ["BeforeSFRuntime"], - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], - }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, - ], - vmSetupActions: ["EnableContainers", "EnableHyperV"], - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json - */ -async function putANodeTypeWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json - */ -async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - enableEncryptionAtHost: true, - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - useTempDataDisk: true, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json - */ -async function putNodeTypeWithCustomVMImage(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json - */ -async function putNodeTypeWithDedicatedHosts(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - capacities: {}, - dataDiskSizeGB: 200, - dataDiskType: "StandardSSD_LRS", - hostGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - isPrimary: false, - placementProperties: {}, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2019-Datacenter", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D8s_v3", - zones: ["1"], - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json - */ -async function putNodeTypeWithSharedGalleriesCustomVMImage(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmInstanceCount: 10, - vmSharedGalleryImageId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest", - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json - */ -async function putNodeTypeWithVMImagePlan(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "windows_2022_test", - vmImagePlan: { - name: "win_2022_test_20_10_gen2", - product: "windows_2022_test", - publisher: "testpublisher", - }, - vmImagePublisher: "testpublisher", - vmImageSku: "win_2022_test_20_10_gen2", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putANodeTypeWithAutoScaleParameters(); - await putANodeTypeWithMaximumParameters(); - await putANodeTypeWithMinimumParameters(); - await putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(); - await putNodeTypeWithCustomVMImage(); - await putNodeTypeWithDedicatedHosts(); - await putNodeTypeWithSharedGalleriesCustomVMImage(); - await putNodeTypeWithVMImagePlan(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts deleted file mode 100644 index 7c625819e737..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts +++ /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. - */ -import type { NodeTypeActionParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * - * @summary Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json - */ -async function deleteNodes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginDeleteNodeAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await deleteNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts deleted file mode 100644 index 4c263611cbb5..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric node type of a given managed cluster. - * - * @summary Delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json - */ -async function deleteANodeType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginDeleteAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteANodeType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts deleted file mode 100644 index d9a9dcd12f84..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts +++ /dev/null @@ -1,35 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric node type of a given managed cluster. - * - * @summary Get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - */ -async function getANodeType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "FE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.get(resourceGroupName, clusterName, nodeTypeName); - console.log(result); -} - -async function main(): Promise { - await getANodeType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts deleted file mode 100644 index 06dc843acbad..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Node types of the specified managed cluster. - * - * @summary Gets all Node types of the specified managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json - */ -async function listNodeTypeOfTheSpecifiedManagedCluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.nodeTypes.listByManagedClusters(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listNodeTypeOfTheSpecifiedManagedCluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts deleted file mode 100644 index 69db8b17f80c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts +++ /dev/null @@ -1,70 +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 { NodeTypeActionParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * - * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json - */ -async function reimageAllNodesByUpgradeDomain(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { - updateType: "ByUpgradeDomain", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginReimageAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * - * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json - */ -async function reimageNodes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginReimageAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await reimageAllNodesByUpgradeDomain(); - await reimageNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts deleted file mode 100644 index 28c4e367d43f..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts +++ /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. - */ -import type { NodeTypeActionParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * - * @summary Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json - */ -async function restartNodes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginRestartAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await restartNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts deleted file mode 100644 index 5cbd909df462..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts +++ /dev/null @@ -1,71 +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 { NodeTypeUpdateParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. - * - * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json - */ -async function patchANodeType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. - * - * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json - */ -async function patchANodeTypeWhileAutoScaling(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeUpdateParameters = { - sku: { name: "Standard_S0", capacity: 10, tier: "Standard" }, - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchANodeType(); - await patchANodeTypeWhileAutoScaling(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts deleted file mode 100644 index 8724d6a48326..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts +++ /dev/null @@ -1,34 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get long running operation result. - * - * @summary Get long running operation result. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json - */ -async function getOperationResult(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.operationResults.get(location, operationId); - console.log(result); -} - -async function main(): Promise { - await getOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts deleted file mode 100644 index 6dd05f1fcc17..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts +++ /dev/null @@ -1,53 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get long running operation status. - * - * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json - */ -async function getFailedOperationStatus(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -/** - * This sample demonstrates how to Get long running operation status. - * - * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_succeeded.json - */ -async function getSucceededOperationResult(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -async function main(): Promise { - await getFailedOperationStatus(); - await getSucceededOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts deleted file mode 100644 index c126768ebf7c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,35 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the list of available Service Fabric resource provider API operations. - * - * @summary Get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json - */ -async function listAvailableOperations(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(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 listAvailableOperations(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts deleted file mode 100644 index e85d1bbe84b9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,121 +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 { ServiceResource } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. - * - * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json - */ -async function putAServiceWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters: ServiceResource = { - location: "eastus", - properties: { - correlationScheme: [ - { - scheme: "AlignedAffinity", - serviceName: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1", - }, - ], - defaultMoveCost: "Medium", - instanceCount: 5, - minInstanceCount: 3, - minInstancePercentage: 30, - partitionDescription: { partitionScheme: "Singleton" }, - placementConstraints: "NodeType==frontend", - scalingPolicies: [ - { - scalingMechanism: { - kind: "ScalePartitionInstanceCount", - maxInstanceCount: 9, - minInstanceCount: 3, - scaleIncrement: 2, - }, - scalingTrigger: { - kind: "AveragePartitionLoadTrigger", - lowerLoadThreshold: 2, - metricName: "metricName", - scaleInterval: "00:01:00", - upperLoadThreshold: 8, - }, - }, - ], - serviceDnsName: "myservicednsname.myApp", - serviceKind: "Stateless", - serviceLoadMetrics: [{ name: "metric1", defaultLoad: 3, weight: "Low" }], - servicePackageActivationMode: "SharedProcess", - servicePlacementPolicies: [{ type: "NonPartiallyPlaceService" }], - serviceTypeName: "myServiceType", - }, - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. - * - * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json - */ -async function putAServiceWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters: ServiceResource = { - location: "eastus", - properties: { - instanceCount: 1, - partitionDescription: { partitionScheme: "Singleton" }, - serviceKind: "Stateless", - serviceTypeName: "myServiceType", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await putAServiceWithMaximumParameters(); - await putAServiceWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts deleted file mode 100644 index 37d6bd03e6b3..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed service resource with the specified name. - * - * @summary Delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json - */ -async function deleteAService(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await deleteAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts deleted file mode 100644 index 23b6d9aa5c45..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * - * @summary Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - */ -async function getAService(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.get( - resourceGroupName, - clusterName, - applicationName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await getAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts deleted file mode 100644 index a89f8c272071..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts +++ /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. - */ -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * - * @summary Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json - */ -async function getAListOfServiceResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.services.listByApplications( - resourceGroupName, - clusterName, - applicationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await getAListOfServiceResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts deleted file mode 100644 index 54055087c852..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.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. - */ -import type { ServiceUpdateParameters } from "@azure/arm-servicefabricmanagedclusters"; -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of a service resource of a given managed cluster. - * - * @summary Updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json - */ -async function patchAService(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters: ServiceUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.update( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await patchAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md deleted file mode 100644 index 826a75500717..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,148 +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** | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [applicationTypeVersionsCreateOrUpdateSample.js][applicationtypeversionscreateorupdatesample] | Create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json | -| [applicationTypeVersionsDeleteSample.js][applicationtypeversionsdeletesample] | Delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json | -| [applicationTypeVersionsGetSample.js][applicationtypeversionsgetsample] | Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json | -| [applicationTypeVersionsListByApplicationTypesSample.js][applicationtypeversionslistbyapplicationtypessample] | Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json | -| [applicationTypeVersionsUpdateSample.js][applicationtypeversionsupdatesample] | Updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json | -| [applicationTypesCreateOrUpdateSample.js][applicationtypescreateorupdatesample] | Create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json | -| [applicationTypesDeleteSample.js][applicationtypesdeletesample] | Delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json | -| [applicationTypesGetSample.js][applicationtypesgetsample] | Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json | -| [applicationTypesListSample.js][applicationtypeslistsample] | Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json | -| [applicationTypesUpdateSample.js][applicationtypesupdatesample] | Updates the tags of an application type resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json | -| [applicationsCreateOrUpdateSample.js][applicationscreateorupdatesample] | Create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json | -| [applicationsDeleteSample.js][applicationsdeletesample] | Delete a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json | -| [applicationsGetSample.js][applicationsgetsample] | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json | -| [applicationsListSample.js][applicationslistsample] | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json | -| [applicationsReadUpgradeSample.js][applicationsreadupgradesample] | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json | -| [applicationsResumeUpgradeSample.js][applicationsresumeupgradesample] | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json | -| [applicationsStartRollbackSample.js][applicationsstartrollbacksample] | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json | -| [applicationsUpdateSample.js][applicationsupdatesample] | Updates the tags of an application resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json | -| [managedApplyMaintenanceWindowPostSample.js][managedapplymaintenancewindowpostsample] | Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json | -| [managedAzResiliencyStatusGetSample.js][managedazresiliencystatusgetsample] | Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json | -| [managedClusterVersionGetByEnvironmentSample.js][managedclusterversiongetbyenvironmentsample] | Gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json | -| [managedClusterVersionGetSample.js][managedclusterversiongetsample] | Gets information about an available Service Fabric managed cluster code version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json | -| [managedClusterVersionListByEnvironmentSample.js][managedclusterversionlistbyenvironmentsample] | Gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json | -| [managedClusterVersionListSample.js][managedclusterversionlistsample] | Gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json | -| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | Create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json | -| [managedClustersDeleteSample.js][managedclustersdeletesample] | Delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json | -| [managedClustersGetSample.js][managedclustersgetsample] | Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json | -| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | Gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json | -| [managedClustersListBySubscriptionSample.js][managedclusterslistbysubscriptionsample] | Gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json | -| [managedClustersUpdateSample.js][managedclustersupdatesample] | Update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json | -| [managedMaintenanceWindowStatusGetSample.js][managedmaintenancewindowstatusgetsample] | Action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json | -| [managedUnsupportedVMSizesGetSample.js][managedunsupportedvmsizesgetsample] | Get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json | -| [managedUnsupportedVMSizesListSample.js][managedunsupportedvmsizeslistsample] | Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json | -| [nodeTypeSkusListSample.js][nodetypeskuslistsample] | Get a Service Fabric node type supported SKUs. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json | -| [nodeTypesCreateOrUpdateSample.js][nodetypescreateorupdatesample] | Create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json | -| [nodeTypesDeleteNodeSample.js][nodetypesdeletenodesample] | Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json | -| [nodeTypesDeleteSample.js][nodetypesdeletesample] | Delete a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json | -| [nodeTypesGetSample.js][nodetypesgetsample] | Get a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json | -| [nodeTypesListByManagedClustersSample.js][nodetypeslistbymanagedclusterssample] | Gets all Node types of the specified managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json | -| [nodeTypesReimageSample.js][nodetypesreimagesample] | Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json | -| [nodeTypesRestartSample.js][nodetypesrestartsample] | Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json | -| [nodeTypesUpdateSample.js][nodetypesupdatesample] | Update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json | -| [operationResultsGetSample.js][operationresultsgetsample] | Get long running operation result. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json | -| [operationStatusGetSample.js][operationstatusgetsample] | Get long running operation status. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json | -| [operationsListSample.js][operationslistsample] | Get the list of available Service Fabric resource provider API operations. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json | -| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | Create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json | -| [servicesDeleteSample.js][servicesdeletesample] | Delete a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json | -| [servicesGetSample.js][servicesgetsample] | Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json | -| [servicesListByApplicationsSample.js][serviceslistbyapplicationssample] | Gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json | -| [servicesUpdateSample.js][servicesupdatesample] | Updates the tags of a service resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.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 applicationTypeVersionsCreateOrUpdateSample.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 -npx dev-tool run vendored cross-env SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID="" SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP="" node applicationTypeVersionsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[applicationtypeversionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js -[applicationtypeversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js -[applicationtypeversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js -[applicationtypeversionslistbyapplicationtypessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js -[applicationtypeversionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js -[applicationtypescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js -[applicationtypesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js -[applicationtypesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js -[applicationtypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js -[applicationtypesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js -[applicationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js -[applicationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js -[applicationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js -[applicationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js -[applicationsreadupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js -[applicationsresumeupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js -[applicationsstartrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js -[applicationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js -[managedapplymaintenancewindowpostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js -[managedazresiliencystatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js -[managedclusterversiongetbyenvironmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js -[managedclusterversiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js -[managedclusterversionlistbyenvironmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js -[managedclusterversionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js -[managedclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js -[managedclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js -[managedclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js -[managedclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js -[managedclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js -[managedclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js -[managedmaintenancewindowstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js -[managedunsupportedvmsizesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js -[managedunsupportedvmsizeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js -[nodetypeskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js -[nodetypescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js -[nodetypesdeletenodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js -[nodetypesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js -[nodetypesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js -[nodetypeslistbymanagedclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js -[nodetypesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js -[nodetypesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js -[nodetypesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js -[operationresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js -[operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js -[serviceslistbyapplicationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js -[servicesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-servicefabricmanagedclusters?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js deleted file mode 100644 index 1c558af88ab0..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js +++ /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. -const { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application type version resource with the specified name. - * - * @summary Create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json - */ -async function putAnApplicationTypeVersion() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const parameters = { - appPackageUrl: "http://fakelink.test.com/MyAppType", - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - ); - console.log(result); -} - -async function main() { - putAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js deleted file mode 100644 index 597b12f57208..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Service Fabric managed application type version resource with the specified name. - * - * @summary Delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json - */ -async function deleteAnApplicationTypeVersion() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - version, - ); - console.log(result); -} - -async function main() { - deleteAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js deleted file mode 100644 index d60e578c3578..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * - * @summary Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - */ -async function getAnApplicationTypeVersion() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.get( - resourceGroupName, - clusterName, - applicationTypeName, - version, - ); - console.log(result); -} - -async function main() { - getAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js deleted file mode 100644 index 2d4944f059ba..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js +++ /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. -const { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * - * @summary Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json - */ -async function getAListOfApplicationTypeVersionResources() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.applicationTypeVersions.listByApplicationTypes( - resourceGroupName, - clusterName, - applicationTypeName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAListOfApplicationTypeVersionResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js deleted file mode 100644 index 5455b8bea70d..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js +++ /dev/null @@ -1,50 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the tags of an application type version resource of a given managed cluster. - * - * @summary Updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json - */ -async function patchAnApplicationTypeVersion() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const parameters = { - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypeVersions.update( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - ); - console.log(result); -} - -async function main() { - patchAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js deleted file mode 100644 index bc3fe4e3e57d..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application type name resource with the specified name. - * - * @summary Create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json - */ -async function putAnApplicationType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const parameters = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.createOrUpdate( - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - putAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js deleted file mode 100644 index 10380b25dba8..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Service Fabric managed application type name resource with the specified name. - * - * @summary Delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json - */ -async function deleteAnApplicationType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - ); - console.log(result); -} - -async function main() { - deleteAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js deleted file mode 100644 index 06495952c6f4..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * - * @summary Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - */ -async function getAnApplicationType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.get( - resourceGroupName, - clusterName, - applicationTypeName, - ); - console.log(result); -} - -async function main() { - getAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js deleted file mode 100644 index 461e0241af3e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * - * @summary Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json - */ -async function getAListOfApplicationTypeNameResources() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.applicationTypes.list(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAListOfApplicationTypeNameResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js deleted file mode 100644 index 4ab8ec38f2a7..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the tags of an application type resource of a given managed cluster. - * - * @summary Updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json - */ -async function patchAnApplicationType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const parameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applicationTypes.update( - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - patchAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js deleted file mode 100644 index 30fca469f628..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js +++ /dev/null @@ -1,113 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. - * - * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json - */ -async function putAnApplicationWithMaximumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters = { - location: "eastus", - parameters: { param1: "value1" }, - tags: { a: "b" }, - upgradePolicy: { - applicationHealthPolicy: { - considerWarningAsError: true, - defaultServiceTypeHealthPolicy: { - maxPercentUnhealthyPartitionsPerService: 0, - maxPercentUnhealthyReplicasPerPartition: 0, - maxPercentUnhealthyServices: 0, - }, - maxPercentUnhealthyDeployedApplications: 0, - serviceTypeHealthPolicyMap: { - service1: { - maxPercentUnhealthyPartitionsPerService: 30, - maxPercentUnhealthyReplicasPerPartition: 30, - maxPercentUnhealthyServices: 30, - }, - }, - }, - forceRestart: false, - instanceCloseDelayDuration: 600, - recreateApplication: false, - rollingUpgradeMonitoringPolicy: { - failureAction: "Rollback", - healthCheckRetryTimeout: "00:10:00", - healthCheckStableDuration: "00:05:00", - healthCheckWaitDuration: "00:02:00", - upgradeDomainTimeout: "00:15:00", - upgradeTimeout: "01:00:00", - }, - upgradeMode: "UnmonitoredAuto", - upgradeReplicaSetCheckTimeout: 3600, - }, - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. - * - * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json - */ -async function putAnApplicationWithMinimumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters = { - location: "eastus", - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main() { - putAnApplicationWithMaximumParameters(); - putAnApplicationWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js deleted file mode 100644 index 26fee3b25fcc..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Service Fabric managed application resource with the specified name. - * - * @summary Delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json - */ -async function deleteAnApplication() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main() { - deleteAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js deleted file mode 100644 index 72fce9c6fd35..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * - * @summary Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - */ -async function getAnApplication() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.get(resourceGroupName, clusterName, applicationName); - console.log(result); -} - -async function main() { - getAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js deleted file mode 100644 index 119bba10cbaf..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * - * @summary Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json - */ -async function getAListOfApplicationResources() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.applications.list(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAListOfApplicationResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js deleted file mode 100644 index e82a2e0a8abb..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * - * @summary Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json - */ -async function getAnApplicationUpgrade() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginReadUpgradeAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main() { - getAnApplicationUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js deleted file mode 100644 index 479c9cf86592..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * - * @summary Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json - */ -async function resumeUpgrade() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters = { - upgradeDomainName: "UD1", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginResumeUpgradeAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main() { - resumeUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js deleted file mode 100644 index 5baa7e853943..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * - * @summary Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json - */ -async function startAnApplicationUpgradeRollback() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.beginStartRollbackAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main() { - startAnApplicationUpgradeRollback(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js deleted file mode 100644 index 5dde4483ba34..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the tags of an application resource of a given managed cluster. - * - * @summary Updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json - */ -async function patchAnApplication() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.applications.update( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main() { - patchAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js deleted file mode 100644 index e0e64c71a46b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * - * @summary Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json - */ -async function maintenanceWindowStatus() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedApplyMaintenanceWindow.post(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - maintenanceWindowStatus(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js deleted file mode 100644 index abd7bc7d473c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * - * @summary Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json - */ -async function azResiliencyStatusOfBaseResources() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedAzResiliencyStatusOperations.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main() { - azResiliencyStatusOfBaseResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js deleted file mode 100644 index 8efad8ee9a27..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about an available Service Fabric cluster code version by environment. - * - * @summary Gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json - */ -async function getClusterVersionByEnvironment() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const environment = "Windows"; - const clusterVersion = "7.2.477.9590"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.getByEnvironment( - location, - environment, - clusterVersion, - ); - console.log(result); -} - -async function main() { - getClusterVersionByEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js deleted file mode 100644 index 9b6a102e787b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets information about an available Service Fabric managed cluster code version. - * - * @summary Gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json - */ -async function getClusterVersion() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const clusterVersion = "7.2.477.9590"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.get(location, clusterVersion); - console.log(result); -} - -async function main() { - getClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js deleted file mode 100644 index 26e652de75d9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by environment. - * - * @summary Gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json - */ -async function listClusterVersionsByEnvironment() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const environment = "Windows"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.listByEnvironment(location, environment); - console.log(result); -} - -async function main() { - listClusterVersionsByEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js deleted file mode 100644 index e6a6f8afc301..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by location. - * - * @summary Gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json - */ -async function listClusterVersions() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusterVersion.list(location); - console.log(result); -} - -async function main() { - listClusterVersions(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js deleted file mode 100644 index e1bd99fb1634..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js +++ /dev/null @@ -1,197 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. - * - * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json - */ -async function putAClusterWithMaximumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "mycluster"; - const parameters = { - addonFeatures: ["DnsService", "BackupRestoreService", "ResourceMonitorService"], - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - allocatedOutboundPorts: 0, - allowRdpAccess: true, - applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, - autoGeneratedDomainNameLabelScope: "SubscriptionReuse", - auxiliarySubnets: [ - { - name: "testSubnet1", - enableIpv6: true, - networkSecurityGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1", - privateEndpointNetworkPolicies: "enabled", - privateLinkServiceNetworkPolicies: "enabled", - }, - ], - clientConnectionPort: 19000, - clusterCodeVersion: "7.1.168.9494", - clusterUpgradeMode: "Manual", - ddosProtectionPlanId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan", - dnsName: "mycluster", - enableAutoOSUpgrade: true, - enableHttpGatewayExclusiveAuthMode: true, - enableIpv6: true, - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - httpGatewayConnectionPort: 19080, - httpGatewayTokenAuthConnectionPort: 19081, - ipTags: [{ ipTagType: "FirstPartyUsage", tag: "SQL" }], - loadBalancingRules: [ - { - backendPort: 80, - frontendPort: 80, - probePort: 80, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 443, - frontendPort: 443, - probePort: 443, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 10000, - frontendPort: 10000, - loadDistribution: "Default", - probePort: 10000, - probeProtocol: "http", - protocol: "tcp", - }, - ], - location: "eastus", - networkSecurityRules: [ - { - name: "TestName", - description: "Test description", - access: "allow", - destinationAddressPrefixes: ["*"], - destinationPortRanges: ["*"], - direction: "inbound", - priority: 1010, - sourceAddressPrefixes: ["*"], - sourcePortRanges: ["*"], - protocol: "tcp", - }, - { - name: "AllowARM", - access: "allow", - destinationAddressPrefix: "*", - destinationPortRange: "33500-33699", - direction: "inbound", - priority: 2002, - sourceAddressPrefix: "AzureResourceManager", - sourcePortRange: "*", - protocol: "*", - }, - ], - publicIPPrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", - publicIPv6PrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", - serviceEndpoints: [{ locations: ["eastus2", "usnorth"], service: "Microsoft.Storage" }], - sku: { name: "Basic" }, - tags: {}, - upgradeDescription: { - deltaHealthPolicy: { - maxPercentDeltaUnhealthyApplications: 40, - maxPercentDeltaUnhealthyNodes: 20, - maxPercentUpgradeDomainDeltaUnhealthyNodes: 40, - }, - forceRestart: false, - healthPolicy: { - maxPercentUnhealthyApplications: 30, - maxPercentUnhealthyNodes: 10, - }, - monitoringPolicy: { - healthCheckRetryTimeout: "00:55:00", - healthCheckStableDuration: "00:45:00", - healthCheckWaitDuration: "00:05:00", - upgradeDomainTimeout: "03:00:00", - upgradeTimeout: "12:00:00", - }, - }, - useCustomVnet: true, - zonalResiliency: true, - zonalUpdateMode: "Fast", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. - * - * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json - */ -async function putAClusterWithMinimumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const parameters = { - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - clusterUpgradeCadence: "Wave1", - clusterUpgradeMode: "Automatic", - dnsName: "myCluster", - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - location: "eastus", - sku: { name: "Basic" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -async function main() { - putAClusterWithMaximumParameters(); - putAClusterWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js deleted file mode 100644 index c0c5822c8507..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Service Fabric managed cluster resource with the specified name. - * - * @summary Delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json - */ -async function deleteACluster() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.beginDeleteAndWait(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - deleteACluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js deleted file mode 100644 index d78acebcd0fc..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * - * @summary Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - */ -async function getACluster() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.get(resourceGroupName, clusterName); - console.log(result); -} - -async function main() { - getACluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js deleted file mode 100644 index 9c25fbd99a11..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * - * @summary Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json - */ -async function listClusterByResourceGroup() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedClusters.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listClusterByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js deleted file mode 100644 index 3b251dc93c8e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * - * @summary Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json - */ -async function listManagedClusters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedClusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedClusters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js deleted file mode 100644 index c330296ebd44..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update the tags of of a Service Fabric managed cluster resource with the specified name. - * - * @summary Update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json - */ -async function patchAManagedCluster() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const parameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedClusters.update(resourceGroupName, clusterName, parameters); - console.log(result); -} - -async function main() { - patchAManagedCluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js deleted file mode 100644 index 232b9421f7e2..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * - * @summary Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json - */ -async function maintenanceWindowStatus() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedMaintenanceWindowStatusOperations.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main() { - maintenanceWindowStatus(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js deleted file mode 100644 index fea55475e60a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get unsupported vm size for Service Fabric Managed Clusters. - * - * @summary Get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json - */ -async function getUnsupportedVMSizes() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const vmSize = "Standard_B1ls1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.managedUnsupportedVMSizes.get(location, vmSize); - console.log(result); -} - -async function main() { - getUnsupportedVMSizes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js deleted file mode 100644 index 9f1c9d6525a4..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * - * @summary Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json - */ -async function listUnsupportedVMSizes() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedUnsupportedVMSizes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listUnsupportedVMSizes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js deleted file mode 100644 index eaeeef7f30cc..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric node type supported SKUs. - * - * @summary Get a Service Fabric node type supported SKUs. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json - */ -async function listANodeTypeSkUs() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.nodeTypeSkus.list(resourceGroupName, clusterName, nodeTypeName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listANodeTypeSkUs(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js deleted file mode 100644 index 2993cb5dba72..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js +++ /dev/null @@ -1,488 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json - */ -async function putANodeTypeWithAutoScaleParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - capacities: { clientConnections: "65536" }, - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - placementProperties: { - hasSSD: "true", - nodeColor: "green", - someProperty: "5", - }, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: -1, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], - }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, - ], - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json - */ -async function putANodeTypeWithMaximumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE-testResourceGroup-testRegion-test"; - const parameters = { - additionalDataDisks: [ - { diskLetter: "F", diskSizeGB: 256, diskType: "StandardSSD_LRS", lun: 1 }, - { diskLetter: "G", diskSizeGB: 150, diskType: "Premium_LRS", lun: 2 }, - ], - additionalNetworkInterfaceConfigurations: [ - { - name: "nic-1", - dscpConfiguration: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig", - }, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig-1", - applicationGatewayBackendAddressPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest", - }, - ], - loadBalancerBackendAddressPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool", - }, - ], - loadBalancerInboundNatPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool", - }, - ], - privateIPAddressVersion: "IPv4", - publicIPAddressConfiguration: { - name: "publicip-1", - ipTags: [{ ipTagType: "RoutingPreference", tag: "Internet" }], - publicIPAddressVersion: "IPv4", - }, - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - ], - }, - ], - capacities: { clientConnections: "65536" }, - computerNamePrefix: "BE", - dataDiskLetter: "S", - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - dscpConfigurationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig", - enableAcceleratedNetworking: true, - enableEncryptionAtHost: true, - enableNodePublicIP: true, - enableNodePublicIPv6: true, - enableOverProvisioning: false, - evictionPolicy: "Deallocate", - frontendConfigurations: [ - { - applicationGatewayBackendAddressPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest", - loadBalancerBackendAddressPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool", - loadBalancerInboundNatPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool", - }, - ], - isPrimary: false, - isSpotVM: true, - isStateless: true, - multiplePlacementGroups: true, - natGatewayId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway", - placementProperties: { - hasSSD: "true", - nodeColor: "green", - someProperty: "5", - }, - secureBootEnabled: true, - securityType: "TrustedLaunch", - serviceArtifactReferenceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile", - spotRestoreTimeout: "PT30M", - subnetId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - useDefaultPublicLoadBalancer: true, - useEphemeralOSDisk: true, - vmApplications: [ - { - configurationReference: - "https://mystorageaccount.blob.core.windows.net/containername/blobname", - enableAutomaticUpgrade: true, - order: 1, - packageReferenceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0", - treatFailureAsDeploymentFailure: false, - vmGalleryTags: '{"Tag1":"Value1","Tag2":"Value2"}', - }, - ], - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - enableAutomaticUpgrade: true, - forceUpdateTag: "v.1.0", - publisher: "Microsoft.Azure.Geneva", - settings: {}, - setupOrder: ["BeforeSFRuntime"], - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], - }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, - ], - vmSetupActions: ["EnableContainers", "EnableHyperV"], - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json - */ -async function putANodeTypeWithMinimumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json - */ -async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - enableEncryptionAtHost: true, - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - useTempDataDisk: true, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json - */ -async function putNodeTypeWithCustomVMImage() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json - */ -async function putNodeTypeWithDedicatedHosts() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - capacities: {}, - dataDiskSizeGB: 200, - dataDiskType: "StandardSSD_LRS", - hostGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - isPrimary: false, - placementProperties: {}, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2019-Datacenter", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D8s_v3", - zones: ["1"], - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json - */ -async function putNodeTypeWithSharedGalleriesCustomVMImage() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - dataDiskSizeGB: 200, - isPrimary: false, - vmInstanceCount: 10, - vmSharedGalleryImageId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest", - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json - */ -async function putNodeTypeWithVMImagePlan() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "windows_2022_test", - vmImagePlan: { - name: "win_2022_test_20_10_gen2", - product: "windows_2022_test", - publisher: "testpublisher", - }, - vmImagePublisher: "testpublisher", - vmImageSku: "win_2022_test_20_10_gen2", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - putANodeTypeWithAutoScaleParameters(); - putANodeTypeWithMaximumParameters(); - putANodeTypeWithMinimumParameters(); - putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(); - putNodeTypeWithCustomVMImage(); - putNodeTypeWithDedicatedHosts(); - putNodeTypeWithSharedGalleriesCustomVMImage(); - putNodeTypeWithVMImagePlan(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js deleted file mode 100644 index 9f7873f9479b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * - * @summary Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json - */ -async function deleteNodes() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginDeleteNodeAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - deleteNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js deleted file mode 100644 index 76bfa831c808..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Service Fabric node type of a given managed cluster. - * - * @summary Delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json - */ -async function deleteANodeType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginDeleteAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - ); - console.log(result); -} - -async function main() { - deleteANodeType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js deleted file mode 100644 index c165d4780ed0..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric node type of a given managed cluster. - * - * @summary Get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - */ -async function getANodeType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "FE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.get(resourceGroupName, clusterName, nodeTypeName); - console.log(result); -} - -async function main() { - getANodeType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js deleted file mode 100644 index 3f0821e3929c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all Node types of the specified managed cluster. - * - * @summary Gets all Node types of the specified managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json - */ -async function listNodeTypeOfTheSpecifiedManagedCluster() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.nodeTypes.listByManagedClusters(resourceGroupName, clusterName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listNodeTypeOfTheSpecifiedManagedCluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js deleted file mode 100644 index f2925fd63a51..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * - * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json - */ -async function reimageAllNodesByUpgradeDomain() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - updateType: "ByUpgradeDomain", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginReimageAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * - * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json - */ -async function reimageNodes() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginReimageAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - reimageAllNodesByUpgradeDomain(); - reimageNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js deleted file mode 100644 index 7646c5db834c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * - * @summary Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json - */ -async function restartNodes() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginRestartAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - restartNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js deleted file mode 100644 index 4975b1d2bd61..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js +++ /dev/null @@ -1,75 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. - * - * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json - */ -async function patchANodeType() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. - * - * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json - */ -async function patchANodeTypeWhileAutoScaling() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters = { - sku: { name: "Standard_S0", capacity: 10, tier: "Standard" }, - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.nodeTypes.beginUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main() { - patchANodeType(); - patchANodeTypeWhileAutoScaling(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js deleted file mode 100644 index 3999396150a4..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get long running operation result. - * - * @summary Get long running operation result. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json - */ -async function getOperationResult() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.operationResults.get(location, operationId); - console.log(result); -} - -async function main() { - getOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js deleted file mode 100644 index fe0b2caf7d49..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js +++ /dev/null @@ -1,58 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get long running operation status. - * - * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json - */ -async function getFailedOperationStatus() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -/** - * This sample demonstrates how to Get long running operation status. - * - * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_succeeded.json - */ -async function getSucceededOperationResult() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -async function main() { - getFailedOperationStatus(); - getSucceededOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index 29d3bb388dcc..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the list of available Service Fabric resource provider API operations. - * - * @summary Get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json - */ -async function listAvailableOperations() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAvailableOperations(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json deleted file mode 100644 index 14fb153d9cb8..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-servicefabricmanagedclusters-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters" - }, - "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/servicefabricmanagedclusters/arm-servicefabricmanagedclusters", - "dependencies": { - "@azure/arm-servicefabricmanagedclusters": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js deleted file mode 100644 index baa8e56da530..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js +++ /dev/null @@ -1,125 +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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. - * - * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json - */ -async function putAServiceWithMaximumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters = { - location: "eastus", - properties: { - correlationScheme: [ - { - scheme: "AlignedAffinity", - serviceName: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1", - }, - ], - defaultMoveCost: "Medium", - instanceCount: 5, - minInstanceCount: 3, - minInstancePercentage: 30, - partitionDescription: { partitionScheme: "Singleton" }, - placementConstraints: "NodeType==frontend", - scalingPolicies: [ - { - scalingMechanism: { - kind: "ScalePartitionInstanceCount", - maxInstanceCount: 9, - minInstanceCount: 3, - scaleIncrement: 2, - }, - scalingTrigger: { - kind: "AveragePartitionLoadTrigger", - lowerLoadThreshold: 2, - metricName: "metricName", - scaleInterval: "00:01:00", - upperLoadThreshold: 8, - }, - }, - ], - serviceDnsName: "myservicednsname.myApp", - serviceKind: "Stateless", - serviceLoadMetrics: [{ name: "metric1", defaultLoad: 3, weight: "Low" }], - servicePackageActivationMode: "SharedProcess", - servicePlacementPolicies: [{ type: "NonPartiallyPlaceService" }], - serviceTypeName: "myServiceType", - }, - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. - * - * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json - */ -async function putAServiceWithMinimumParameters() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters = { - location: "eastus", - properties: { - instanceCount: 1, - partitionDescription: { partitionScheme: "Singleton" }, - serviceKind: "Stateless", - serviceTypeName: "myServiceType", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - putAServiceWithMaximumParameters(); - putAServiceWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js deleted file mode 100644 index e0695b663de9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Service Fabric managed service resource with the specified name. - * - * @summary Delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json - */ -async function deleteAService() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - ); - console.log(result); -} - -async function main() { - deleteAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js deleted file mode 100644 index bfdcf618419f..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * - * @summary Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - */ -async function getAService() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.get( - resourceGroupName, - clusterName, - applicationName, - serviceName, - ); - console.log(result); -} - -async function main() { - getAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js deleted file mode 100644 index 2cdbaeabfb90..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js +++ /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. -const { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * - * @summary Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json - */ -async function getAListOfServiceResources() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.services.listByApplications( - resourceGroupName, - clusterName, - applicationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAListOfServiceResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js deleted file mode 100644 index 1085d0a6c324..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.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 { - ServiceFabricManagedClustersManagementClient, -} = require("@azure/arm-servicefabricmanagedclusters"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the tags of a service resource of a given managed cluster. - * - * @summary Updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json - */ -async function patchAService() { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - const result = await client.services.update( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - patchAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md deleted file mode 100644 index cffa2d83618e..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,161 +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** | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [applicationTypeVersionsCreateOrUpdateSample.ts][applicationtypeversionscreateorupdatesample] | Create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json | -| [applicationTypeVersionsDeleteSample.ts][applicationtypeversionsdeletesample] | Delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json | -| [applicationTypeVersionsGetSample.ts][applicationtypeversionsgetsample] | Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json | -| [applicationTypeVersionsListByApplicationTypesSample.ts][applicationtypeversionslistbyapplicationtypessample] | Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json | -| [applicationTypeVersionsUpdateSample.ts][applicationtypeversionsupdatesample] | Updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json | -| [applicationTypesCreateOrUpdateSample.ts][applicationtypescreateorupdatesample] | Create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json | -| [applicationTypesDeleteSample.ts][applicationtypesdeletesample] | Delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json | -| [applicationTypesGetSample.ts][applicationtypesgetsample] | Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json | -| [applicationTypesListSample.ts][applicationtypeslistsample] | Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json | -| [applicationTypesUpdateSample.ts][applicationtypesupdatesample] | Updates the tags of an application type resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json | -| [applicationsCreateOrUpdateSample.ts][applicationscreateorupdatesample] | Create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json | -| [applicationsDeleteSample.ts][applicationsdeletesample] | Delete a Service Fabric managed application resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json | -| [applicationsGetSample.ts][applicationsgetsample] | Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json | -| [applicationsListSample.ts][applicationslistsample] | Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json | -| [applicationsReadUpgradeSample.ts][applicationsreadupgradesample] | Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json | -| [applicationsResumeUpgradeSample.ts][applicationsresumeupgradesample] | Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json | -| [applicationsStartRollbackSample.ts][applicationsstartrollbacksample] | Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json | -| [applicationsUpdateSample.ts][applicationsupdatesample] | Updates the tags of an application resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json | -| [managedApplyMaintenanceWindowPostSample.ts][managedapplymaintenancewindowpostsample] | Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json | -| [managedAzResiliencyStatusGetSample.ts][managedazresiliencystatusgetsample] | Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json | -| [managedClusterVersionGetByEnvironmentSample.ts][managedclusterversiongetbyenvironmentsample] | Gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json | -| [managedClusterVersionGetSample.ts][managedclusterversiongetsample] | Gets information about an available Service Fabric managed cluster code version. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json | -| [managedClusterVersionListByEnvironmentSample.ts][managedclusterversionlistbyenvironmentsample] | Gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json | -| [managedClusterVersionListSample.ts][managedclusterversionlistsample] | Gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json | -| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | Create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json | -| [managedClustersDeleteSample.ts][managedclustersdeletesample] | Delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json | -| [managedClustersGetSample.ts][managedclustersgetsample] | Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json | -| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | Gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json | -| [managedClustersListBySubscriptionSample.ts][managedclusterslistbysubscriptionsample] | Gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json | -| [managedClustersUpdateSample.ts][managedclustersupdatesample] | Update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json | -| [managedMaintenanceWindowStatusGetSample.ts][managedmaintenancewindowstatusgetsample] | Action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json | -| [managedUnsupportedVMSizesGetSample.ts][managedunsupportedvmsizesgetsample] | Get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json | -| [managedUnsupportedVMSizesListSample.ts][managedunsupportedvmsizeslistsample] | Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json | -| [nodeTypeSkusListSample.ts][nodetypeskuslistsample] | Get a Service Fabric node type supported SKUs. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json | -| [nodeTypesCreateOrUpdateSample.ts][nodetypescreateorupdatesample] | Create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json | -| [nodeTypesDeleteNodeSample.ts][nodetypesdeletenodesample] | Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json | -| [nodeTypesDeleteSample.ts][nodetypesdeletesample] | Delete a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json | -| [nodeTypesGetSample.ts][nodetypesgetsample] | Get a Service Fabric node type of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json | -| [nodeTypesListByManagedClustersSample.ts][nodetypeslistbymanagedclusterssample] | Gets all Node types of the specified managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json | -| [nodeTypesReimageSample.ts][nodetypesreimagesample] | Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json | -| [nodeTypesRestartSample.ts][nodetypesrestartsample] | Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json | -| [nodeTypesUpdateSample.ts][nodetypesupdatesample] | Update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json | -| [operationResultsGetSample.ts][operationresultsgetsample] | Get long running operation result. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json | -| [operationStatusGetSample.ts][operationstatusgetsample] | Get long running operation status. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json | -| [operationsListSample.ts][operationslistsample] | Get the list of available Service Fabric resource provider API operations. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json | -| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | Create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json | -| [servicesDeleteSample.ts][servicesdeletesample] | Delete a Service Fabric managed service resource with the specified name. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json | -| [servicesGetSample.ts][servicesgetsample] | Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json | -| [servicesListByApplicationsSample.ts][serviceslistbyapplicationssample] | Gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json | -| [servicesUpdateSample.ts][servicesupdatesample] | Updates the tags of a service resource of a given managed cluster. x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.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/applicationTypeVersionsCreateOrUpdateSample.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 -npx dev-tool run vendored cross-env SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID="" SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP="" node dist/applicationTypeVersionsCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[applicationtypeversionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts -[applicationtypeversionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts -[applicationtypeversionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts -[applicationtypeversionslistbyapplicationtypessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts -[applicationtypeversionsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts -[applicationtypescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts -[applicationtypesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts -[applicationtypesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts -[applicationtypeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts -[applicationtypesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts -[applicationscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts -[applicationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts -[applicationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts -[applicationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts -[applicationsreadupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts -[applicationsresumeupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts -[applicationsstartrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts -[applicationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts -[managedapplymaintenancewindowpostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts -[managedazresiliencystatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts -[managedclusterversiongetbyenvironmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts -[managedclusterversiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts -[managedclusterversionlistbyenvironmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts -[managedclusterversionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts -[managedclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts -[managedclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts -[managedclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts -[managedclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts -[managedclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts -[managedclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts -[managedmaintenancewindowstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts -[managedunsupportedvmsizesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts -[managedunsupportedvmsizeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts -[nodetypeskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts -[nodetypescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts -[nodetypesdeletenodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts -[nodetypesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts -[nodetypesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts -[nodetypeslistbymanagedclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts -[nodetypesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts -[nodetypesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts -[nodetypesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts -[operationresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts -[operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts -[servicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts -[servicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts -[servicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts -[serviceslistbyapplicationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts -[servicesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-servicefabricmanagedclusters?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json deleted file mode 100644 index 1431aad39bd0..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-servicefabricmanagedclusters-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters" - }, - "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/servicefabricmanagedclusters/arm-servicefabricmanagedclusters", - "dependencies": { - "@azure/arm-servicefabricmanagedclusters": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.7.2", - "rimraf": "latest" - } -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 508439fc7d62..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1 +0,0 @@ -# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts deleted file mode 100644 index 7a301b6745ae..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +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 { - ApplicationTypeVersionResource, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application type version resource with the specified name. - * - * @summary Create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json - */ -async function putAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const parameters: ApplicationTypeVersionResource = { - appPackageUrl: "http://fakelink.test.com/MyAppType", - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = - await client.applicationTypeVersions.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - putAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts deleted file mode 100644 index 284e2b386e30..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed application type version resource with the specified name. - * - * @summary Delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json - */ -async function deleteAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypeVersions.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - version, - ); - console.log(result); -} - -async function main(): Promise { - deleteAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts deleted file mode 100644 index 3ea7cbd654f4..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * - * @summary Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - */ -async function getAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypeVersions.get( - resourceGroupName, - clusterName, - applicationTypeName, - version, - ); - console.log(result); -} - -async function main(): Promise { - getAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts deleted file mode 100644 index 2b803ae83214..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * - * @summary Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json - */ -async function getAListOfApplicationTypeVersionResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.applicationTypeVersions.listByApplicationTypes( - resourceGroupName, - clusterName, - applicationTypeName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - getAListOfApplicationTypeVersionResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts deleted file mode 100644 index ce6c22a505c9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts +++ /dev/null @@ -1,55 +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 { - ApplicationTypeVersionUpdateParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of an application type version resource of a given managed cluster. - * - * @summary Updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json - */ -async function patchAnApplicationTypeVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const version = "1.0"; - const parameters: ApplicationTypeVersionUpdateParameters = { - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypeVersions.update( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - patchAnApplicationTypeVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts deleted file mode 100644 index f8221decc6f9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.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 { - ApplicationTypeResource, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application type name resource with the specified name. - * - * @summary Create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json - */ -async function putAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const parameters: ApplicationTypeResource = { location: "eastus" }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.createOrUpdate( - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - putAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts deleted file mode 100644 index cdd5ef7b483b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed application type name resource with the specified name. - * - * @summary Delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json - */ -async function deleteAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationTypeName, - ); - console.log(result); -} - -async function main(): Promise { - deleteAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts deleted file mode 100644 index cae12399240a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * - * @summary Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - */ -async function getAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.get( - resourceGroupName, - clusterName, - applicationTypeName, - ); - console.log(result); -} - -async function main(): Promise { - getAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts deleted file mode 100644 index 3bee4d793aaf..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * - * @summary Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json - */ -async function getAListOfApplicationTypeNameResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.applicationTypes.list( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - getAListOfApplicationTypeNameResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts deleted file mode 100644 index b444a4889323..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.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 { - ApplicationTypeUpdateParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of an application type resource of a given managed cluster. - * - * @summary Updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json - */ -async function patchAnApplicationType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationTypeName = "myAppType"; - const parameters: ApplicationTypeUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.update( - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - patchAnApplicationType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts deleted file mode 100644 index ac5931b14e43..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts +++ /dev/null @@ -1,122 +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 { - ApplicationResource, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. - * - * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json - */ -async function putAnApplicationWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: ApplicationResource = { - location: "eastus", - parameters: { param1: "value1" }, - tags: { a: "b" }, - upgradePolicy: { - applicationHealthPolicy: { - considerWarningAsError: true, - defaultServiceTypeHealthPolicy: { - maxPercentUnhealthyPartitionsPerService: 0, - maxPercentUnhealthyReplicasPerPartition: 0, - maxPercentUnhealthyServices: 0, - }, - maxPercentUnhealthyDeployedApplications: 0, - serviceTypeHealthPolicyMap: { - service1: { - maxPercentUnhealthyPartitionsPerService: 30, - maxPercentUnhealthyReplicasPerPartition: 30, - maxPercentUnhealthyServices: 30, - }, - }, - }, - forceRestart: false, - instanceCloseDelayDuration: 600, - recreateApplication: false, - rollingUpgradeMonitoringPolicy: { - failureAction: "Rollback", - healthCheckRetryTimeout: "00:10:00", - healthCheckStableDuration: "00:05:00", - healthCheckWaitDuration: "00:02:00", - upgradeDomainTimeout: "00:15:00", - upgradeTimeout: "01:00:00", - }, - upgradeMode: "UnmonitoredAuto", - upgradeReplicaSetCheckTimeout: 3600, - }, - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed application resource with the specified name. - * - * @summary Create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json - */ -async function putAnApplicationWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: ApplicationResource = { - location: "eastus", - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - putAnApplicationWithMaximumParameters(); - putAnApplicationWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts deleted file mode 100644 index 45d648cc3eb8..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed application resource with the specified name. - * - * @summary Delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json - */ -async function deleteAnApplication(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - deleteAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts deleted file mode 100644 index 888a0d61c46a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * - * @summary Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - */ -async function getAnApplication(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.get( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - getAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts deleted file mode 100644 index 329a8b4f8b7c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * - * @summary Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json - */ -async function getAListOfApplicationResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.applications.list( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - getAListOfApplicationResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts deleted file mode 100644 index c5091a6bdbc3..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * - * @summary Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json - */ -async function getAnApplicationUpgrade(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.beginReadUpgradeAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - getAnApplicationUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts deleted file mode 100644 index 4b499b0de5aa..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts +++ /dev/null @@ -1,53 +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 { - RuntimeResumeApplicationUpgradeParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * - * @summary Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json - */ -async function resumeUpgrade(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: RuntimeResumeApplicationUpgradeParameters = { - upgradeDomainName: "UD1", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.beginResumeUpgradeAndWait( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - resumeUpgrade(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts deleted file mode 100644 index 923aa7aa5acc..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * - * @summary Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json - */ -async function startAnApplicationUpgradeRollback(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.beginStartRollbackAndWait( - resourceGroupName, - clusterName, - applicationName, - ); - console.log(result); -} - -async function main(): Promise { - startAnApplicationUpgradeRollback(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts deleted file mode 100644 index 3cd5bffa75f6..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.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 { - ApplicationUpdateParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of an application resource of a given managed cluster. - * - * @summary Updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json - */ -async function patchAnApplication(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const parameters: ApplicationUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.update( - resourceGroupName, - clusterName, - applicationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - patchAnApplication(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts deleted file mode 100644 index 845bcd56b191..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * - * @summary Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json - */ -async function maintenanceWindowStatus(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || - "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedApplyMaintenanceWindow.post( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - maintenanceWindowStatus(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts deleted file mode 100644 index f8b5f4dacef9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * - * @summary Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json - */ -async function azResiliencyStatusOfBaseResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || - "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedAzResiliencyStatusOperations.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - azResiliencyStatusOfBaseResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts deleted file mode 100644 index 4abb1ba7e3aa..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about an available Service Fabric cluster code version by environment. - * - * @summary Gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json - */ -async function getClusterVersionByEnvironment(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const environment = "Windows"; - const clusterVersion = "7.2.477.9590"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusterVersion.getByEnvironment( - location, - environment, - clusterVersion, - ); - console.log(result); -} - -async function main(): Promise { - getClusterVersionByEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts deleted file mode 100644 index 6e1814d8245b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets information about an available Service Fabric managed cluster code version. - * - * @summary Gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json - */ -async function getClusterVersion(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const clusterVersion = "7.2.477.9590"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusterVersion.get( - location, - clusterVersion, - ); - console.log(result); -} - -async function main(): Promise { - getClusterVersion(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts deleted file mode 100644 index f75c4d2ce731..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by environment. - * - * @summary Gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json - */ -async function listClusterVersionsByEnvironment(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const environment = "Windows"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusterVersion.listByEnvironment( - location, - environment, - ); - console.log(result); -} - -async function main(): Promise { - listClusterVersionsByEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts deleted file mode 100644 index e660c79e3767..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available code versions for Service Fabric cluster resources by location. - * - * @summary Gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json - */ -async function listClusterVersions(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusterVersion.list(location); - console.log(result); -} - -async function main(): Promise { - listClusterVersions(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts deleted file mode 100644 index 109de7cc8d4b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts +++ /dev/null @@ -1,212 +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 { - ManagedCluster, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. - * - * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json - */ -async function putAClusterWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "mycluster"; - const parameters: ManagedCluster = { - addonFeatures: [ - "DnsService", - "BackupRestoreService", - "ResourceMonitorService", - ], - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - allocatedOutboundPorts: 0, - allowRdpAccess: true, - applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, - autoGeneratedDomainNameLabelScope: "SubscriptionReuse", - auxiliarySubnets: [ - { - name: "testSubnet1", - enableIpv6: true, - networkSecurityGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1", - privateEndpointNetworkPolicies: "enabled", - privateLinkServiceNetworkPolicies: "enabled", - }, - ], - clientConnectionPort: 19000, - clusterCodeVersion: "7.1.168.9494", - clusterUpgradeMode: "Manual", - ddosProtectionPlanId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan", - dnsName: "mycluster", - enableAutoOSUpgrade: true, - enableHttpGatewayExclusiveAuthMode: true, - enableIpv6: true, - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - httpGatewayConnectionPort: 19080, - httpGatewayTokenAuthConnectionPort: 19081, - ipTags: [{ ipTagType: "FirstPartyUsage", tag: "SQL" }], - loadBalancingRules: [ - { - backendPort: 80, - frontendPort: 80, - probePort: 80, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 443, - frontendPort: 443, - probePort: 443, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 10000, - frontendPort: 10000, - loadDistribution: "Default", - probePort: 10000, - probeProtocol: "http", - protocol: "tcp", - }, - ], - location: "eastus", - networkSecurityRules: [ - { - name: "TestName", - description: "Test description", - access: "allow", - destinationAddressPrefixes: ["*"], - destinationPortRanges: ["*"], - direction: "inbound", - priority: 1010, - sourceAddressPrefixes: ["*"], - sourcePortRanges: ["*"], - protocol: "tcp", - }, - { - name: "AllowARM", - access: "allow", - destinationAddressPrefix: "*", - destinationPortRange: "33500-33699", - direction: "inbound", - priority: 2002, - sourceAddressPrefix: "AzureResourceManager", - sourcePortRange: "*", - protocol: "*", - }, - ], - publicIPPrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", - publicIPv6PrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", - serviceEndpoints: [ - { locations: ["eastus2", "usnorth"], service: "Microsoft.Storage" }, - ], - sku: { name: "Basic" }, - tags: {}, - upgradeDescription: { - deltaHealthPolicy: { - maxPercentDeltaUnhealthyApplications: 40, - maxPercentDeltaUnhealthyNodes: 20, - maxPercentUpgradeDomainDeltaUnhealthyNodes: 40, - }, - forceRestart: false, - healthPolicy: { - maxPercentUnhealthyApplications: 30, - maxPercentUnhealthyNodes: 10, - }, - monitoringPolicy: { - healthCheckRetryTimeout: "00:55:00", - healthCheckStableDuration: "00:45:00", - healthCheckWaitDuration: "00:05:00", - upgradeDomainTimeout: "03:00:00", - upgradeTimeout: "12:00:00", - }, - }, - useCustomVnet: true, - zonalResiliency: true, - zonalUpdateMode: "Fast", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed cluster resource with the specified name. - * - * @summary Create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json - */ -async function putAClusterWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const parameters: ManagedCluster = { - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - clusterUpgradeCadence: "Wave1", - clusterUpgradeMode: "Automatic", - dnsName: "myCluster", - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - location: "eastus", - sku: { name: "Basic" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - putAClusterWithMaximumParameters(); - putAClusterWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts deleted file mode 100644 index a51b12055dc9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed cluster resource with the specified name. - * - * @summary Delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json - */ -async function deleteACluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.beginDeleteAndWait( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - deleteACluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts deleted file mode 100644 index b2102cc091eb..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * - * @summary Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - */ -async function getACluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - getACluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts deleted file mode 100644 index 58cae4a17cd2..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * - * @summary Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json - */ -async function listClusterByResourceGroup(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.managedClusters.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listClusterByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts deleted file mode 100644 index ddf786359d65..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * - * @summary Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json - */ -async function listManagedClusters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.managedClusters.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listManagedClusters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts deleted file mode 100644 index a5130f4a0917..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.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 { - ManagedClusterUpdateParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the tags of of a Service Fabric managed cluster resource with the specified name. - * - * @summary Update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json - */ -async function patchAManagedCluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const parameters: ManagedClusterUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.update( - resourceGroupName, - clusterName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - patchAManagedCluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts deleted file mode 100644 index 60bf14ac400b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * - * @summary Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json - */ -async function maintenanceWindowStatus(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || - "resourceGroup1"; - const clusterName = "mycluster1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedMaintenanceWindowStatusOperations.get( - resourceGroupName, - clusterName, - ); - console.log(result); -} - -async function main(): Promise { - maintenanceWindowStatus(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts deleted file mode 100644 index 62c94afd1f3a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts +++ /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. -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get unsupported vm size for Service Fabric Managed Clusters. - * - * @summary Get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json - */ -async function getUnsupportedVMSizes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const vmSize = "Standard_B1ls1"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedUnsupportedVMSizes.get(location, vmSize); - console.log(result); -} - -async function main(): Promise { - getUnsupportedVMSizes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts deleted file mode 100644 index aebe5b2c6aff..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts +++ /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. -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * - * @summary Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json - */ -async function listUnsupportedVMSizes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.managedUnsupportedVMSizes.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listUnsupportedVMSizes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts deleted file mode 100644 index bd5675611827..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric node type supported SKUs. - * - * @summary Get a Service Fabric node type supported SKUs. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json - */ -async function listANodeTypeSkUs(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.nodeTypeSkus.list( - resourceGroupName, - clusterName, - nodeTypeName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listANodeTypeSkUs(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts deleted file mode 100644 index 512aa76dc507..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts +++ /dev/null @@ -1,521 +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 { - NodeType, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json - */ -async function putANodeTypeWithAutoScaleParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - capacities: { clientConnections: "65536" }, - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - placementProperties: { - hasSSD: "true", - nodeColor: "green", - someProperty: "5", - }, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: -1, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], - }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, - ], - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json - */ -async function putANodeTypeWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE-testResourceGroup-testRegion-test"; - const parameters: NodeType = { - additionalDataDisks: [ - { diskLetter: "F", diskSizeGB: 256, diskType: "StandardSSD_LRS", lun: 1 }, - { diskLetter: "G", diskSizeGB: 150, diskType: "Premium_LRS", lun: 2 }, - ], - additionalNetworkInterfaceConfigurations: [ - { - name: "nic-1", - dscpConfiguration: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig", - }, - enableAcceleratedNetworking: true, - ipConfigurations: [ - { - name: "ipconfig-1", - applicationGatewayBackendAddressPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest", - }, - ], - loadBalancerBackendAddressPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool", - }, - ], - loadBalancerInboundNatPools: [ - { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool", - }, - ], - privateIPAddressVersion: "IPv4", - publicIPAddressConfiguration: { - name: "publicip-1", - ipTags: [{ ipTagType: "RoutingPreference", tag: "Internet" }], - publicIPAddressVersion: "IPv4", - }, - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - }, - }, - ], - }, - ], - capacities: { clientConnections: "65536" }, - computerNamePrefix: "BE", - dataDiskLetter: "S", - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - dscpConfigurationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig", - enableAcceleratedNetworking: true, - enableEncryptionAtHost: true, - enableNodePublicIP: true, - enableNodePublicIPv6: true, - enableOverProvisioning: false, - evictionPolicy: "Deallocate", - frontendConfigurations: [ - { - applicationGatewayBackendAddressPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest", - loadBalancerBackendAddressPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool", - loadBalancerInboundNatPoolId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool", - }, - ], - isPrimary: false, - isSpotVM: true, - isStateless: true, - multiplePlacementGroups: true, - natGatewayId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway", - placementProperties: { - hasSSD: "true", - nodeColor: "green", - someProperty: "5", - }, - secureBootEnabled: true, - securityType: "TrustedLaunch", - serviceArtifactReferenceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile", - spotRestoreTimeout: "PT30M", - subnetId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - useDefaultPublicLoadBalancer: true, - useEphemeralOSDisk: true, - vmApplications: [ - { - configurationReference: - "https://mystorageaccount.blob.core.windows.net/containername/blobname", - enableAutomaticUpgrade: true, - order: 1, - packageReferenceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0", - treatFailureAsDeploymentFailure: false, - vmGalleryTags: '{"Tag1":"Value1","Tag2":"Value2"}', - }, - ], - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - enableAutomaticUpgrade: true, - forceUpdateTag: "v.1.0", - publisher: "Microsoft.Azure.Geneva", - settings: {}, - setupOrder: ["BeforeSFRuntime"], - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], - }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, - ], - vmSetupActions: ["EnableContainers", "EnableHyperV"], - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json - */ -async function putANodeTypeWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json - */ -async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - enableEncryptionAtHost: true, - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - useTempDataDisk: true, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_DS3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json - */ -async function putNodeTypeWithCustomVMImage(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json - */ -async function putNodeTypeWithDedicatedHosts(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - capacities: {}, - dataDiskSizeGB: 200, - dataDiskType: "StandardSSD_LRS", - hostGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - isPrimary: false, - placementProperties: {}, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2019-Datacenter", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D8s_v3", - zones: ["1"], - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json - */ -async function putNodeTypeWithSharedGalleriesCustomVMImage(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmInstanceCount: 10, - vmSharedGalleryImageId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest", - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric node type of a given managed cluster. - * - * @summary Create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json - */ -async function putNodeTypeWithVMImagePlan(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeType = { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "windows_2022_test", - vmImagePlan: { - name: "win_2022_test_20_10_gen2", - product: "windows_2022_test", - publisher: "testpublisher", - }, - vmImagePublisher: "testpublisher", - vmImageSku: "win_2022_test_20_10_gen2", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - putANodeTypeWithAutoScaleParameters(); - putANodeTypeWithMaximumParameters(); - putANodeTypeWithMinimumParameters(); - putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(); - putNodeTypeWithCustomVMImage(); - putNodeTypeWithDedicatedHosts(); - putNodeTypeWithSharedGalleriesCustomVMImage(); - putNodeTypeWithVMImagePlan(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts deleted file mode 100644 index 0d4dd89a2556..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.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 { - NodeTypeActionParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * - * @summary Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json - */ -async function deleteNodes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginDeleteNodeAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - deleteNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts deleted file mode 100644 index d055b4ae4335..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric node type of a given managed cluster. - * - * @summary Delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json - */ -async function deleteANodeType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginDeleteAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - ); - console.log(result); -} - -async function main(): Promise { - deleteANodeType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts deleted file mode 100644 index 1dff076fbc2c..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric node type of a given managed cluster. - * - * @summary Get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - */ -async function getANodeType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "FE"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.get( - resourceGroupName, - clusterName, - nodeTypeName, - ); - console.log(result); -} - -async function main(): Promise { - getANodeType(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts deleted file mode 100644 index 92c2a0161305..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Node types of the specified managed cluster. - * - * @summary Gets all Node types of the specified managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json - */ -async function listNodeTypeOfTheSpecifiedManagedCluster(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.nodeTypes.listByManagedClusters( - resourceGroupName, - clusterName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listNodeTypeOfTheSpecifiedManagedCluster(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts deleted file mode 100644 index 4161931895e4..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts +++ /dev/null @@ -1,83 +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 { - NodeTypeActionParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * - * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json - */ -async function reimageAllNodesByUpgradeDomain(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { - updateType: "ByUpgradeDomain", - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginReimageAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * - * @summary Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json - */ -async function reimageNodes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginReimageAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - reimageAllNodesByUpgradeDomain(); - reimageNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts deleted file mode 100644 index 1465d7a705af..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.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 { - NodeTypeActionParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * - * @summary Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json - */ -async function restartNodes(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeActionParameters = { nodes: ["BE_0", "BE_3"] }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginRestartAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - restartNodes(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts deleted file mode 100644 index fb62c74d5b4a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.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 { - NodeTypeUpdateParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. - * - * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json - */ -async function patchANodeType(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Update the configuration of a node type of a given managed cluster, only updating tags. - * - * @summary Update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json - */ -async function patchANodeTypeWhileAutoScaling(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const nodeTypeName = "BE"; - const parameters: NodeTypeUpdateParameters = { - sku: { name: "Standard_S0", capacity: 10, tier: "Standard" }, - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.beginUpdateAndWait( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - patchANodeType(); - patchANodeTypeWhileAutoScaling(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts deleted file mode 100644 index 179e6ee3603a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts +++ /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. -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get long running operation result. - * - * @summary Get long running operation result. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_result.json - */ -async function getOperationResult(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.operationResults.get(location, operationId); - console.log(result); -} - -async function main(): Promise { - getOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts deleted file mode 100644 index 143486d40194..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts +++ /dev/null @@ -1,62 +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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get long running operation status. - * - * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_failed.json - */ -async function getFailedOperationStatus(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -/** - * This sample demonstrates how to Get long running operation status. - * - * @summary Get long running operation status. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Long_running_operation_status_succeeded.json - */ -async function getSucceededOperationResult(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "eastus"; - const operationId = "00000000-0000-0000-0000-000000001234"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -async function main(): Promise { - getFailedOperationStatus(); - getSucceededOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index e44ec146602f..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the list of available Service Fabric resource provider API operations. - * - * @summary Get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/Operations_example.json - */ -async function listAvailableOperations(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - listAvailableOperations(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts deleted file mode 100644 index 4f15a0daaf0a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts +++ /dev/null @@ -1,134 +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 { - ServiceResource, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. - * - * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json - */ -async function putAServiceWithMaximumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters: ServiceResource = { - location: "eastus", - properties: { - correlationScheme: [ - { - scheme: "AlignedAffinity", - serviceName: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1", - }, - ], - defaultMoveCost: "Medium", - instanceCount: 5, - minInstanceCount: 3, - minInstancePercentage: 30, - partitionDescription: { partitionScheme: "Singleton" }, - placementConstraints: "NodeType==frontend", - scalingPolicies: [ - { - scalingMechanism: { - kind: "ScalePartitionInstanceCount", - maxInstanceCount: 9, - minInstanceCount: 3, - scaleIncrement: 2, - }, - scalingTrigger: { - kind: "AveragePartitionLoadTrigger", - lowerLoadThreshold: 2, - metricName: "metricName", - scaleInterval: "00:01:00", - upperLoadThreshold: 8, - }, - }, - ], - serviceDnsName: "myservicednsname.myApp", - serviceKind: "Stateless", - serviceLoadMetrics: [{ name: "metric1", defaultLoad: 3, weight: "Low" }], - servicePackageActivationMode: "SharedProcess", - servicePlacementPolicies: [{ type: "NonPartiallyPlaceService" }], - serviceTypeName: "myServiceType", - }, - tags: { a: "b" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Service Fabric managed service resource with the specified name. - * - * @summary Create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json - */ -async function putAServiceWithMinimumParameters(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters: ServiceResource = { - location: "eastus", - properties: { - instanceCount: 1, - partitionDescription: { partitionScheme: "Singleton" }, - serviceKind: "Stateless", - serviceTypeName: "myServiceType", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.beginCreateOrUpdateAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - putAServiceWithMaximumParameters(); - putAServiceWithMinimumParameters(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts deleted file mode 100644 index 104a5ed1f222..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete a Service Fabric managed service resource with the specified name. - * - * @summary Delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json - */ -async function deleteAService(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.beginDeleteAndWait( - resourceGroupName, - clusterName, - applicationName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - deleteAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts deleted file mode 100644 index 95ed854bda8a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * - * @summary Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - */ -async function getAService(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.get( - resourceGroupName, - clusterName, - applicationName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - getAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts deleted file mode 100644 index 03e8f4d4e22b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.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 { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * - * @summary Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json - */ -async function getAListOfServiceResources(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const resArray = new Array(); - for await (let item of client.services.listByApplications( - resourceGroupName, - clusterName, - applicationName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - getAListOfServiceResources(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts deleted file mode 100644 index d08f0b41c69f..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts +++ /dev/null @@ -1,53 +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 { - ServiceUpdateParameters, - ServiceFabricManagedClustersManagementClient, -} from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the tags of a service resource of a given managed cluster. - * - * @summary Updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json - */ -async function patchAService(): Promise { - const subscriptionId = - process.env["SERVICEFABRICMANAGEDCLUSTERS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["SERVICEFABRICMANAGEDCLUSTERS_RESOURCE_GROUP"] || "resRg"; - const clusterName = "myCluster"; - const applicationName = "myApp"; - const serviceName = "myService"; - const parameters: ServiceUpdateParameters = { tags: { a: "b" } }; - const credential = new DefaultAzureCredential(); - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.update( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - patchAService(); -} - -main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/tsconfig.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/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/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/index.ts new file mode 100644 index 000000000000..9f20e24e5c62 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/index.ts @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ApplicationTypeVersionsDeleteOptionalParams, + ApplicationTypeVersionsGetOptionalParams, + ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ApplicationTypeVersionsUpdateOptionalParams, + ServiceFabricContext as Client, +} from "../index.js"; +import { + errorResponseDeserializer, + ApplicationTypeVersionResource, + applicationTypeVersionResourceSerializer, + applicationTypeVersionResourceDeserializer, + ApplicationTypeVersionUpdateParameters, + applicationTypeVersionUpdateParametersSerializer, + _ApplicationTypeVersionResourceList, + _applicationTypeVersionResourceListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByApplicationTypesSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options: ApplicationTypeVersionsListByApplicationTypesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listByApplicationTypesDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationTypeVersionResourceList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _applicationTypeVersionResourceListDeserializer(result.body); +} + +/** Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. */ +export function listByApplicationTypes( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options: ApplicationTypeVersionsListByApplicationTypesOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByApplicationTypesSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + options, + ), + _listByApplicationTypesDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options: ApplicationTypeVersionsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + version, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Service Fabric managed application type version resource with the specified name. */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options: ApplicationTypeVersionsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, applicationTypeName, version, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionUpdateParameters, + options: ApplicationTypeVersionsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + version, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: applicationTypeVersionUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationTypeVersionResourceDeserializer(result.body); +} + +/** Updates the tags of an application type version resource of a given managed cluster. */ +export async function update( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionUpdateParameters, + options: ApplicationTypeVersionsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + version, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionResource, + options: ApplicationTypeVersionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + version, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: applicationTypeVersionResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Create or update a Service Fabric managed application type version resource with the specified name. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionResource, + options: ApplicationTypeVersionsCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + version, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options: ApplicationTypeVersionsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + version, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationTypeVersionResourceDeserializer(result.body); +} + +/** Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options: ApplicationTypeVersionsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + version, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/index.ts new file mode 100644 index 000000000000..99e6832217ee --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/index.ts @@ -0,0 +1,325 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ApplicationTypesCreateOrUpdateOptionalParams, + ApplicationTypesDeleteOptionalParams, + ApplicationTypesGetOptionalParams, + ApplicationTypesListOptionalParams, + ApplicationTypesUpdateOptionalParams, + ServiceFabricContext as Client, +} from "../index.js"; +import { + errorResponseDeserializer, + ApplicationTypeResource, + applicationTypeResourceSerializer, + applicationTypeResourceDeserializer, + ApplicationTypeUpdateParameters, + applicationTypeUpdateParametersSerializer, + _ApplicationTypeResourceList, + _applicationTypeResourceListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ApplicationTypesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationTypeResourceList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _applicationTypeResourceListDeserializer(result.body); +} + +/** Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. */ +export function list( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ApplicationTypesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, clusterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options: ApplicationTypesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Service Fabric managed application type name resource with the specified name. */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options: ApplicationTypesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, applicationTypeName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeUpdateParameters, + options: ApplicationTypesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: applicationTypeUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationTypeResourceDeserializer(result.body); +} + +/** Updates the tags of an application type resource of a given managed cluster. */ +export async function update( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeUpdateParameters, + options: ApplicationTypesUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeResource, + options: ApplicationTypesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: applicationTypeResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationTypeResourceDeserializer(result.body); +} + +/** Create or update a Service Fabric managed application type name resource with the specified name. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeResource, + options: ApplicationTypesCreateOrUpdateOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options: ApplicationTypesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationTypeName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationTypeResourceDeserializer(result.body); +} + +/** Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options: ApplicationTypesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + clusterName, + applicationTypeName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts new file mode 100644 index 000000000000..6fc870364fd7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsDeleteOptionalParams, + ApplicationsGetOptionalParams, + ApplicationsListOptionalParams, + ApplicationsReadUpgradeOptionalParams, + ApplicationsResumeUpgradeOptionalParams, + ApplicationsStartRollbackOptionalParams, + ApplicationsUpdateOptionalParams, + ServiceFabricContext as Client, +} from "../index.js"; +import { + errorResponseDeserializer, + ApplicationResource, + applicationResourceSerializer, + applicationResourceDeserializer, + ApplicationUpdateParameters, + applicationUpdateParametersSerializer, + _ApplicationResourceList, + _applicationResourceListDeserializer, + RuntimeResumeApplicationUpgradeParameters, + runtimeResumeApplicationUpgradeParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _startRollbackSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsStartRollbackOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _startRollbackDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. */ +export function startRollback( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsStartRollbackOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _startRollbackDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startRollbackSend(context, resourceGroupName, clusterName, applicationName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _resumeUpgradeSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeResumeApplicationUpgradeParameters, + options: ApplicationsResumeUpgradeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: runtimeResumeApplicationUpgradeParametersSerializer(parameters), + }); +} + +export async function _resumeUpgradeDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. */ +export function resumeUpgrade( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeResumeApplicationUpgradeParameters, + options: ApplicationsResumeUpgradeOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _resumeUpgradeDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _resumeUpgradeSend( + context, + resourceGroupName, + clusterName, + applicationName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _readUpgradeSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsReadUpgradeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _readUpgradeDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. */ +export function readUpgrade( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsReadUpgradeOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _readUpgradeDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _readUpgradeSend(context, resourceGroupName, clusterName, applicationName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _listSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ApplicationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApplicationResourceList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _applicationResourceListDeserializer(result.body); +} + +/** Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. */ +export function list( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ApplicationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, clusterName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Service Fabric managed application resource with the specified name. */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, applicationName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationUpdateParameters, + options: ApplicationsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: applicationUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationResourceDeserializer(result.body); +} + +/** Updates the tags of an application resource of a given managed cluster. */ +export async function update( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationUpdateParameters, + options: ApplicationsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + clusterName, + applicationName, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationResource, + options: ApplicationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: applicationResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Create or update a Service Fabric managed application resource with the specified name. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationResource, + options: ApplicationsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + applicationName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return applicationResourceDeserializer(result.body); +} + +/** Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, clusterName, applicationName, options); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/index.ts new file mode 100644 index 000000000000..5b43f7fe9411 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/index.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + OperationStatusGetOptionalParams, + OperationResultsGetOptionalParams, + NodeTypesListOptionalParams, + NodeTypesListFaultSimulationOptionalParams, + NodeTypesGetFaultSimulationOptionalParams, + NodeTypesStopFaultSimulationOptionalParams, + NodeTypesStartFaultSimulationOptionalParams, + NodeTypesStartOptionalParams, + NodeTypesRestartOptionalParams, + NodeTypesReimageOptionalParams, + NodeTypesRedeployOptionalParams, + NodeTypesDeleteNodeOptionalParams, + NodeTypesDeallocateOptionalParams, + NodeTypesListByManagedClustersOptionalParams, + NodeTypesDeleteOptionalParams, + NodeTypesUpdateOptionalParams, + NodeTypesCreateOrUpdateOptionalParams, + NodeTypesGetOptionalParams, + ManagedClustersManagedAzResiliencyStatusGetOptionalParams, + ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams, + ManagedClustersPostOptionalParams, + ManagedClustersStopFaultSimulationOptionalParams, + ManagedClustersStartFaultSimulationOptionalParams, + ManagedClustersListFaultSimulationOptionalParams, + ManagedClustersGetFaultSimulationOptionalParams, + ManagedClustersListBySubscriptionOptionalParams, + ManagedClustersListByResourceGroupOptionalParams, + ManagedClustersDeleteOptionalParams, + ManagedClustersUpdateOptionalParams, + ManagedClustersCreateOrUpdateOptionalParams, + ManagedClustersGetOptionalParams, + ManagedVMSizesListOptionalParams, + ManagedVMSizesGetOptionalParams, + ManagedClusterVersionListByEnvironmentOptionalParams, + ManagedClusterVersionGetByEnvironmentOptionalParams, + ManagedClusterVersionListOptionalParams, + ManagedClusterVersionGetOptionalParams, + ServicesListByApplicationsOptionalParams, + ServicesDeleteOptionalParams, + ServicesUpdateOptionalParams, + ServicesCreateOrUpdateOptionalParams, + ServicesGetOptionalParams, + ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ApplicationTypeVersionsDeleteOptionalParams, + ApplicationTypeVersionsUpdateOptionalParams, + ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ApplicationTypeVersionsGetOptionalParams, + ApplicationTypesListOptionalParams, + ApplicationTypesDeleteOptionalParams, + ApplicationTypesUpdateOptionalParams, + ApplicationTypesCreateOrUpdateOptionalParams, + ApplicationTypesGetOptionalParams, + ApplicationsStartRollbackOptionalParams, + ApplicationsResumeUpgradeOptionalParams, + ApplicationsReadUpgradeOptionalParams, + ApplicationsListOptionalParams, + ApplicationsDeleteOptionalParams, + ApplicationsUpdateOptionalParams, + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsGetOptionalParams, + OperationsListOptionalParams, +} from "./options.js"; +export { + createServiceFabric, + ServiceFabricContext, + ServiceFabricClientOptionalParams, +} from "./serviceFabricContext.js"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/index.ts new file mode 100644 index 000000000000..f88895266807 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/index.ts @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ServiceFabricContext as Client, + ManagedClusterVersionGetByEnvironmentOptionalParams, + ManagedClusterVersionGetOptionalParams, + ManagedClusterVersionListByEnvironmentOptionalParams, + ManagedClusterVersionListOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + ManagedClusterCodeVersionResult, + managedClusterCodeVersionResultDeserializer, + Environment, + managedClusterCodeVersionResultArrayDeserializer, +} from "../../models/models.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByEnvironmentSend( + context: Client, + location: string, + environment: Environment, + options: ManagedClusterVersionListByEnvironmentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions", + context.subscriptionId, + location, + environment, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listByEnvironmentDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedClusterCodeVersionResultArrayDeserializer(result.body); +} + +/** Gets all available code versions for Service Fabric cluster resources by environment. */ +export async function listByEnvironment( + context: Client, + location: string, + environment: Environment, + options: ManagedClusterVersionListByEnvironmentOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _listByEnvironmentSend(context, location, environment, options); + return _listByEnvironmentDeserialize(result); +} + +export function _getByEnvironmentSend( + context: Client, + location: string, + environment: Environment, + clusterVersion: string, + options: ManagedClusterVersionGetByEnvironmentOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}", + context.subscriptionId, + location, + environment, + clusterVersion, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getByEnvironmentDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedClusterCodeVersionResultDeserializer(result.body); +} + +/** Gets information about an available Service Fabric cluster code version by environment. */ +export async function getByEnvironment( + context: Client, + location: string, + environment: Environment, + clusterVersion: string, + options: ManagedClusterVersionGetByEnvironmentOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getByEnvironmentSend( + context, + location, + environment, + clusterVersion, + options, + ); + return _getByEnvironmentDeserialize(result); +} + +export function _listSend( + context: Client, + location: string, + options: ManagedClusterVersionListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions", + context.subscriptionId, + location, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedClusterCodeVersionResultArrayDeserializer(result.body); +} + +/** Gets all available code versions for Service Fabric cluster resources by location. */ +export async function list( + context: Client, + location: string, + options: ManagedClusterVersionListOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSend(context, location, options); + return _listDeserialize(result); +} + +export function _getSend( + context: Client, + location: string, + clusterVersion: string, + options: ManagedClusterVersionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}", + context.subscriptionId, + location, + clusterVersion, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedClusterCodeVersionResultDeserializer(result.body); +} + +/** Gets information about an available Service Fabric managed cluster code version. */ +export async function get( + context: Client, + location: string, + clusterVersion: string, + options: ManagedClusterVersionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, clusterVersion, options); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/index.ts new file mode 100644 index 000000000000..7f106bc2536d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/index.ts @@ -0,0 +1,752 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ServiceFabricContext as Client, + ManagedClustersCreateOrUpdateOptionalParams, + ManagedClustersDeleteOptionalParams, + ManagedClustersGetFaultSimulationOptionalParams, + ManagedClustersGetOptionalParams, + ManagedClustersListByResourceGroupOptionalParams, + ManagedClustersListBySubscriptionOptionalParams, + ManagedClustersListFaultSimulationOptionalParams, + ManagedClustersManagedAzResiliencyStatusGetOptionalParams, + ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams, + ManagedClustersPostOptionalParams, + ManagedClustersStartFaultSimulationOptionalParams, + ManagedClustersStopFaultSimulationOptionalParams, + ManagedClustersUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + faultSimulationParametersUnionSerializer, + FaultSimulationParametersUnion, + FaultSimulationIdParameters, + faultSimulationIdParametersSerializer, + FaultSimulation, + faultSimulationDeserializer, + _FaultSimulationListResult, + _faultSimulationListResultDeserializer, + ManagedCluster, + managedClusterSerializer, + managedClusterDeserializer, + ManagedClusterUpdateParameters, + managedClusterUpdateParametersSerializer, + _ManagedClusterListResult, + _managedClusterListResultDeserializer, + ManagedMaintenanceWindowStatus, + managedMaintenanceWindowStatusDeserializer, + ManagedAzResiliencyStatus, + managedAzResiliencyStatusDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _managedAzResiliencyStatusGetSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersManagedAzResiliencyStatusGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _managedAzResiliencyStatusGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedAzResiliencyStatusDeserializer(result.body); +} + +/** Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. */ +export async function managedAzResiliencyStatusGet( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersManagedAzResiliencyStatusGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _managedAzResiliencyStatusGetSend( + context, + resourceGroupName, + clusterName, + options, + ); + return _managedAzResiliencyStatusGetDeserialize(result); +} + +export function _managedMaintenanceWindowStatusGetSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _managedMaintenanceWindowStatusGetDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedMaintenanceWindowStatusDeserializer(result.body); +} + +/** Action to get Maintenance Window Status of the Service Fabric Managed Clusters. */ +export async function managedMaintenanceWindowStatusGet( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _managedMaintenanceWindowStatusGetSend( + context, + resourceGroupName, + clusterName, + options, + ); + return _managedMaintenanceWindowStatusGetDeserialize(result); +} + +export function _postSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersPostOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applyMaintenanceWindow", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _postDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. */ +export async function post( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersPostOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _postSend(context, resourceGroupName, clusterName, options); + return _postDeserialize(result); +} + +export function _stopFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options: ManagedClustersStopFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: faultSimulationIdParametersSerializer(parameters), + }); +} + +export async function _stopFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Stops a fault simulation on the cluster. */ +export function stopFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options: ManagedClustersStopFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _stopFaultSimulationDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopFaultSimulationSend(context, resourceGroupName, clusterName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _startFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationParametersUnion, + options: ManagedClustersStartFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: faultSimulationParametersUnionSerializer(parameters), + }); +} + +export async function _startFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Starts a fault simulation on the cluster. */ +export function startFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationParametersUnion, + options: ManagedClustersStartFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): PollerLike, void> { + return getLongRunningPoller(context, _startFaultSimulationDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startFaultSimulationSend(context, resourceGroupName, clusterName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _listFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersListFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise<_FaultSimulationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _faultSimulationListResultDeserializer(result.body); +} + +/** Gets the list of recent fault simulations for the cluster. */ +export function listFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersListFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listFaultSimulationSend(context, resourceGroupName, clusterName, options), + _listFaultSimulationDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options: ManagedClustersGetFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: faultSimulationIdParametersSerializer(parameters), + }); +} + +export async function _getFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return faultSimulationDeserializer(result.body); +} + +/** Gets a fault simulation by the simulationId. */ +export async function getFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options: ManagedClustersGetFaultSimulationOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _getFaultSimulationSend( + context, + resourceGroupName, + clusterName, + parameters, + options, + ); + return _getFaultSimulationDeserialize(result); +} + +export function _listBySubscriptionSend( + context: Client, + options: ManagedClustersListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters", + context.subscriptionId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_ManagedClusterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _managedClusterListResultDeserializer(result.body); +} + +/** Gets all Service Fabric cluster resources created or in the process of being created in the subscription. */ +export function listBySubscription( + context: Client, + options: ManagedClustersListBySubscriptionOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ManagedClustersListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters", + context.subscriptionId, + resourceGroupName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ManagedClusterListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _managedClusterListResultDeserializer(result.body); +} + +/** Gets all Service Fabric cluster resources created or in the process of being created in the resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ManagedClustersListByResourceGroupOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Service Fabric managed cluster resource with the specified name. */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, clusterName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: ManagedClusterUpdateParameters, + options: ManagedClustersUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: managedClusterUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedClusterDeserializer(result.body); +} + +/** Update the tags of of a Service Fabric managed cluster resource with the specified name. */ +export async function update( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: ManagedClusterUpdateParameters, + options: ManagedClustersUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend(context, resourceGroupName, clusterName, parameters, options); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: ManagedCluster, + options: ManagedClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: managedClusterSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Create or update a Service Fabric managed cluster resource with the specified name. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + parameters: ManagedCluster, + options: ManagedClustersCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, clusterName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedClusterDeserializer(result.body); +} + +/** Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + options: ManagedClustersGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, clusterName, options); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedVMSizes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedVMSizes/index.ts new file mode 100644 index 000000000000..af6afe9da3df --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedVMSizes/index.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ServiceFabricContext as Client, + ManagedVMSizesGetOptionalParams, + ManagedVMSizesListOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + ManagedVMSize, + managedVMSizeDeserializer, + _ManagedVMSizesResult, + _managedVMSizesResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + location: string, + options: ManagedVMSizesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes", + context.subscriptionId, + location, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ManagedVMSizesResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _managedVMSizesResultDeserializer(result.body); +} + +/** Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. */ +export function list( + context: Client, + location: string, + options: ManagedVMSizesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, location, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getSend( + context: Client, + location: string, + vmSize: string, + options: ManagedVMSizesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}", + context.subscriptionId, + location, + vmSize, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return managedVMSizeDeserializer(result.body); +} + +/** Get unsupported vm size for Service Fabric Managed Clusters. */ +export async function get( + context: Client, + location: string, + vmSize: string, + options: ManagedVMSizesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, vmSize, options); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/index.ts new file mode 100644 index 000000000000..6900d735bf54 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/index.ts @@ -0,0 +1,985 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ServiceFabricContext as Client, + NodeTypesCreateOrUpdateOptionalParams, + NodeTypesDeallocateOptionalParams, + NodeTypesDeleteNodeOptionalParams, + NodeTypesDeleteOptionalParams, + NodeTypesGetFaultSimulationOptionalParams, + NodeTypesGetOptionalParams, + NodeTypesListByManagedClustersOptionalParams, + NodeTypesListFaultSimulationOptionalParams, + NodeTypesListOptionalParams, + NodeTypesRedeployOptionalParams, + NodeTypesReimageOptionalParams, + NodeTypesRestartOptionalParams, + NodeTypesStartFaultSimulationOptionalParams, + NodeTypesStartOptionalParams, + NodeTypesStopFaultSimulationOptionalParams, + NodeTypesUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + NodeType, + nodeTypeSerializer, + nodeTypeDeserializer, + NodeTypeUpdateParameters, + nodeTypeUpdateParametersSerializer, + _NodeTypeListResult, + _nodeTypeListResultDeserializer, + NodeTypeActionParameters, + nodeTypeActionParametersSerializer, + faultSimulationParametersUnionSerializer, + FaultSimulationParametersUnion, + FaultSimulationIdParameters, + faultSimulationIdParametersSerializer, + FaultSimulation, + faultSimulationDeserializer, + _FaultSimulationListResult, + _faultSimulationListResultDeserializer, + _NodeTypeListSkuResult, + _nodeTypeListSkuResultDeserializer, + NodeTypeAvailableSku, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_NodeTypeListSkuResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _nodeTypeListSkuResultDeserializer(result.body); +} + +/** Get a Service Fabric node type supported SKUs. */ +export function list( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, clusterName, nodeTypeName, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _listFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesListFaultSimulationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise<_FaultSimulationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _faultSimulationListResultDeserializer(result.body); +} + +/** Gets the list of recent fault simulations for the node type. */ +export function listFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesListFaultSimulationOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listFaultSimulationSend(context, resourceGroupName, clusterName, nodeTypeName, options), + _listFaultSimulationDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _getFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options: NodeTypesGetFaultSimulationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: faultSimulationIdParametersSerializer(parameters), + }); +} + +export async function _getFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return faultSimulationDeserializer(result.body); +} + +/** Gets a fault simulation by the simulationId. */ +export async function getFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options: NodeTypesGetFaultSimulationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getFaultSimulationSend( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ); + return _getFaultSimulationDeserialize(result); +} + +export function _stopFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options: NodeTypesStopFaultSimulationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: faultSimulationIdParametersSerializer(parameters), + }); +} + +export async function _stopFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Stops a fault simulation on the node type. */ +export function stopFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options: NodeTypesStopFaultSimulationOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _stopFaultSimulationDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _stopFaultSimulationSend( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _startFaultSimulationSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationParametersUnion, + options: NodeTypesStartFaultSimulationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: faultSimulationParametersUnionSerializer(parameters), + }); +} + +export async function _startFaultSimulationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Starts a fault simulation on the node type. */ +export function startFaultSimulation( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationParametersUnion, + options: NodeTypesStartFaultSimulationOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _startFaultSimulationDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startFaultSimulationSend( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _startSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesStartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeActionParametersSerializer(parameters), + }); +} + +export async function _startDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. */ +export function start( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesStartOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _startDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _startSend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _restartSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesRestartOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeActionParametersSerializer(parameters), + }); +} + +export async function _restartDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. */ +export function restart( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesRestartOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _restartDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _restartSend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _reimageSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesReimageOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeActionParametersSerializer(parameters), + }); +} + +export async function _reimageDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. */ +export function reimage( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesReimageOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _reimageDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _reimageSend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _redeploySend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesRedeployOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeActionParametersSerializer(parameters), + }); +} + +export async function _redeployDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. */ +export function redeploy( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesRedeployOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _redeployDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _redeploySend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _deleteNodeSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesDeleteNodeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeActionParametersSerializer(parameters), + }); +} + +export async function _deleteNodeDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. */ +export function deleteNode( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesDeleteNodeOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _deleteNodeDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deleteNodeSend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _deallocateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesDeallocateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeActionParametersSerializer(parameters), + }); +} + +export async function _deallocateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. */ +export function deallocate( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options: NodeTypesDeallocateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _deallocateDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deallocateSend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _listByManagedClustersSend( + context: Client, + resourceGroupName: string, + clusterName: string, + options: NodeTypesListByManagedClustersOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes", + context.subscriptionId, + resourceGroupName, + clusterName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listByManagedClustersDeserialize( + result: PathUncheckedResponse, +): Promise<_NodeTypeListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _nodeTypeListResultDeserializer(result.body); +} + +/** Gets all Node types of the specified managed cluster. */ +export function listByManagedClusters( + context: Client, + resourceGroupName: string, + clusterName: string, + options: NodeTypesListByManagedClustersOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByManagedClustersSend(context, resourceGroupName, clusterName, options), + _listByManagedClustersDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Service Fabric node type of a given managed cluster. */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, nodeTypeName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeUpdateParameters, + options: NodeTypesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return nodeTypeDeserializer(result.body); +} + +/** Update the configuration of a node type of a given managed cluster, only updating tags. */ +export function update( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeUpdateParameters, + options: NodeTypesUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NodeType> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + resourceLocationConfig: "location", + }) as PollerLike, NodeType>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeType, + options: NodeTypesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: nodeTypeSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Create or update a Service Fabric node type of a given managed cluster. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeType, + options: NodeTypesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + context.subscriptionId, + resourceGroupName, + clusterName, + nodeTypeName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return nodeTypeDeserializer(result.body); +} + +/** Get a Service Fabric node type of a given managed cluster. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options: NodeTypesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, clusterName, nodeTypeName, options); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/index.ts new file mode 100644 index 000000000000..cdeff9f6be01 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/index.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext as Client, OperationResultsGetOptionalParams } from "../index.js"; +import { errorResponseDeserializer } from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getSend( + context: Client, + location: string, + operationId: string, + options: OperationResultsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}", + context.subscriptionId, + location, + operationId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Get long running operation result. */ +export function get( + context: Client, + location: string, + operationId: string, + options: OperationResultsGetOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _getDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _getSend(context, location, operationId, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/index.ts new file mode 100644 index 000000000000..33ad3556b53b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/index.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext as Client, OperationStatusGetOptionalParams } from "../index.js"; +import { + LongRunningOperationResult, + longRunningOperationResultDeserializer, + errorResponseDeserializer, +} from "../../models/models.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + location: string, + operationId: string, + options: OperationStatusGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}", + context.subscriptionId, + location, + operationId, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return longRunningOperationResultDeserializer(result.body); +} + +/** Get long running operation status. */ +export async function get( + context: Client, + location: string, + operationId: string, + options: OperationStatusGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, operationId, options); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/index.ts new file mode 100644 index 000000000000..3ff79cb8f16e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/index.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext as Client, OperationsListOptionalParams } from "../index.js"; +import { + errorResponseDeserializer, + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context.path("/providers/Microsoft.ServiceFabric/operations").get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** List the operations for the provider */ +export function list( + context: Client, + options: OperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/options.ts new file mode 100644 index 000000000000..75b4899b067b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/options.ts @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationStatusGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OperationResultsGetOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NodeTypesListFaultSimulationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NodeTypesGetFaultSimulationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NodeTypesStopFaultSimulationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesStartFaultSimulationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesStartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesRestartOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesReimageOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesRedeployOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesDeleteNodeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesDeallocateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesListByManagedClustersOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NodeTypesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NodeTypesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersManagedAzResiliencyStatusGetOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersPostOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersStopFaultSimulationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ManagedClustersStartFaultSimulationOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ManagedClustersListFaultSimulationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersGetFaultSimulationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersListByResourceGroupOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ManagedClustersUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClustersCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ManagedClustersGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedVMSizesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedVMSizesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClusterVersionListByEnvironmentOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClusterVersionGetByEnvironmentOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClusterVersionListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ManagedClusterVersionGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServicesListByApplicationsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServicesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServicesUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ServicesCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ServicesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypeVersionsListByApplicationTypesOptionalParams + extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypeVersionsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationTypeVersionsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypeVersionsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationTypeVersionsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypesListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypesDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationTypesUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypesCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationTypesGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationsStartRollbackOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationsResumeUpgradeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationsReadUpgradeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationsListOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationsDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationsCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApplicationsGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricContext.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricContext.ts new file mode 100644 index 000000000000..66417d05df66 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricContext.ts @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** Service Fabric Managed Clusters Management Client */ +export interface ServiceFabricContext extends Client { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion: string; + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; +} + +/** Optional parameters for the client. */ +export interface ServiceFabricClientOptionalParams extends ClientOptions { + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Service Fabric Managed Clusters Management Client */ +export function createServiceFabric( + credential: TokenCredential, + subscriptionId: string, + options: ServiceFabricClientOptionalParams = {}, +): ServiceFabricContext { + const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com"; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-servicefabricmanagedclusters/1.0.0-beta.1`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + const apiVersion = options.apiVersion ?? "2024-11-01-preview"; + clientContext.pipeline.addPolicy({ + name: "ClientApiVersionPolicy", + sendRequest: (req, next) => { + // Use the apiVersion defined in request url directly + // Append one if there is no apiVersion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version")) { + req.url = `${req.url}${ + Array.from(url.searchParams.keys()).length > 0 ? "&" : "?" + }api-version=${apiVersion}`; + } + + return next(req); + }, + }); + return { + ...clientContext, + apiVersion, + subscriptionId, + } as ServiceFabricContext; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/index.ts new file mode 100644 index 000000000000..e79fea02121f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/index.ts @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ServiceFabricContext as Client, + ServicesCreateOrUpdateOptionalParams, + ServicesDeleteOptionalParams, + ServicesGetOptionalParams, + ServicesListByApplicationsOptionalParams, + ServicesUpdateOptionalParams, +} from "../index.js"; +import { + errorResponseDeserializer, + ServiceResource, + serviceResourceSerializer, + serviceResourceDeserializer, + ServiceUpdateParameters, + serviceUpdateParametersSerializer, + _ServiceResourceList, + _serviceResourceListDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByApplicationsSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ServicesListByApplicationsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _listByApplicationsDeserialize( + result: PathUncheckedResponse, +): Promise<_ServiceResourceList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return _serviceResourceListDeserializer(result.body); +} + +/** Gets all service resources created or in the process of being created in the Service Fabric managed application resource. */ +export function listByApplications( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ServicesListByApplicationsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByApplicationsSend(context, resourceGroupName, clusterName, applicationName, options), + _listByApplicationsDeserialize, + ["200"], + { itemName: "value", nextLinkName: "nextLink" }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options: ServicesDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + serviceName, + ) + .delete({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Delete a Service Fabric managed service resource with the specified name. */ +/** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ +export function $delete( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options: ServicesDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, clusterName, applicationName, serviceName, options), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceUpdateParameters, + options: ServicesUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + serviceName, + ) + .patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: serviceUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return serviceResourceDeserializer(result.body); +} + +/** Updates the tags of a service resource of a given managed cluster. */ +export async function update( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceUpdateParameters, + options: ServicesUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + clusterName, + applicationName, + serviceName, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceResource, + options: ServicesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + serviceName, + ) + .put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + body: serviceResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Create or update a Service Fabric managed service resource with the specified name. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceResource, + options: ServicesCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + clusterName, + applicationName, + serviceName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options: ServicesGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + return context + .path( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + context.subscriptionId, + resourceGroupName, + clusterName, + applicationName, + serviceName, + ) + .get({ + ...operationOptionsToRequestParameters(options), + headers: { + accept: "application/json", + ...options.requestOptions?.headers, + }, + queryParameters: { "api-version": context.apiVersion }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return serviceResourceDeserializer(result.body); +} + +/** Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. */ +export async function get( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options: ServicesGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + clusterName, + applicationName, + serviceName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts new file mode 100644 index 000000000000..a590f75dfd76 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { + listByApplicationTypes, + $delete, + update, + createOrUpdate, + get, +} from "../../api/applicationTypeVersions/index.js"; +import { + ApplicationTypeVersionResource, + ApplicationTypeVersionUpdateParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ApplicationTypeVersionsDeleteOptionalParams, + ApplicationTypeVersionsUpdateOptionalParams, + ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ApplicationTypeVersionsGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a ApplicationTypeVersions operations. */ +export interface ApplicationTypeVersionsOperations { + /** Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. */ + listByApplicationTypes: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a Service Fabric managed application type version resource with the specified name. */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options?: ApplicationTypeVersionsDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the tags of an application type version resource of a given managed cluster. */ + update: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionUpdateParameters, + options?: ApplicationTypeVersionsUpdateOptionalParams, + ) => Promise; + /** Create or update a Service Fabric managed application type version resource with the specified name. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionResource, + options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ) => PollerLike, void>; + /** Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. */ + get: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options?: ApplicationTypeVersionsGetOptionalParams, + ) => Promise; +} + +function _getApplicationTypeVersions(context: ServiceFabricContext) { + return { + listByApplicationTypes: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ) => + listByApplicationTypes(context, resourceGroupName, clusterName, applicationTypeName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options?: ApplicationTypeVersionsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, applicationTypeName, version, options), + update: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionUpdateParameters, + options?: ApplicationTypeVersionsUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + clusterName, + applicationTypeName, + version, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + parameters: ApplicationTypeVersionResource, + options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterName, + applicationTypeName, + version, + parameters, + options, + ), + get: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + version: string, + options?: ApplicationTypeVersionsGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, applicationTypeName, version, options), + }; +} + +export function _getApplicationTypeVersionsOperations( + context: ServiceFabricContext, +): ApplicationTypeVersionsOperations { + return { + ..._getApplicationTypeVersions(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts new file mode 100644 index 000000000000..3df03e046db2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { list, $delete, update, createOrUpdate, get } from "../../api/applicationTypes/index.js"; +import { ApplicationTypeResource, ApplicationTypeUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + ApplicationTypesListOptionalParams, + ApplicationTypesDeleteOptionalParams, + ApplicationTypesUpdateOptionalParams, + ApplicationTypesCreateOrUpdateOptionalParams, + ApplicationTypesGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a ApplicationTypes operations. */ +export interface ApplicationTypesOperations { + /** Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. */ + list: ( + resourceGroupName: string, + clusterName: string, + options?: ApplicationTypesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a Service Fabric managed application type name resource with the specified name. */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options?: ApplicationTypesDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the tags of an application type resource of a given managed cluster. */ + update: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeUpdateParameters, + options?: ApplicationTypesUpdateOptionalParams, + ) => Promise; + /** Create or update a Service Fabric managed application type name resource with the specified name. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeResource, + options?: ApplicationTypesCreateOrUpdateOptionalParams, + ) => Promise; + /** Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. */ + get: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options?: ApplicationTypesGetOptionalParams, + ) => Promise; +} + +function _getApplicationTypes(context: ServiceFabricContext) { + return { + list: ( + resourceGroupName: string, + clusterName: string, + options?: ApplicationTypesListOptionalParams, + ) => list(context, resourceGroupName, clusterName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options?: ApplicationTypesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, applicationTypeName, options), + update: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeUpdateParameters, + options?: ApplicationTypesUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, applicationTypeName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + parameters: ApplicationTypeResource, + options?: ApplicationTypesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterName, + applicationTypeName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + clusterName: string, + applicationTypeName: string, + options?: ApplicationTypesGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, applicationTypeName, options), + }; +} + +export function _getApplicationTypesOperations( + context: ServiceFabricContext, +): ApplicationTypesOperations { + return { + ..._getApplicationTypes(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts new file mode 100644 index 000000000000..5f5975882b2d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { + startRollback, + resumeUpgrade, + readUpgrade, + list, + $delete, + update, + createOrUpdate, + get, +} from "../../api/applications/index.js"; +import { + ApplicationResource, + ApplicationUpdateParameters, + RuntimeResumeApplicationUpgradeParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + ApplicationsStartRollbackOptionalParams, + ApplicationsResumeUpgradeOptionalParams, + ApplicationsReadUpgradeOptionalParams, + ApplicationsListOptionalParams, + ApplicationsDeleteOptionalParams, + ApplicationsUpdateOptionalParams, + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a Applications operations. */ +export interface ApplicationsOperations { + /** Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. */ + startRollback: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsStartRollbackOptionalParams, + ) => PollerLike, void>; + /** Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. */ + resumeUpgrade: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeResumeApplicationUpgradeParameters, + options?: ApplicationsResumeUpgradeOptionalParams, + ) => PollerLike, void>; + /** Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. */ + readUpgrade: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsReadUpgradeOptionalParams, + ) => PollerLike, void>; + /** Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. */ + list: ( + resourceGroupName: string, + clusterName: string, + options?: ApplicationsListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a Service Fabric managed application resource with the specified name. */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the tags of an application resource of a given managed cluster. */ + update: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationUpdateParameters, + options?: ApplicationsUpdateOptionalParams, + ) => Promise; + /** Create or update a Service Fabric managed application resource with the specified name. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationResource, + options?: ApplicationsCreateOrUpdateOptionalParams, + ) => PollerLike, void>; + /** Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. */ + get: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsGetOptionalParams, + ) => Promise; +} + +function _getApplications(context: ServiceFabricContext) { + return { + startRollback: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsStartRollbackOptionalParams, + ) => startRollback(context, resourceGroupName, clusterName, applicationName, options), + resumeUpgrade: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeResumeApplicationUpgradeParameters, + options?: ApplicationsResumeUpgradeOptionalParams, + ) => + resumeUpgrade(context, resourceGroupName, clusterName, applicationName, parameters, options), + readUpgrade: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsReadUpgradeOptionalParams, + ) => readUpgrade(context, resourceGroupName, clusterName, applicationName, options), + list: ( + resourceGroupName: string, + clusterName: string, + options?: ApplicationsListOptionalParams, + ) => list(context, resourceGroupName, clusterName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, applicationName, options), + update: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationUpdateParameters, + options?: ApplicationsUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, applicationName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: ApplicationResource, + options?: ApplicationsCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, clusterName, applicationName, parameters, options), + get: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ApplicationsGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, applicationName, options), + }; +} + +export function _getApplicationsOperations(context: ServiceFabricContext): ApplicationsOperations { + return { + ..._getApplications(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/index.ts new file mode 100644 index 000000000000..6898a3cc0925 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/index.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { ApplicationsOperations } from "./applications/index.js"; +export { ApplicationTypesOperations } from "./applicationTypes/index.js"; +export { ApplicationTypeVersionsOperations } from "./applicationTypeVersions/index.js"; +export { ManagedClustersOperations } from "./managedClusters/index.js"; +export { ManagedClusterVersionOperations } from "./managedClusterVersion/index.js"; +export { ManagedVMSizesOperations } from "./managedVMSizes/index.js"; +export { NodeTypesOperations } from "./nodeTypes/index.js"; +export { OperationResultsOperations } from "./operationResults/index.js"; +export { OperationsOperations } from "./operations/index.js"; +export { OperationStatusOperations } from "./operationStatus/index.js"; +export { ServicesOperations } from "./services/index.js"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts new file mode 100644 index 000000000000..d8c91645b6d4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { + listByEnvironment, + getByEnvironment, + list, + get, +} from "../../api/managedClusterVersion/index.js"; +import { ManagedClusterCodeVersionResult, Environment } from "../../models/models.js"; +import { + ManagedClusterVersionListByEnvironmentOptionalParams, + ManagedClusterVersionGetByEnvironmentOptionalParams, + ManagedClusterVersionListOptionalParams, + ManagedClusterVersionGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a ManagedClusterVersion operations. */ +export interface ManagedClusterVersionOperations { + /** Gets all available code versions for Service Fabric cluster resources by environment. */ + listByEnvironment: ( + location: string, + environment: Environment, + options?: ManagedClusterVersionListByEnvironmentOptionalParams, + ) => Promise; + /** Gets information about an available Service Fabric cluster code version by environment. */ + getByEnvironment: ( + location: string, + environment: Environment, + clusterVersion: string, + options?: ManagedClusterVersionGetByEnvironmentOptionalParams, + ) => Promise; + /** Gets all available code versions for Service Fabric cluster resources by location. */ + list: ( + location: string, + options?: ManagedClusterVersionListOptionalParams, + ) => Promise; + /** Gets information about an available Service Fabric managed cluster code version. */ + get: ( + location: string, + clusterVersion: string, + options?: ManagedClusterVersionGetOptionalParams, + ) => Promise; +} + +function _getManagedClusterVersion(context: ServiceFabricContext) { + return { + listByEnvironment: ( + location: string, + environment: Environment, + options?: ManagedClusterVersionListByEnvironmentOptionalParams, + ) => listByEnvironment(context, location, environment, options), + getByEnvironment: ( + location: string, + environment: Environment, + clusterVersion: string, + options?: ManagedClusterVersionGetByEnvironmentOptionalParams, + ) => getByEnvironment(context, location, environment, clusterVersion, options), + list: (location: string, options?: ManagedClusterVersionListOptionalParams) => + list(context, location, options), + get: ( + location: string, + clusterVersion: string, + options?: ManagedClusterVersionGetOptionalParams, + ) => get(context, location, clusterVersion, options), + }; +} + +export function _getManagedClusterVersionOperations( + context: ServiceFabricContext, +): ManagedClusterVersionOperations { + return { + ..._getManagedClusterVersion(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts new file mode 100644 index 000000000000..acb4fab6e047 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { + managedAzResiliencyStatusGet, + managedMaintenanceWindowStatusGet, + post, + stopFaultSimulation, + startFaultSimulation, + listFaultSimulation, + getFaultSimulation, + listBySubscription, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/managedClusters/index.js"; +import { + FaultSimulationParametersUnion, + FaultSimulationIdParameters, + FaultSimulation, + ManagedCluster, + ManagedClusterUpdateParameters, + ManagedMaintenanceWindowStatus, + ManagedAzResiliencyStatus, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + ManagedClustersManagedAzResiliencyStatusGetOptionalParams, + ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams, + ManagedClustersPostOptionalParams, + ManagedClustersStopFaultSimulationOptionalParams, + ManagedClustersStartFaultSimulationOptionalParams, + ManagedClustersListFaultSimulationOptionalParams, + ManagedClustersGetFaultSimulationOptionalParams, + ManagedClustersListBySubscriptionOptionalParams, + ManagedClustersListByResourceGroupOptionalParams, + ManagedClustersDeleteOptionalParams, + ManagedClustersUpdateOptionalParams, + ManagedClustersCreateOrUpdateOptionalParams, + ManagedClustersGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a ManagedClusters operations. */ +export interface ManagedClustersOperations { + /** Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. */ + managedAzResiliencyStatusGet: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersManagedAzResiliencyStatusGetOptionalParams, + ) => Promise; + /** Action to get Maintenance Window Status of the Service Fabric Managed Clusters. */ + managedMaintenanceWindowStatusGet: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams, + ) => Promise; + /** Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. */ + post: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersPostOptionalParams, + ) => Promise; + /** Stops a fault simulation on the cluster. */ + stopFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options?: ManagedClustersStopFaultSimulationOptionalParams, + ) => PollerLike, void>; + /** Starts a fault simulation on the cluster. */ + startFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationParametersUnion, + options?: ManagedClustersStartFaultSimulationOptionalParams, + ) => PollerLike, void>; + /** Gets the list of recent fault simulations for the cluster. */ + listFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersListFaultSimulationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets a fault simulation by the simulationId. */ + getFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options?: ManagedClustersGetFaultSimulationOptionalParams, + ) => Promise; + /** Gets all Service Fabric cluster resources created or in the process of being created in the subscription. */ + listBySubscription: ( + options?: ManagedClustersListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets all Service Fabric cluster resources created or in the process of being created in the resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ManagedClustersListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a Service Fabric managed cluster resource with the specified name. */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersDeleteOptionalParams, + ) => PollerLike, void>; + /** Update the tags of of a Service Fabric managed cluster resource with the specified name. */ + update: ( + resourceGroupName: string, + clusterName: string, + parameters: ManagedClusterUpdateParameters, + options?: ManagedClustersUpdateOptionalParams, + ) => Promise; + /** Create or update a Service Fabric managed cluster resource with the specified name. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + parameters: ManagedCluster, + options?: ManagedClustersCreateOrUpdateOptionalParams, + ) => PollerLike, void>; + /** Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. */ + get: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersGetOptionalParams, + ) => Promise; +} + +function _getManagedClusters(context: ServiceFabricContext) { + return { + managedAzResiliencyStatusGet: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersManagedAzResiliencyStatusGetOptionalParams, + ) => managedAzResiliencyStatusGet(context, resourceGroupName, clusterName, options), + managedMaintenanceWindowStatusGet: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams, + ) => managedMaintenanceWindowStatusGet(context, resourceGroupName, clusterName, options), + post: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersPostOptionalParams, + ) => post(context, resourceGroupName, clusterName, options), + stopFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options?: ManagedClustersStopFaultSimulationOptionalParams, + ) => stopFaultSimulation(context, resourceGroupName, clusterName, parameters, options), + startFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationParametersUnion, + options?: ManagedClustersStartFaultSimulationOptionalParams, + ) => startFaultSimulation(context, resourceGroupName, clusterName, parameters, options), + listFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersListFaultSimulationOptionalParams, + ) => listFaultSimulation(context, resourceGroupName, clusterName, options), + getFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + parameters: FaultSimulationIdParameters, + options?: ManagedClustersGetFaultSimulationOptionalParams, + ) => getFaultSimulation(context, resourceGroupName, clusterName, parameters, options), + listBySubscription: (options?: ManagedClustersListBySubscriptionOptionalParams) => + listBySubscription(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ManagedClustersListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, options), + update: ( + resourceGroupName: string, + clusterName: string, + parameters: ManagedClusterUpdateParameters, + options?: ManagedClustersUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + parameters: ManagedCluster, + options?: ManagedClustersCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, clusterName, parameters, options), + get: ( + resourceGroupName: string, + clusterName: string, + options?: ManagedClustersGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, options), + }; +} + +export function _getManagedClustersOperations( + context: ServiceFabricContext, +): ManagedClustersOperations { + return { + ..._getManagedClusters(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedVMSizes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedVMSizes/index.ts new file mode 100644 index 000000000000..a27f75830a7e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedVMSizes/index.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { list, get } from "../../api/managedVMSizes/index.js"; +import { ManagedVMSize } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { + ManagedVMSizesListOptionalParams, + ManagedVMSizesGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a ManagedVMSizes operations. */ +export interface ManagedVMSizesOperations { + /** Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. */ + list: ( + location: string, + options?: ManagedVMSizesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get unsupported vm size for Service Fabric Managed Clusters. */ + get: ( + location: string, + vmSize: string, + options?: ManagedVMSizesGetOptionalParams, + ) => Promise; +} + +function _getManagedVMSizes(context: ServiceFabricContext) { + return { + list: (location: string, options?: ManagedVMSizesListOptionalParams) => + list(context, location, options), + get: (location: string, vmSize: string, options?: ManagedVMSizesGetOptionalParams) => + get(context, location, vmSize, options), + }; +} + +export function _getManagedVMSizesOperations( + context: ServiceFabricContext, +): ManagedVMSizesOperations { + return { + ..._getManagedVMSizes(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts new file mode 100644 index 000000000000..186cd585f5e6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { + list, + listFaultSimulation, + getFaultSimulation, + stopFaultSimulation, + startFaultSimulation, + start, + restart, + reimage, + redeploy, + deleteNode, + deallocate, + listByManagedClusters, + $delete, + update, + createOrUpdate, + get, +} from "../../api/nodeTypes/index.js"; +import { + NodeType, + NodeTypeUpdateParameters, + NodeTypeActionParameters, + FaultSimulationParametersUnion, + FaultSimulationIdParameters, + FaultSimulation, + NodeTypeAvailableSku, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { + NodeTypesListOptionalParams, + NodeTypesListFaultSimulationOptionalParams, + NodeTypesGetFaultSimulationOptionalParams, + NodeTypesStopFaultSimulationOptionalParams, + NodeTypesStartFaultSimulationOptionalParams, + NodeTypesStartOptionalParams, + NodeTypesRestartOptionalParams, + NodeTypesReimageOptionalParams, + NodeTypesRedeployOptionalParams, + NodeTypesDeleteNodeOptionalParams, + NodeTypesDeallocateOptionalParams, + NodeTypesListByManagedClustersOptionalParams, + NodeTypesDeleteOptionalParams, + NodeTypesUpdateOptionalParams, + NodeTypesCreateOrUpdateOptionalParams, + NodeTypesGetOptionalParams, +} from "../../api/options.js"; + +/** Interface representing a NodeTypes operations. */ +export interface NodeTypesOperations { + /** Get a Service Fabric node type supported SKUs. */ + list: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the list of recent fault simulations for the node type. */ + listFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesListFaultSimulationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets a fault simulation by the simulationId. */ + getFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options?: NodeTypesGetFaultSimulationOptionalParams, + ) => Promise; + /** Stops a fault simulation on the node type. */ + stopFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options?: NodeTypesStopFaultSimulationOptionalParams, + ) => PollerLike, void>; + /** Starts a fault simulation on the node type. */ + startFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationParametersUnion, + options?: NodeTypesStartFaultSimulationOptionalParams, + ) => PollerLike, void>; + /** Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. */ + start: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesStartOptionalParams, + ) => PollerLike, void>; + /** Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. */ + restart: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesRestartOptionalParams, + ) => PollerLike, void>; + /** Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. */ + reimage: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesReimageOptionalParams, + ) => PollerLike, void>; + /** Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. */ + redeploy: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesRedeployOptionalParams, + ) => PollerLike, void>; + /** Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. */ + deleteNode: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesDeleteNodeOptionalParams, + ) => PollerLike, void>; + /** Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. */ + deallocate: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesDeallocateOptionalParams, + ) => PollerLike, void>; + /** Gets all Node types of the specified managed cluster. */ + listByManagedClusters: ( + resourceGroupName: string, + clusterName: string, + options?: NodeTypesListByManagedClustersOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a Service Fabric node type of a given managed cluster. */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesDeleteOptionalParams, + ) => PollerLike, void>; + /** Update the configuration of a node type of a given managed cluster, only updating tags. */ + update: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeUpdateParameters, + options?: NodeTypesUpdateOptionalParams, + ) => PollerLike, NodeType>; + /** Create or update a Service Fabric node type of a given managed cluster. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeType, + options?: NodeTypesCreateOrUpdateOptionalParams, + ) => PollerLike, void>; + /** Get a Service Fabric node type of a given managed cluster. */ + get: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesGetOptionalParams, + ) => Promise; +} + +function _getNodeTypes(context: ServiceFabricContext) { + return { + list: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesListOptionalParams, + ) => list(context, resourceGroupName, clusterName, nodeTypeName, options), + listFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesListFaultSimulationOptionalParams, + ) => listFaultSimulation(context, resourceGroupName, clusterName, nodeTypeName, options), + getFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options?: NodeTypesGetFaultSimulationOptionalParams, + ) => + getFaultSimulation( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ), + stopFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationIdParameters, + options?: NodeTypesStopFaultSimulationOptionalParams, + ) => + stopFaultSimulation( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ), + startFaultSimulation: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: FaultSimulationParametersUnion, + options?: NodeTypesStartFaultSimulationOptionalParams, + ) => + startFaultSimulation( + context, + resourceGroupName, + clusterName, + nodeTypeName, + parameters, + options, + ), + start: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesStartOptionalParams, + ) => start(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + restart: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesRestartOptionalParams, + ) => restart(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + reimage: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesReimageOptionalParams, + ) => reimage(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + redeploy: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesRedeployOptionalParams, + ) => redeploy(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + deleteNode: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesDeleteNodeOptionalParams, + ) => deleteNode(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + deallocate: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeActionParameters, + options?: NodeTypesDeallocateOptionalParams, + ) => deallocate(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + listByManagedClusters: ( + resourceGroupName: string, + clusterName: string, + options?: NodeTypesListByManagedClustersOptionalParams, + ) => listByManagedClusters(context, resourceGroupName, clusterName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, nodeTypeName, options), + update: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeTypeUpdateParameters, + options?: NodeTypesUpdateOptionalParams, + ) => update(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + parameters: NodeType, + options?: NodeTypesCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, clusterName, nodeTypeName, parameters, options), + get: ( + resourceGroupName: string, + clusterName: string, + nodeTypeName: string, + options?: NodeTypesGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, nodeTypeName, options), + }; +} + +export function _getNodeTypesOperations(context: ServiceFabricContext): NodeTypesOperations { + return { + ..._getNodeTypes(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts new file mode 100644 index 000000000000..32f5046939d9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { get } from "../../api/operationResults/index.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; +import { OperationResultsGetOptionalParams } from "../../api/options.js"; + +/** Interface representing a OperationResults operations. */ +export interface OperationResultsOperations { + /** Get long running operation result. */ + get: ( + location: string, + operationId: string, + options?: OperationResultsGetOptionalParams, + ) => PollerLike, void>; +} + +function _getOperationResults(context: ServiceFabricContext) { + return { + get: (location: string, operationId: string, options?: OperationResultsGetOptionalParams) => + get(context, location, operationId, options), + }; +} + +export function _getOperationResultsOperations( + context: ServiceFabricContext, +): OperationResultsOperations { + return { + ..._getOperationResults(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts new file mode 100644 index 000000000000..748eb5180401 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { get } from "../../api/operationStatus/index.js"; +import { LongRunningOperationResult } from "../../models/models.js"; +import { OperationStatusGetOptionalParams } from "../../api/options.js"; + +/** Interface representing a OperationStatus operations. */ +export interface OperationStatusOperations { + /** Get long running operation status. */ + get: ( + location: string, + operationId: string, + options?: OperationStatusGetOptionalParams, + ) => Promise; +} + +function _getOperationStatus(context: ServiceFabricContext) { + return { + get: (location: string, operationId: string, options?: OperationStatusGetOptionalParams) => + get(context, location, operationId, options), + }; +} + +export function _getOperationStatusOperations( + context: ServiceFabricContext, +): OperationStatusOperations { + return { + ..._getOperationStatus(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts new file mode 100644 index 000000000000..23f8e313ff39 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { list } from "../../api/operations/index.js"; +import { Operation } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { OperationsListOptionalParams } from "../../api/options.js"; + +/** Interface representing a Operations operations. */ +export interface OperationsOperations { + /** List the operations for the provider */ + list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator; +} + +function _getOperations(context: ServiceFabricContext) { + return { + list: (options?: OperationsListOptionalParams) => list(context, options), + }; +} + +export function _getOperationsOperations(context: ServiceFabricContext): OperationsOperations { + return { + ..._getOperations(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts new file mode 100644 index 000000000000..490a728decfe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + ServicesListByApplicationsOptionalParams, + ServicesDeleteOptionalParams, + ServicesUpdateOptionalParams, + ServicesCreateOrUpdateOptionalParams, + ServicesGetOptionalParams, +} from "../../api/options.js"; +import { ServiceFabricContext } from "../../api/serviceFabricContext.js"; +import { + listByApplications, + $delete, + update, + createOrUpdate, + get, +} from "../../api/services/index.js"; +import { ServiceResource, ServiceUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Services operations. */ +export interface ServicesOperations { + /** Gets all service resources created or in the process of being created in the Service Fabric managed application resource. */ + listByApplications: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ServicesListByApplicationsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete a Service Fabric managed service resource with the specified name. */ + /** + * @fixme delete is a reserved word that cannot be used as an operation name. + * Please add @clientName("clientName") or @clientName("", "javascript") + * to the operation to override the generated name. + */ + delete: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options?: ServicesDeleteOptionalParams, + ) => PollerLike, void>; + /** Updates the tags of a service resource of a given managed cluster. */ + update: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceUpdateParameters, + options?: ServicesUpdateOptionalParams, + ) => Promise; + /** Create or update a Service Fabric managed service resource with the specified name. */ + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceResource, + options?: ServicesCreateOrUpdateOptionalParams, + ) => PollerLike, void>; + /** Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. */ + get: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options?: ServicesGetOptionalParams, + ) => Promise; +} + +function _getServices(context: ServiceFabricContext) { + return { + listByApplications: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + options?: ServicesListByApplicationsOptionalParams, + ) => listByApplications(context, resourceGroupName, clusterName, applicationName, options), + delete: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options?: ServicesDeleteOptionalParams, + ) => $delete(context, resourceGroupName, clusterName, applicationName, serviceName, options), + update: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceUpdateParameters, + options?: ServicesUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + clusterName, + applicationName, + serviceName, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + parameters: ServiceResource, + options?: ServicesCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + clusterName, + applicationName, + serviceName, + parameters, + options, + ), + get: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + serviceName: string, + options?: ServicesGetOptionalParams, + ) => get(context, resourceGroupName, clusterName, applicationName, serviceName, options), + }; +} + +export function _getServicesOperations(context: ServiceFabricContext): ServicesOperations { + return { + ..._getServices(context), + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts index a068157d28b2..ed935aadf6e4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts @@ -1,13 +1,251 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; -export { ServiceFabricManagedClustersManagementClient } from "./serviceFabricManagedClustersManagementClient.js"; -export * from "./operationsInterfaces/index.js"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; + +export { ServiceFabricClient } from "./serviceFabricClient.js"; +export { restorePoller, RestorePollerOptions } from "./restorePollerHelpers.js"; +export { + LongRunningOperationResult, + ErrorModelError, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + NodeType, + NodeTypeProperties, + DiskType, + EndpointRangeDescription, + VaultSecretGroup, + SubResource, + VaultCertificate, + VmssExtension, + VmssExtensionProperties, + VmssExtensionSetupOrder, + VmManagedIdentity, + FrontendConfiguration, + IPAddressType, + NetworkSecurityRule, + NsgProtocol, + Access, + Direction, + VmssDataDisk, + ManagedResourceProvisioningState, + EvictionPolicyType, + VmSetupAction, + SecurityType, + NodeTypeNatConfig, + VmImagePlan, + AdditionalNetworkInterfaceConfiguration, + IpConfiguration, + PrivateIPAddressVersion, + IpConfigurationPublicIPAddressConfiguration, + IpTag, + PublicIPAddressVersion, + VmApplication, + NodeTypeSku, + ProxyResource, + Resource, + SystemData, + CreatedByType, + NodeTypeUpdateParameters, + NodeTypeActionParameters, + UpdateType, + FaultSimulationParameters, + FaultSimulationParametersUnion, + FaultKind, + FaultSimulationConstraints, + ZoneFaultSimulationParameters, + FaultSimulationIdParameters, + FaultSimulation, + FaultSimulationStatus, + FaultSimulationDetails, + NodeTypeFaultSimulation, + SfmcOperationStatus, + NodeTypeAvailableSku, + NodeTypeSupportedSku, + NodeTypeSkuCapacity, + NodeTypeSkuScaleType, + ManagedCluster, + ManagedClusterProperties, + ClusterState, + LoadBalancingRule, + Protocol, + ProbeProtocol, + ClientCertificate, + AzureActiveDirectory, + SettingsSectionDescription, + SettingsParameterDescription, + ClusterUpgradeMode, + ClusterUpgradeCadence, + ManagedClusterAddOnFeature, + ApplicationTypeVersionsCleanupPolicy, + Subnet, + PrivateEndpointNetworkPolicies, + PrivateLinkServiceNetworkPolicies, + ServiceEndpoint, + ZonalUpdateMode, + ClusterUpgradePolicy, + ClusterHealthPolicy, + ClusterUpgradeDeltaHealthPolicy, + ClusterMonitoringPolicy, + AutoGeneratedDomainNameLabelScope, + Sku, + SkuName, + TrackedResource, + ManagedClusterUpdateParameters, + ManagedMaintenanceWindowStatus, + ManagedAzResiliencyStatus, + ResourceAzStatus, + ManagedVMSize, + VMSize, + ManagedClusterCodeVersionResult, + ManagedClusterVersionDetails, + OsType, + ServiceResource, + ServiceResourceProperties, + ServiceResourcePropertiesUnion, + ServiceKind, + Partition, + PartitionUnion, + PartitionScheme, + NamedPartitionScheme, + SingletonPartitionScheme, + UniformInt64RangePartitionScheme, + ServicePackageActivationMode, + StatefulServiceProperties, + StatelessServiceProperties, + ServiceResourcePropertiesBase, + ServiceCorrelation, + ServiceCorrelationScheme, + ServiceLoadMetric, + ServiceLoadMetricWeight, + ServicePlacementPolicy, + ServicePlacementPolicyUnion, + ServicePlacementPolicyType, + ServicePlacementInvalidDomainPolicy, + ServicePlacementNonPartiallyPlaceServicePolicy, + ServicePlacementPreferPrimaryDomainPolicy, + ServicePlacementRequireDomainDistributionPolicy, + ServicePlacementRequiredDomainPolicy, + MoveCost, + ScalingPolicy, + ScalingMechanism, + ScalingMechanismUnion, + ServiceScalingMechanismKind, + AddRemoveIncrementalNamedPartitionScalingMechanism, + PartitionInstanceCountScaleMechanism, + ScalingTrigger, + ScalingTriggerUnion, + ServiceScalingTriggerKind, + AveragePartitionLoadScalingTrigger, + AverageServiceLoadScalingTrigger, + ServiceUpdateParameters, + ApplicationTypeVersionResource, + ApplicationTypeVersionResourceProperties, + ApplicationTypeVersionUpdateParameters, + ApplicationTypeResource, + ApplicationTypeResourceProperties, + ApplicationTypeUpdateParameters, + ApplicationResource, + ApplicationResourceProperties, + ApplicationUpgradePolicy, + ApplicationHealthPolicy, + ServiceTypeHealthPolicy, + RollingUpgradeMonitoringPolicy, + FailureAction, + RollingUpgradeMode, + ApplicationUserAssignedIdentity, + ManagedIdentity, + ManagedIdentityType, + UserAssignedIdentity, + ApplicationUpdateParameters, + RuntimeResumeApplicationUpgradeParameters, + Operation, + OperationDisplay, + Origin, + ActionType, + Environment, + KnownVersions, +} from "./models/index.js"; +export { + OperationStatusGetOptionalParams, + OperationResultsGetOptionalParams, + NodeTypesListOptionalParams, + NodeTypesListFaultSimulationOptionalParams, + NodeTypesGetFaultSimulationOptionalParams, + NodeTypesStopFaultSimulationOptionalParams, + NodeTypesStartFaultSimulationOptionalParams, + NodeTypesStartOptionalParams, + NodeTypesRestartOptionalParams, + NodeTypesReimageOptionalParams, + NodeTypesRedeployOptionalParams, + NodeTypesDeleteNodeOptionalParams, + NodeTypesDeallocateOptionalParams, + NodeTypesListByManagedClustersOptionalParams, + NodeTypesDeleteOptionalParams, + NodeTypesUpdateOptionalParams, + NodeTypesCreateOrUpdateOptionalParams, + NodeTypesGetOptionalParams, + ManagedClustersManagedAzResiliencyStatusGetOptionalParams, + ManagedClustersManagedMaintenanceWindowStatusGetOptionalParams, + ManagedClustersPostOptionalParams, + ManagedClustersStopFaultSimulationOptionalParams, + ManagedClustersStartFaultSimulationOptionalParams, + ManagedClustersListFaultSimulationOptionalParams, + ManagedClustersGetFaultSimulationOptionalParams, + ManagedClustersListBySubscriptionOptionalParams, + ManagedClustersListByResourceGroupOptionalParams, + ManagedClustersDeleteOptionalParams, + ManagedClustersUpdateOptionalParams, + ManagedClustersCreateOrUpdateOptionalParams, + ManagedClustersGetOptionalParams, + ManagedVMSizesListOptionalParams, + ManagedVMSizesGetOptionalParams, + ManagedClusterVersionListByEnvironmentOptionalParams, + ManagedClusterVersionGetByEnvironmentOptionalParams, + ManagedClusterVersionListOptionalParams, + ManagedClusterVersionGetOptionalParams, + ServicesListByApplicationsOptionalParams, + ServicesDeleteOptionalParams, + ServicesUpdateOptionalParams, + ServicesCreateOrUpdateOptionalParams, + ServicesGetOptionalParams, + ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ApplicationTypeVersionsDeleteOptionalParams, + ApplicationTypeVersionsUpdateOptionalParams, + ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ApplicationTypeVersionsGetOptionalParams, + ApplicationTypesListOptionalParams, + ApplicationTypesDeleteOptionalParams, + ApplicationTypesUpdateOptionalParams, + ApplicationTypesCreateOrUpdateOptionalParams, + ApplicationTypesGetOptionalParams, + ApplicationsStartRollbackOptionalParams, + ApplicationsResumeUpgradeOptionalParams, + ApplicationsReadUpgradeOptionalParams, + ApplicationsListOptionalParams, + ApplicationsDeleteOptionalParams, + ApplicationsUpdateOptionalParams, + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsGetOptionalParams, + OperationsListOptionalParams, + ServiceFabricClientOptionalParams, +} from "./api/index.js"; +export { + ApplicationsOperations, + ApplicationTypesOperations, + ApplicationTypeVersionsOperations, + ManagedClustersOperations, + ManagedClusterVersionOperations, + ManagedVMSizesOperations, + NodeTypesOperations, + OperationResultsOperations, + OperationsOperations, + OperationStatusOperations, + ServicesOperations, +} from "./classic/index.js"; +export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/logger.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/logger.ts new file mode 100644 index 000000000000..66e421aeef0b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-servicefabricmanagedclusters"); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/lroImpl.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/lroImpl.ts deleted file mode 100644 index d8bc98987053..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/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/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts index e764e333953a..e84aa0ff9728 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts @@ -1,3055 +1,165 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 PartitionUnion = - | Partition - | NamedPartitionScheme - | SingletonPartitionScheme - | UniformInt64RangePartitionScheme; -export type ServicePlacementPolicyUnion = - | ServicePlacementPolicy - | ServicePlacementInvalidDomainPolicy - | ServicePlacementNonPartiallyPlaceServicePolicy - | ServicePlacementPreferPrimaryDomainPolicy - | ServicePlacementRequiredDomainPolicy - | ServicePlacementRequireDomainDistributionPolicy; -export type ScalingMechanismUnion = - | ScalingMechanism - | AddRemoveIncrementalNamedPartitionScalingMechanism - | PartitionInstanceCountScaleMechanism; -export type ScalingTriggerUnion = - | ScalingTrigger - | AveragePartitionLoadScalingTrigger - | AverageServiceLoadScalingTrigger; -export type ServiceResourcePropertiesUnion = - | ServiceResourceProperties - | StatefulServiceProperties - | StatelessServiceProperties; - -/** The resource model definition for proxy-only resource. */ -export interface ProxyResource { - /** - * Azure resource identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Azure resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource location depends on the parent resource. */ - location?: string; - /** Azure resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly 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?: string; - /** 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?: string; - /** The timestamp of resource last modification (UTC). */ - lastModifiedAt?: Date; -} - -/** The structure of the error. */ -export interface ErrorModel { - /** The error details. */ - error?: ErrorModelError; -} - -/** The error details. */ -export interface ErrorModelError { - /** The error code. */ - code?: string; - /** The error message. */ - message?: string; -} - -/** Application type update request */ -export interface ApplicationTypeUpdateParameters { - /** Application type update parameters */ - tags?: { [propertyName: string]: string }; -} - -/** The list of application type names. */ -export interface ApplicationTypeResourceList { - value?: ApplicationTypeResource[]; - /** - * URL to get the next set of application type list results if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Application type version update request */ -export interface ApplicationTypeVersionUpdateParameters { - /** Application type version update parameters */ - tags?: { [propertyName: string]: string }; -} - -/** The list of application type version resources for the specified application type name resource. */ -export interface ApplicationTypeVersionResourceList { - value?: ApplicationTypeVersionResource[]; - /** - * URL to get the next set of application type version list results if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Parameters for Resume Upgrade action. The upgrade domain name must be specified. */ -export interface RuntimeResumeApplicationUpgradeParameters { - /** The upgrade domain name. Expected to be the next upgrade domain if the application is upgrading. */ - upgradeDomainName?: string; -} - -/** Describes the managed identities for an Azure resource. */ -export interface ManagedIdentity { - /** - * The principal id of the managed identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id of the managed identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of managed identity for the resource. */ - type?: ManagedIdentityType; - /** - * The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - * - */ - userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; -} - -export interface UserAssignedIdentity { - /** - * The principal id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - -/** Describes the policy for a monitored application upgrade. */ -export interface ApplicationUpgradePolicy { - /** - * Defines a health policy used to evaluate the health of an application or one of its children entities. - * - */ - applicationHealthPolicy?: ApplicationHealthPolicy; - /** If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). */ - forceRestart?: boolean; - /** The policy used for monitoring the application upgrade */ - rollingUpgradeMonitoringPolicy?: RollingUpgradeMonitoringPolicy; - /** Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description. */ - instanceCloseDelayDuration?: number; - /** The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. */ - upgradeMode?: RollingUpgradeMode; - /** The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). */ - upgradeReplicaSetCheckTimeout?: number; - /** Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. */ - recreateApplication?: boolean; -} - -/** - * Defines a health policy used to evaluate the health of an application or one of its children entities. - * - */ -export interface ApplicationHealthPolicy { - /** Indicates whether warnings are treated with the same severity as errors. */ - considerWarningAsError: boolean; - /** - * The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. - * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. - * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - * - */ - maxPercentUnhealthyDeployedApplications: number; - /** The health policy used by default to evaluate the health of a service type. */ - defaultServiceTypeHealthPolicy?: ServiceTypeHealthPolicy; - /** The map with service type health policy per service type name. The map is empty by default. */ - serviceTypeHealthPolicyMap?: { - [propertyName: string]: ServiceTypeHealthPolicy; - }; -} - -/** - * Represents the health policy used to evaluate the health of services belonging to a service type. - * - */ -export interface ServiceTypeHealthPolicy { - /** - * The maximum allowed percentage of unhealthy services. - * - * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. - * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. - * The computation rounds up to tolerate one failure on small numbers of services. - * - */ - maxPercentUnhealthyServices: number; - /** - * The maximum allowed percentage of unhealthy partitions per service. - * - * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. - * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. - * The computation rounds up to tolerate one failure on small numbers of partitions. - * - */ - maxPercentUnhealthyPartitionsPerService: number; - /** - * The maximum allowed percentage of unhealthy replicas per partition. - * - * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. - * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. - * The computation rounds up to tolerate one failure on small numbers of replicas. - * - */ - maxPercentUnhealthyReplicasPerPartition: number; -} - -/** The policy used for monitoring the application upgrade */ -export interface RollingUpgradeMonitoringPolicy { - /** The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. */ - failureAction: FailureAction; - /** The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ - healthCheckWaitDuration: string; - /** The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ - healthCheckStableDuration: string; - /** The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ - healthCheckRetryTimeout: string; - /** The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ - upgradeTimeout: string; - /** The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ - upgradeDomainTimeout: string; -} - -export interface ApplicationUserAssignedIdentity { - /** The friendly name of user assigned identity. */ - name: string; - /** The principal id of user assigned identity. */ - principalId: string; -} - -/** Application update request */ -export interface ApplicationUpdateParameters { - /** Application update parameters */ - tags?: { [propertyName: string]: string }; -} - -/** The list of application resources. */ -export interface ApplicationResourceList { - value?: ApplicationResource[]; - /** - * URL to get the next set of application list results if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Describes how the service is partitioned. */ -export interface Partition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - partitionScheme: "Named" | "Singleton" | "UniformInt64Range"; -} - -/** The common service resource properties. */ -export interface ServiceResourcePropertiesBase { - /** The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". */ - placementConstraints?: string; - /** A list that describes the correlation of the service with other services. */ - correlationScheme?: ServiceCorrelation[]; - /** The service load metrics is given as an array of ServiceLoadMetric objects. */ - serviceLoadMetrics?: ServiceLoadMetric[]; - /** A list that describes the correlation of the service with other services. */ - servicePlacementPolicies?: ServicePlacementPolicyUnion[]; - /** Specifies the move cost for the service. */ - defaultMoveCost?: MoveCost; - /** Scaling policies for this service. */ - scalingPolicies?: ScalingPolicy[]; -} - -/** Creates a particular correlation between services. */ -export interface ServiceCorrelation { - /** The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. */ - scheme: ServiceCorrelationScheme; - /** The Arm Resource ID of the service that the correlation relationship is established with. */ - serviceName: string; -} - -/** Specifies a metric to load balance a service during runtime. */ -export interface ServiceLoadMetric { - /** The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive. */ - name: string; - /** The service load metric relative weight, compared to other metrics configured for this service, as a number. */ - weight?: ServiceLoadMetricWeight; - /** Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. */ - primaryDefaultLoad?: number; - /** Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. */ - secondaryDefaultLoad?: number; - /** Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. */ - defaultLoad?: number; -} - -/** Describes the policy to be used for placement of a Service Fabric service. */ -export interface ServicePlacementPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: - | "InvalidDomain" - | "NonPartiallyPlaceService" - | "PreferredPrimaryDomain" - | "RequiredDomain" - | "RequiredDomainDistribution"; -} - -/** Specifies a metric to load balance a service during runtime. */ -export interface ScalingPolicy { - /** Specifies the mechanism associated with this scaling policy */ - scalingMechanism: ScalingMechanismUnion; - /** Specifies the trigger associated with this scaling policy. */ - scalingTrigger: ScalingTriggerUnion; -} - -/** Describes the mechanism for performing a scaling operation. */ -export interface ScalingMechanism { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "AddRemoveIncrementalNamedPartition" | "ScalePartitionInstanceCount"; -} - -/** Describes the trigger for performing a scaling operation. */ -export interface ScalingTrigger { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "AveragePartitionLoadTrigger" | "AverageServiceLoadTrigger"; -} - -/** Service update request */ -export interface ServiceUpdateParameters { - /** Service update parameters */ - tags?: { [propertyName: string]: string }; -} - -/** The list of service resources. */ -export interface ServiceResourceList { - value?: ServiceResource[]; - /** - * URL to get the next set of service list results if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Managed Cluster list results */ -export interface ManagedClusterListResult { - value?: ManagedCluster[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Describes a load balancing rule. */ -export interface LoadBalancingRule { - /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534. */ - frontendPort: number; - /** The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. */ - backendPort: number; - /** The reference to the transport protocol used by the load balancing rule. */ - protocol: Protocol; - /** The prob port used by the load balancing rule. Acceptable values are between 1 and 65535. */ - probePort?: number; - /** the reference to the load balancer probe used by the load balancing rule. */ - probeProtocol: ProbeProtocol; - /** The probe request path. Only supported for HTTP/HTTPS probes. */ - probeRequestPath?: string; - /** The load distribution policy for this rule. */ - loadDistribution?: string; -} - -/** Describes a network security rule. */ -export interface NetworkSecurityRule { - /** Network security rule name. */ - name: string; - /** Network security rule description. */ - description?: string; - /** Network protocol this rule applies to. */ - protocol: NsgProtocol; - /** The CIDR or source IP ranges. */ - sourceAddressPrefixes?: string[]; - /** The destination address prefixes. CIDR or destination IP ranges. */ - destinationAddressPrefixes?: string[]; - /** The source port ranges. */ - sourcePortRanges?: string[]; - /** The destination port ranges. */ - destinationPortRanges?: string[]; - /** The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. */ - sourceAddressPrefix?: string; - /** The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ - destinationAddressPrefix?: string; - /** The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ - sourcePortRange?: string; - /** he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ - destinationPortRange?: string; - /** The network traffic is allowed or denied. */ - access: Access; - /** The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ - priority: number; - /** Network security rule direction. */ - direction: Direction; -} - -/** Client certificate definition. */ -export interface ClientCertificate { - /** Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster. */ - isAdmin: boolean; - /** Certificate thumbprint. */ - thumbprint?: string; - /** Certificate common name. */ - commonName?: string; - /** Issuer thumbprint for the certificate. Only used together with CommonName. */ - issuerThumbprint?: string; -} - -/** The settings to enable AAD authentication on the cluster. */ -export interface AzureActiveDirectory { - /** Azure active directory tenant id. */ - tenantId?: string; - /** Azure active directory cluster application id. */ - clusterApplication?: string; - /** Azure active directory client application id. */ - clientApplication?: string; -} - -/** Describes a section in the fabric settings of the cluster. */ -export interface SettingsSectionDescription { - /** The section name of the fabric settings. */ - name: string; - /** The collection of parameters in the section. */ - parameters: SettingsParameterDescription[]; -} - -/** Describes a parameter in fabric settings of the cluster. */ -export interface SettingsParameterDescription { - /** The parameter name of fabric setting. */ - name: string; - /** The parameter value of fabric setting. */ - value: string; -} - -/** The policy used to clean up unused versions. When the policy is not specified explicitly, the default unused application versions to keep will be 3. */ -export interface ApplicationTypeVersionsCleanupPolicy { - /** Number of unused versions per application type to keep. */ - maxUnusedVersionsToKeep: number; -} - -/** The IP tag associated with the public IP address. */ -export interface IpTag { - /** IP tag type. Example: FirstPartyUsage. */ - ipTagType: string; - /** IP tag associated with the public IP. Example: SQL, Storage etc. */ - tag: string; -} - -/** Describes a Subnet. */ -export interface Subnet { - /** Subnet name. */ - name: string; - /** Indicates wether to enable Ipv6 or not. If not provided, it will take the same configuration as the cluster. */ - enableIpv6?: boolean; - /** Enable or Disable apply network policies on private end point in the subnet. */ - privateEndpointNetworkPolicies?: PrivateEndpointNetworkPolicies; - /** Enable or Disable apply network policies on private link service in the subnet. */ - privateLinkServiceNetworkPolicies?: PrivateLinkServiceNetworkPolicies; - /** Full resource id for the network security group. */ - networkSecurityGroupId?: string; -} - -/** The service endpoint properties. */ -export interface ServiceEndpoint { - /** The type of the endpoint service. */ - service: string; - /** A list of locations. */ - locations?: string[]; -} - -/** Describes the policy used when upgrading the cluster. */ -export interface ClusterUpgradePolicy { - /** If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). */ - forceRestart?: boolean; - /** The cluster health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade. */ - healthPolicy?: ClusterHealthPolicy; - /** The cluster delta health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade. */ - deltaHealthPolicy?: ClusterUpgradeDeltaHealthPolicy; - /** The cluster monitoring policy describes the parameters for monitoring an upgrade in Monitored mode. */ - monitoringPolicy?: ClusterMonitoringPolicy; - /** - * The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. - * When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. - * The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. - * This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - * - */ - upgradeReplicaSetCheckTimeout?: string; -} - -/** - * Defines a health policy used to evaluate the health of the cluster or of a cluster node. - * - */ -export interface ClusterHealthPolicy { - /** - * The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. - * The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. - * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - * - * In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - * - */ - maxPercentUnhealthyNodes: number; - /** - * The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. - * - * The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. - * If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. - * This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. - * The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - * - */ - maxPercentUnhealthyApplications: number; -} - -/** Describes the delta health policies for the cluster upgrade. */ -export interface ClusterUpgradeDeltaHealthPolicy { - /** - * The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. - * The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. - * The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - * - */ - maxPercentDeltaUnhealthyNodes: number; - /** - * The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. - * The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. - * The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - * - */ - maxPercentUpgradeDomainDeltaUnhealthyNodes?: number; - /** - * The maximum allowed percentage of applications health degradation allowed during cluster upgrades. - * The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. - * The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. - * NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - * - */ - maxPercentDeltaUnhealthyApplications?: number; -} - -/** Describes the monitoring policies for the cluster upgrade. */ -export interface ClusterMonitoringPolicy { - /** The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ - healthCheckWaitDuration: string; - /** The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ - healthCheckStableDuration: string; - /** The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ - healthCheckRetryTimeout: string; - /** The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ - upgradeTimeout: string; - /** The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ - upgradeDomainTimeout: string; -} - -/** Service Fabric managed cluster Sku definition */ -export interface Sku { - /** Sku Name. */ - name: SkuName; -} - -/** The resource model definition. */ -export interface Resource { - /** - * Azure resource identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Azure resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Azure resource location. */ - location: string; - /** Azure resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * Azure resource etag. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Managed cluster update request */ -export interface ManagedClusterUpdateParameters { - /** Managed cluster update parameters */ - tags?: { [propertyName: string]: string }; -} - -/** Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters. */ -export interface ManagedAzResiliencyStatus { - /** List of Managed VM Sizes for Service Fabric Managed Clusters. */ - baseResourceStatus?: ResourceAzStatus[]; - /** - * URL to get the next set of Managed VM Sizes if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isClusterZoneResilient?: boolean; -} - -/** Describes Az Resiliency status of Base resources */ -export interface ResourceAzStatus { - /** - * VM Size properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceName?: string; - /** - * VM Size id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * VM Size name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isZoneResilient?: boolean; - /** - * Zone resiliency status details for the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: string; -} - -/** Describes the maintenance window status of the Service Fabric Managed Cluster. */ -export interface ManagedMaintenanceWindowStatus { - /** - * If maintenance window is enabled on this cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isWindowEnabled?: boolean; - /** - * Indicates if the region is ready to configure maintenance windows. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isRegionReady?: boolean; - /** - * If maintenance window is active. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isWindowActive?: boolean; - /** - * If updates can be applied. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly canApplyUpdates?: boolean; - /** - * Last window update time in UTC. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastWindowStatusUpdateAtUTC?: Date; - /** - * Last window start time in UTC. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastWindowStartTimeUTC?: Date; - /** - * Last window end time in UTC. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastWindowEndTimeUTC?: Date; -} - -/** The result of the Service Fabric runtime versions */ -export interface ManagedClusterCodeVersionResult { - /** The identification of the result */ - id?: string; - /** The name of the result */ - name?: string; - /** The result resource type */ - type?: string; - /** The Service Fabric runtime version of the cluster. */ - clusterCodeVersion?: string; - /** The date of expiry of support of the version. */ - supportExpiryUtc?: string; - /** Cluster operating system, the default will be Windows */ - osType?: OsType; -} - -/** Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters. */ -export interface ManagedVMSizesResult { - /** List of Managed VM Sizes for Service Fabric Managed Clusters. */ - value?: ManagedVMSize[]; - /** - * URL to get the next set of Managed VM Sizes if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Describes a VM Sizes. */ -export interface ManagedVMSize { - /** - * VM Size properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly properties?: VMSize; - /** - * VM Size id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * VM Size name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * VM Size type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - -/** VM Sizes properties. */ -export interface VMSize { - /** - * VM Size name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; -} - -/** Long running operation result. */ -export interface LongRunningOperationResult { - /** The name of the operation. */ - name?: string; - /** The start time of the operation. */ - startTime?: Date; - /** The end time of the operation. */ - endTime?: Date; - /** The completion percentage of the operation. */ - percentComplete?: number; - /** The status of the operation. */ - status?: string; - /** The operation error. */ - error?: ErrorModelError; -} - -/** Describes the result of the request to list Service Fabric resource provider operations. */ -export interface OperationListResult { - /** List of operations supported by the Service Fabric resource provider. */ - value?: OperationResult[]; - /** - * 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; -} - -/** Available operation list result */ -export interface OperationResult { - /** The name of the operation. */ - name?: string; - /** Indicates whether the operation is a data action */ - isDataAction?: boolean; - /** The object that represents the operation. */ - display?: AvailableOperationDisplay; - /** Origin result */ - origin?: string; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Operation supported by the Service Fabric resource provider */ -export interface AvailableOperationDisplay { - /** The name of the provider. */ - provider?: string; - /** The resource on which the operation is performed */ - resource?: string; - /** The operation that can be performed. */ - operation?: string; - /** Operation description */ - description?: string; -} - -/** Node type list results */ -export interface NodeTypeListResult { - /** The list of node types. */ - value?: NodeType[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Port range details */ -export interface EndpointRangeDescription { - /** Starting port of a range of ports */ - startPort: number; - /** End port of a range of ports */ - endPort: number; -} - -/** Specifies set of certificates that should be installed onto the virtual machines. */ -export interface VaultSecretGroup { - /** The relative URL of the Key Vault containing all of the certificates in VaultCertificates. */ - sourceVault: SubResource; - /** The list of key vault references in SourceVault which contain certificates. */ - vaultCertificates: VaultCertificate[]; -} - -/** Azure resource identifier. */ -export interface SubResource { - /** Azure resource identifier. */ - id?: string; -} - -/** Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. */ -export interface VaultCertificate { - /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). */ - certificateUrl: string; - /** For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 certificate file and .prv for private key. Both of these files are .pem formatted. */ - certificateStore: string; -} - -/** Specifies set of extensions that should be installed onto the virtual machines. */ -export interface VmssExtension { - /** The name of the extension. */ - name: string; - /** The name of the extension handler publisher. */ - publisher: string; - /** Specifies the type of the extension; an example is "CustomScriptExtension". */ - type: string; - /** Specifies the version of the script handler. */ - typeHandlerVersion: string; - /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ - autoUpgradeMinorVersion?: boolean; - /** Json formatted public settings for the extension. */ - settings?: Record; - /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ - protectedSettings?: Record; - /** If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. */ - forceUpdateTag?: string; - /** Collection of extension names after which this extension needs to be provisioned. */ - provisionAfterExtensions?: string[]; - /** - * The provisioning state, which only appears in the response. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ - enableAutomaticUpgrade?: boolean; - /** Indicates the setup order for the extension. */ - setupOrder?: VmssExtensionSetupOrder[]; -} - -/** Identities for the virtual machine scale set under the node type. */ -export interface VmManagedIdentity { - /** The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: string[]; -} - -/** Describes the frontend configurations for the node type. */ -export interface FrontendConfiguration { - /** The IP address type of this frontend configuration. If omitted the default value is IPv4. */ - ipAddressType?: IPAddressType; - /** The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//backendAddressPools/'. */ - loadBalancerBackendAddressPoolId?: string; - /** The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers//inboundNatPools/'. */ - loadBalancerInboundNatPoolId?: string; - /** The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions//resourceGroups//providers/Microsoft.Network/applicationGateways//backendAddressPools/'. */ - applicationGatewayBackendAddressPoolId?: string; -} - -/** Managed data disk description. */ -export interface VmssDataDisk { - /** Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. Lun 0 is reserved for the service fabric data disk. */ - lun: number; - /** Disk size for each vm in the node type in GBs. */ - diskSizeGB: number; - /** Managed data disk type. Specifies the storage account type for the managed disk */ - diskType: DiskType; - /** Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. */ - diskLetter: string; -} - -/** Provides information about NAT configuration on the default public Load Balancer for the node type. */ -export interface NodeTypeNatConfig { - /** The internal port for the NAT configuration. */ - backendPort?: number; - /** The port range start for the external endpoint. */ - frontendPortRangeStart?: number; - /** The port range end for the external endpoint. */ - frontendPortRangeEnd?: number; -} - -/** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. */ -export interface VmImagePlan { - /** The plan ID. */ - name?: string; - /** Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. */ - product?: string; - /** The promotion code. */ - promotionCode?: string; - /** The publisher ID. */ - publisher?: string; -} - -/** Specifies the settings for a network interface to attach to the node type. */ -export interface AdditionalNetworkInterfaceConfiguration { - /** Name of the network interface. */ - name: string; - /** Specifies whether the network interface is accelerated networking-enabled. */ - enableAcceleratedNetworking?: boolean; - /** Specifies the DSCP configuration to apply to the network interface. */ - dscpConfiguration?: SubResource; - /** Specifies the IP configurations of the network interface. */ - ipConfigurations: IpConfiguration[]; -} - -/** Specifies an IP configuration of the network interface. */ -export interface IpConfiguration { - /** Name of the network interface. */ - name: string; - /** Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. */ - applicationGatewayBackendAddressPools?: SubResource[]; - /** Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. */ - loadBalancerBackendAddressPools?: SubResource[]; - /** Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. */ - loadBalancerInboundNatPools?: SubResource[]; - /** Specifies the subnet of the network interface. */ - subnet?: SubResource; - /** Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. */ - privateIPAddressVersion?: PrivateIPAddressVersion; - /** The public IP address configuration of the network interface. */ - publicIPAddressConfiguration?: IpConfigurationPublicIPAddressConfiguration; -} - -/** The public IP address configuration of the network interface. */ -export interface IpConfigurationPublicIPAddressConfiguration { - /** Name of the network interface. */ - name: string; - /** Specifies the list of IP tags associated with the public IP address. */ - ipTags?: IpTag[]; - /** Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4. */ - publicIPAddressVersion?: PublicIPAddressVersion; -} - -/** Specifies the gallery application that should be made available to the underlying VMSS. */ -export interface VmApplication { - /** Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided. */ - configurationReference?: string; - /** If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the underlying VMSS. */ - enableAutomaticUpgrade?: boolean; - /** Optional, Specifies the order in which the packages have to be installed. */ - order?: number; - /** Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. */ - packageReferenceId: string; - /** Optional, Specifies a passthrough value for more generic context. Accepts a JSON-formatted string e.g. '{"Tag1":"Value1","Tag2":"Value2"}'. */ - vmGalleryTags?: string; - /** Optional, If true, any failure for any operation in the VmApplication will fail the deployment. */ - treatFailureAsDeploymentFailure?: boolean; -} - -/** Describes a node type sku. */ -export interface NodeTypeSku { - /** The sku name.

Name is internally generated and is used in auto-scale scenarios.
Property does not allow to be changed to other values than generated.
To avoid deployment errors please omit the property. */ - name?: string; - /** Specifies the tier of the node type.

Possible Values:
**Standard** */ - tier?: string; - /** The number of nodes in the node type.

If present in request it will override properties.vmInstanceCount. */ - capacity: number; -} - -/** The resource model definition for proxy-only resource. */ -export interface ManagedProxyResource { - /** - * Azure resource identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Azure resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Azure resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Parameters for Node type action. If nodes are not specified on the parameters, the operation will be performed in all nodes of the node type one upgrade domain at a time. */ -export interface NodeTypeActionParameters { - /** List of node names from the node type. */ - nodes?: string[]; - /** Force the action to go through. */ - force?: boolean; - /** Specifies the way the operation will be performed. */ - updateType?: UpdateType; -} - -/** Node type available sku list results */ -export interface NodeTypeListSkuResult { - /** The list of available node type SKUs. */ - value?: NodeTypeAvailableSku[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Defines the type of sku available for a node type */ -export interface NodeTypeAvailableSku { - /** - * The type of resource the sku applies to.

Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The supported SKU for a for node type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sku?: NodeTypeSupportedSku; - /** - * Provides information about how the node count can be scaled. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: NodeTypeSkuCapacity; -} - -/** Describes a node type supported sku. */ -export interface NodeTypeSupportedSku { - /** - * The sku name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Specifies the tier of the node type.

Possible Values:
**Standard** - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tier?: string; -} - -/** Provides information about how node type can be scaled. */ -export interface NodeTypeSkuCapacity { - /** - * Lowest permitted node count in a node type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * Highest permitted node count in a node type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * Default node count in a node type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * Node type capacity scale type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: NodeTypeSkuScaleType; -} - -/** Node type update request */ -export interface NodeTypeUpdateParameters { - /** Node type update parameters */ - tags?: { [propertyName: string]: string }; - /** The node type sku. */ - sku?: NodeTypeSku; -} - -/** The application type name resource */ -export interface ApplicationTypeResource extends ProxyResource { - /** - * The current deployment or provisioning state, which only appears in the response. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** An application type version resource for the specified application type name resource. */ -export interface ApplicationTypeVersionResource extends ProxyResource { - /** - * The current deployment or provisioning state, which only appears in the response - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The URL to the application package */ - appPackageUrl?: string; -} - -/** The application resource. */ -export interface ApplicationResource extends ProxyResource { - /** Describes the managed identities for an Azure resource. */ - identity?: ManagedIdentity; - /** - * The current deployment or provisioning state, which only appears in the response - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The version of the application type as defined in the application manifest. - * This name must be the full Arm Resource ID for the referenced application type version. - * - */ - version?: string; - /** List of application parameters with overridden values from their default values specified in the application manifest. */ - parameters?: { [propertyName: string]: string }; - /** Describes the policy for a monitored application upgrade. */ - upgradePolicy?: ApplicationUpgradePolicy; - /** List of user assigned identities for the application, each mapped to a friendly name. */ - managedIdentities?: ApplicationUserAssignedIdentity[]; -} - -/** The service resource. */ -export interface ServiceResource extends ProxyResource { - /** The service resource properties. */ - properties?: ServiceResourcePropertiesUnion; -} - -/** Describes the named partition scheme of the service. */ -export interface NamedPartitionScheme extends Partition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - partitionScheme: "Named"; - /** Array for the names of the partitions. */ - names: string[]; -} - -/** SingletonPartitionScheme */ -export interface SingletonPartitionScheme extends Partition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - partitionScheme: "Singleton"; -} - -/** Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions. */ -export interface UniformInt64RangePartitionScheme extends Partition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - partitionScheme: "UniformInt64Range"; - /** The number of partitions. */ - count: number; - /** - * The lower bound of the partition key range that - * should be split between the partition ‘Count’ - * - */ - lowKey: number; - /** - * The upper bound of the partition key range that - * should be split between the partition ‘Count’ - * - */ - highKey: number; -} - -/** The service resource properties. */ -export interface ServiceResourceProperties - extends ServiceResourcePropertiesBase { - /** - * The current deployment or provisioning state, which only appears in the response - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The kind of service (Stateless or Stateful). */ - serviceKind: ServiceKind; - /** The name of the service type */ - serviceTypeName: string; - /** Describes how the service is partitioned. */ - partitionDescription: PartitionUnion; - /** The activation Mode of the service package */ - servicePackageActivationMode?: ServicePackageActivationMode; - /** - * Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - * When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - * When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - * - */ - serviceDnsName?: string; -} - -/** Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service. */ -export interface ServicePlacementInvalidDomainPolicy - extends ServicePlacementPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "InvalidDomain"; - /** The name of the domain that should not be used for placement. */ - domainName: string; -} - -/** ServicePlacementNonPartiallyPlaceServicePolicy */ -export interface ServicePlacementNonPartiallyPlaceServicePolicy - extends ServicePlacementPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "NonPartiallyPlaceService"; -} - -/** - * Describes the policy to be used for placement of a Service Fabric service where the service's - * Primary replicas should optimally be placed in a particular domain. - * - * This placement policy is usually used with fault domains in scenarios where the Service Fabric - * cluster is geographically distributed in order to indicate that a service's primary replica should - * be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional - * or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica - * may not end up located in this domain due to failures, capacity limits, or other constraints. - * - */ -export interface ServicePlacementPreferPrimaryDomainPolicy - extends ServicePlacementPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "PreferredPrimaryDomain"; - /** The name of the domain that should used for placement as per this policy. */ - domainName: string; -} - -/** Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain. */ -export interface ServicePlacementRequiredDomainPolicy - extends ServicePlacementPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "RequiredDomain"; - /** The name of the domain that should used for placement as per this policy. */ - domainName: string; -} - -/** - * Describes the policy to be used for placement of a Service Fabric service where two replicas - * from the same partition should never be placed in the same fault or upgrade domain. - * - * While this is not common it can expose the service to an increased risk of concurrent failures - * due to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider - * a case where replicas are deployed across different data center, with one replica per location. - * In the event that one of the datacenters goes offline, normally the replica that was placed in that - * datacenter will be packed into one of the remaining datacenters. If this is not desirable then this - * policy should be set. - * - */ -export interface ServicePlacementRequireDomainDistributionPolicy - extends ServicePlacementPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "RequiredDomainDistribution"; - /** The name of the domain that should used for placement as per this policy. */ - domainName: string; -} - -/** Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1'...'N-1'. */ -export interface AddRemoveIncrementalNamedPartitionScalingMechanism - extends ScalingMechanism { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "AddRemoveIncrementalNamedPartition"; - /** Minimum number of named partitions of the service. */ - minPartitionCount: number; - /** Maximum number of named partitions of the service. */ - maxPartitionCount: number; - /** The number of instances to add or remove during a scaling operation. */ - scaleIncrement: number; -} - -/** Represents a scaling mechanism for adding or removing instances of stateless service partition. */ -export interface PartitionInstanceCountScaleMechanism extends ScalingMechanism { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "ScalePartitionInstanceCount"; - /** Minimum number of instances of the partition. */ - minInstanceCount: number; - /** Maximum number of instances of the partition. */ - maxInstanceCount: number; - /** The number of instances to add or remove during a scaling operation. */ - scaleIncrement: number; -} - -/** Represents a scaling trigger related to an average load of a metric/resource of a partition. */ -export interface AveragePartitionLoadScalingTrigger extends ScalingTrigger { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "AveragePartitionLoadTrigger"; - /** The name of the metric for which usage should be tracked. */ - metricName: string; - /** The lower limit of the load below which a scale in operation should be performed. */ - lowerLoadThreshold: number; - /** The upper limit of the load beyond which a scale out operation should be performed. */ - upperLoadThreshold: number; - /** The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". */ - scaleInterval: string; -} - -/** Represents a scaling policy related to an average load of a metric/resource of a service. */ -export interface AverageServiceLoadScalingTrigger extends ScalingTrigger { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "AverageServiceLoadTrigger"; - /** The name of the metric for which usage should be tracked. */ - metricName: string; - /** The lower limit of the load below which a scale in operation should be performed. */ - lowerLoadThreshold: number; - /** The upper limit of the load beyond which a scale out operation should be performed. */ - upperLoadThreshold: number; - /** The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". */ - scaleInterval: string; - /** Flag determines whether only the load of primary replica should be considered for scaling. If set to true, then trigger will only consider the load of primary replicas of stateful service. If set to false, trigger will consider load of all replicas. This parameter cannot be set to true for stateless service. */ - useOnlyPrimaryLoad: boolean; -} - -/** - * The managed cluster resource - * - */ -export interface ManagedCluster extends Resource { - /** The sku of the managed cluster */ - sku: Sku; - /** The cluster dns name. */ - dnsName?: string; - /** - * The fully qualified domain name associated with the public load balancer of the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly fqdn?: string; - /** - * The IPv4 address associated with the public load balancer of the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv4Address?: string; - /** - * A service generated unique identifier for the cluster resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterId?: string; - /** - * The current state of the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterState?: ClusterState; - /** - * List of thumbprints of the cluster certificates. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clusterCertificateThumbprints?: string[]; - /** The port used for client connections to the cluster. */ - clientConnectionPort?: number; - /** The port used for HTTP connections to the cluster. */ - httpGatewayConnectionPort?: number; - /** VM admin user name. */ - adminUserName?: string; - /** - * VM admin user password. - * This value contains a credential. Consider obscuring before showing to users - */ - adminPassword?: string; - /** Load balancing rules that are applied to the public load balancer of the cluster. */ - loadBalancingRules?: LoadBalancingRule[]; - /** Setting this to true enables RDP access to the VM. The default NSG rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false. */ - allowRdpAccess?: boolean; - /** Custom Network Security Rules that are applied to the Virtual Network of the cluster. */ - networkSecurityRules?: NetworkSecurityRule[]; - /** Client certificates that are allowed to manage the cluster. */ - clients?: ClientCertificate[]; - /** The AAD authentication settings of the cluster. */ - azureActiveDirectory?: AzureActiveDirectory; - /** The list of custom fabric settings to configure the cluster. */ - fabricSettings?: SettingsSectionDescription[]; - /** - * The provisioning state of the managed cluster resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ManagedResourceProvisioningState; - /** The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. */ - clusterCodeVersion?: string; - /** - * The upgrade mode of the cluster when new Service Fabric runtime version is available. - * - */ - clusterUpgradeMode?: ClusterUpgradeMode; - /** Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. */ - clusterUpgradeCadence?: ClusterUpgradeCadence; - /** List of add-on features to enable on the cluster. */ - addonFeatures?: ManagedClusterAddOnFeature[]; - /** Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. */ - enableAutoOSUpgrade?: boolean; - /** Indicates if the cluster has zone resiliency. */ - zonalResiliency?: boolean; - /** The policy used to clean up unused versions. */ - applicationTypeVersionsCleanupPolicy?: ApplicationTypeVersionsCleanupPolicy; - /** Setting this to true creates IPv6 address space for the default VNet used by the cluster. This setting cannot be changed once the cluster is created. The default value for this setting is false. */ - enableIpv6?: boolean; - /** If specified, the node types for the cluster are created in this subnet instead of the default VNet. The **networkSecurityRules** specified for the cluster are also applied to this subnet. This setting cannot be changed once the cluster is created. */ - subnetId?: string; - /** The list of IP tags associated with the default public IP address of the cluster. */ - ipTags?: IpTag[]; - /** - * IPv6 address for the cluster if IPv6 is enabled. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipv6Address?: string; - /** Setting this to true will link the IPv4 address as the ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. */ - enableServicePublicIP?: boolean; - /** Auxiliary subnets for the cluster. */ - auxiliarySubnets?: Subnet[]; - /** Service endpoints for subnets in the cluster. */ - serviceEndpoints?: ServiceEndpoint[]; - /** Indicates the update mode for Cross Az clusters. */ - zonalUpdateMode?: ZonalUpdateMode; - /** For new clusters, this parameter indicates that it uses Bring your own VNet, but the subnet is specified at node type level; and for such clusters, the subnetId property is required for node types. */ - useCustomVnet?: boolean; - /** Specify the resource id of a public IPv4 prefix that the load balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. */ - publicIPPrefixId?: string; - /** Specify the resource id of a public IPv6 prefix that the load balancer will allocate a public IPv6 address from. This setting cannot be changed once the cluster is created. */ - publicIPv6PrefixId?: string; - /** Specify the resource id of a DDoS network protection plan that will be associated with the virtual network of the cluster. */ - ddosProtectionPlanId?: string; - /** The policy to use when upgrading the cluster. */ - upgradeDescription?: ClusterUpgradePolicy; - /** The port used for token-auth based HTTPS connections to the cluster. Cannot be set to the same port as HttpGatewayEndpoint. */ - httpGatewayTokenAuthConnectionPort?: number; - /** If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. */ - enableHttpGatewayExclusiveAuthMode?: boolean; - /** This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. */ - autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; - /** The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. */ - allocatedOutboundPorts?: number; -} - -/** Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ -export interface NodeType extends ManagedProxyResource { - /** The node type sku. */ - sku?: NodeTypeSku; - /** Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. */ - isPrimary?: boolean; - /** The number of nodes in the node type.

**Values:**
-1 - Use when auto scale rules are configured or sku.capacity is defined
0 - Not supported
>0 - Use for manual scale. */ - vmInstanceCount?: number; - /** Disk size for the managed disk attached to the vms on the node type in GBs. */ - dataDiskSizeGB?: number; - /** Managed data disk type. Specifies the storage account type for the managed disk */ - dataDiskType?: DiskType; - /** Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. */ - dataDiskLetter?: string; - /** The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. */ - placementProperties?: { [propertyName: string]: string }; - /** The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. */ - capacities?: { [propertyName: string]: string }; - /** The range of ports from which cluster assigned port to Service Fabric applications. */ - applicationPorts?: EndpointRangeDescription; - /** The range of ephemeral ports that nodes in this node type should be configured with. */ - ephemeralPorts?: EndpointRangeDescription; - /** The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3. */ - vmSize?: string; - /** The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. */ - vmImagePublisher?: string; - /** The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. */ - vmImageOffer?: string; - /** The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. */ - vmImageSku?: string; - /** The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. */ - vmImageVersion?: string; - /** The secrets to install in the virtual machines. */ - vmSecrets?: VaultSecretGroup[]; - /** Set of extensions that should be installed onto the virtual machines. */ - vmExtensions?: VmssExtension[]; - /** Identities to assign to the virtual machine scale set under the node type. */ - vmManagedIdentity?: VmManagedIdentity; - /** Indicates if the node type can only host Stateless workloads. */ - isStateless?: boolean; - /** Indicates if scale set associated with the node type can be composed of multiple placement groups. */ - multiplePlacementGroups?: boolean; - /** Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created. */ - frontendConfigurations?: FrontendConfiguration[]; - /** The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations. */ - networkSecurityRules?: NetworkSecurityRule[]; - /** Additional managed data disks. */ - additionalDataDisks?: VmssDataDisk[]; - /** Enable or disable the Host Encryption for the virtual machines on the node type. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource. */ - enableEncryptionAtHost?: boolean; - /** - * The provisioning state of the node type resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ManagedResourceProvisioningState; - /** Specifies whether the network interface is accelerated networking-enabled. */ - enableAcceleratedNetworking?: boolean; - /** Specifies whether the use public load balancer. If not specified and the node type doesn't have its own frontend configuration, it will be attached to the default load balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is true, then the frontend has to be an Internal Load Balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is false or not set, then the custom load balancer must include a public load balancer to provide outbound connectivity. */ - useDefaultPublicLoadBalancer?: boolean; - /** Specifies whether to use the temporary disk for the service fabric data root, in which case no managed data disk will be attached and the temporary disk will be used. It is only allowed for stateless node types. */ - useTempDataDisk?: boolean; - /** Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types. */ - enableOverProvisioning?: boolean; - /** Specifies the availability zones where the node type would span across. If the cluster is not spanning across availability zones, initiates az migration for the cluster. */ - zones?: string[]; - /** Indicates whether the node type will be Spot Virtual Machines. Azure will allocate the VMs if there is capacity available and the VMs can be evicted at any time. */ - isSpotVM?: boolean; - /** Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts. */ - hostGroupId?: string; - /** Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature. */ - useEphemeralOSDisk?: boolean; - /** Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601. */ - spotRestoreTimeout?: string; - /** Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete. */ - evictionPolicy?: EvictionPolicyType; - /** Indicates the resource id of the vm image. This parameter is used for custom vm image. */ - vmImageResourceId?: string; - /** Indicates the resource id of the subnet for the node type. */ - subnetId?: string; - /** Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. */ - vmSetupActions?: VmSetupAction[]; - /** Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported */ - securityType?: SecurityType; - /** Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType */ - secureBootEnabled?: boolean; - /** Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. */ - enableNodePublicIP?: boolean; - /** Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. */ - enableNodePublicIPv6?: boolean; - /** Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. */ - vmSharedGalleryImageId?: string; - /** Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer. */ - natGatewayId?: string; - /** Specifies the NAT configuration on default public Load Balancer for the node type. This is only supported for node types use the default public Load Balancer. */ - natConfigurations?: NodeTypeNatConfig[]; - /** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. */ - vmImagePlan?: VmImagePlan; - /** Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. */ - serviceArtifactReferenceId?: string; - /** Specifies the resource id of the DSCP configuration to apply to the node type network interface. */ - dscpConfigurationId?: string; - /** Specifies the settings for any additional secondary network interfaces to attach to the node type. */ - additionalNetworkInterfaceConfigurations?: AdditionalNetworkInterfaceConfiguration[]; - /** Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. */ - computerNamePrefix?: string; - /** Specifies the gallery applications that should be made available to the underlying VMSS. */ - vmApplications?: VmApplication[]; -} - -/** The properties of a stateful service resource. */ -export interface StatefulServiceProperties extends ServiceResourceProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - serviceKind: "Stateful"; - /** A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. */ - hasPersistedState?: boolean; - /** The target replica set size as a number. */ - targetReplicaSetSize?: number; - /** The minimum replica set size as a number. */ - minReplicaSetSize?: number; - /** The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". */ - replicaRestartWaitDuration?: string; - /** The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". */ - quorumLossWaitDuration?: string; - /** The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". */ - standByReplicaKeepDuration?: string; - /** The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". */ - servicePlacementTimeLimit?: string; -} - -/** The properties of a stateless service resource. */ -export interface StatelessServiceProperties extends ServiceResourceProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - serviceKind: "Stateless"; - /** The instance count. */ - instanceCount: number; - /** MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. */ - minInstanceCount?: number; - /** MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. */ - minInstancePercentage?: number; -} - -/** Defines headers for ApplicationTypeVersions_createOrUpdate operation. */ -export interface ApplicationTypeVersionsCreateOrUpdateHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for ApplicationTypeVersions_delete operation. */ -export interface ApplicationTypeVersionsDeleteHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Applications_readUpgrade operation. */ -export interface ApplicationsReadUpgradeHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Applications_startRollback operation. */ -export interface ApplicationsStartRollbackHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Applications_resumeUpgrade operation. */ -export interface ApplicationsResumeUpgradeHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Applications_createOrUpdate operation. */ -export interface ApplicationsCreateOrUpdateHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Applications_delete operation. */ -export interface ApplicationsDeleteHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Services_createOrUpdate operation. */ -export interface ServicesCreateOrUpdateHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for Services_delete operation. */ -export interface ServicesDeleteHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for ManagedClusters_createOrUpdate operation. */ -export interface ManagedClustersCreateOrUpdateHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for ManagedClusters_delete operation. */ -export interface ManagedClustersDeleteHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for OperationResults_get operation. */ -export interface OperationResultsGetHeaders { - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for NodeTypes_restart operation. */ -export interface NodeTypesRestartHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for NodeTypes_reimage operation. */ -export interface NodeTypesReimageHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for NodeTypes_deleteNode operation. */ -export interface NodeTypesDeleteNodeHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for NodeTypes_createOrUpdate operation. */ -export interface NodeTypesCreateOrUpdateHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for NodeTypes_update operation. */ -export interface NodeTypesUpdateHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Defines headers for NodeTypes_delete operation. */ -export interface NodeTypesDeleteHeaders { - /** The URL to get the status of an ongoing long-running operation. */ - azureAsyncOperation?: string; - /** The URL to get the status of a completed long-running operation. */ - location?: string; -} - -/** Known values of {@link FailureAction} that the service accepts. */ -export enum KnownFailureAction { - /** The upgrade will start rolling back automatically. The value is 0 */ - Rollback = "Rollback", - /** The upgrade will switch to UnmonitoredManual upgrade mode. The value is 1 */ - Manual = "Manual", -} - -/** - * Defines values for FailureAction. \ - * {@link KnownFailureAction} can be used interchangeably with FailureAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Rollback**: The upgrade will start rolling back automatically. The value is 0 \ - * **Manual**: The upgrade will switch to UnmonitoredManual upgrade mode. The value is 1 - */ -export type FailureAction = string; - -/** Known values of {@link RollingUpgradeMode} that the service accepts. */ -export enum KnownRollingUpgradeMode { - /** The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0. */ - Monitored = "Monitored", - /** The upgrade will proceed automatically without performing any health monitoring. The value is 1. */ - UnmonitoredAuto = "UnmonitoredAuto", -} - -/** - * Defines values for RollingUpgradeMode. \ - * {@link KnownRollingUpgradeMode} can be used interchangeably with RollingUpgradeMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Monitored**: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0. \ - * **UnmonitoredAuto**: The upgrade will proceed automatically without performing any health monitoring. The value is 1. - */ -export type RollingUpgradeMode = string; - -/** Known values of {@link ServiceKind} that the service accepts. */ -export enum KnownServiceKind { - /** Does not use Service Fabric to make its state highly available or reliable. The value is 0. */ - Stateless = "Stateless", - /** Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1. */ - Stateful = "Stateful", -} - -/** - * Defines values for ServiceKind. \ - * {@link KnownServiceKind} can be used interchangeably with ServiceKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Stateless**: Does not use Service Fabric to make its state highly available or reliable. The value is 0. \ - * **Stateful**: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1. - */ -export type ServiceKind = string; - -/** Known values of {@link PartitionScheme} that the service accepts. */ -export enum KnownPartitionScheme { - /** Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0. */ - Singleton = "Singleton", - /** Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The value is 1. */ - UniformInt64Range = "UniformInt64Range", - /** Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2. */ - Named = "Named", -} - -/** - * Defines values for PartitionScheme. \ - * {@link KnownPartitionScheme} can be used interchangeably with PartitionScheme, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Singleton**: Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0. \ - * **UniformInt64Range**: Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The value is 1. \ - * **Named**: Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2. - */ -export type PartitionScheme = string; - -/** Known values of {@link ServicePackageActivationMode} that the service accepts. */ -export enum KnownServicePackageActivationMode { - /** Indicates the application package activation mode will use shared process. */ - SharedProcess = "SharedProcess", - /** Indicates the application package activation mode will use exclusive process. */ - ExclusiveProcess = "ExclusiveProcess", -} - -/** - * Defines values for ServicePackageActivationMode. \ - * {@link KnownServicePackageActivationMode} can be used interchangeably with ServicePackageActivationMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SharedProcess**: Indicates the application package activation mode will use shared process. \ - * **ExclusiveProcess**: Indicates the application package activation mode will use exclusive process. - */ -export type ServicePackageActivationMode = string; - -/** Known values of {@link ServiceCorrelationScheme} that the service accepts. */ -export enum KnownServiceCorrelationScheme { - /** Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0. */ - AlignedAffinity = "AlignedAffinity", - /** Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1. */ - NonAlignedAffinity = "NonAlignedAffinity", -} - -/** - * Defines values for ServiceCorrelationScheme. \ - * {@link KnownServiceCorrelationScheme} can be used interchangeably with ServiceCorrelationScheme, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AlignedAffinity**: Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0. \ - * **NonAlignedAffinity**: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1. - */ -export type ServiceCorrelationScheme = string; - -/** Known values of {@link ServiceLoadMetricWeight} that the service accepts. */ -export enum KnownServiceLoadMetricWeight { - /** Disables resource balancing for this metric. This value is zero. */ - Zero = "Zero", - /** Specifies the metric weight of the service load as Low. The value is 1. */ - Low = "Low", - /** Specifies the metric weight of the service load as Medium. The value is 2. */ - Medium = "Medium", - /** Specifies the metric weight of the service load as High. The value is 3. */ - High = "High", -} - -/** - * Defines values for ServiceLoadMetricWeight. \ - * {@link KnownServiceLoadMetricWeight} can be used interchangeably with ServiceLoadMetricWeight, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Zero**: Disables resource balancing for this metric. This value is zero. \ - * **Low**: Specifies the metric weight of the service load as Low. The value is 1. \ - * **Medium**: Specifies the metric weight of the service load as Medium. The value is 2. \ - * **High**: Specifies the metric weight of the service load as High. The value is 3. - */ -export type ServiceLoadMetricWeight = string; - -/** Known values of {@link ServicePlacementPolicyType} that the service accepts. */ -export enum KnownServicePlacementPolicyType { - /** Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 0. */ - InvalidDomain = "InvalidDomain", - /** Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 1. */ - RequiredDomain = "RequiredDomain", - /** Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 2. */ - PreferredPrimaryDomain = "PreferredPrimaryDomain", - /** Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 3. */ - RequiredDomainDistribution = "RequiredDomainDistribution", - /** Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 4. */ - NonPartiallyPlaceService = "NonPartiallyPlaceService", -} - -/** - * Defines values for ServicePlacementPolicyType. \ - * {@link KnownServicePlacementPolicyType} can be used interchangeably with ServicePlacementPolicyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **InvalidDomain**: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 0. \ - * **RequiredDomain**: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 1. \ - * **PreferredPrimaryDomain**: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 2. \ - * **RequiredDomainDistribution**: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 3. \ - * **NonPartiallyPlaceService**: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 4. - */ -export type ServicePlacementPolicyType = string; - -/** Known values of {@link MoveCost} that the service accepts. */ -export enum KnownMoveCost { - /** Zero move cost. This value is zero. */ - Zero = "Zero", - /** Specifies the move cost of the service as Low. The value is 1. */ - Low = "Low", - /** Specifies the move cost of the service as Medium. The value is 2. */ - Medium = "Medium", - /** Specifies the move cost of the service as High. The value is 3. */ - High = "High", -} - -/** - * Defines values for MoveCost. \ - * {@link KnownMoveCost} can be used interchangeably with MoveCost, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Zero**: Zero move cost. This value is zero. \ - * **Low**: Specifies the move cost of the service as Low. The value is 1. \ - * **Medium**: Specifies the move cost of the service as Medium. The value is 2. \ - * **High**: Specifies the move cost of the service as High. The value is 3. - */ -export type MoveCost = string; - -/** Known values of {@link ServiceScalingMechanismKind} that the service accepts. */ -export enum KnownServiceScalingMechanismKind { - /** Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0. */ - ScalePartitionInstanceCount = "ScalePartitionInstanceCount", - /** Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1. */ - AddRemoveIncrementalNamedPartition = "AddRemoveIncrementalNamedPartition", -} - -/** - * Defines values for ServiceScalingMechanismKind. \ - * {@link KnownServiceScalingMechanismKind} can be used interchangeably with ServiceScalingMechanismKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ScalePartitionInstanceCount**: Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0. \ - * **AddRemoveIncrementalNamedPartition**: Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1. - */ -export type ServiceScalingMechanismKind = string; - -/** Known values of {@link ServiceScalingTriggerKind} that the service accepts. */ -export enum KnownServiceScalingTriggerKind { - /** Represents a scaling trigger related to an average load of a metric\/resource of a partition. The value is 0. */ - AveragePartitionLoadTrigger = "AveragePartitionLoadTrigger", - /** Represents a scaling policy related to an average load of a metric\/resource of a service. The value is 1. */ - AverageServiceLoadTrigger = "AverageServiceLoadTrigger", -} - -/** - * Defines values for ServiceScalingTriggerKind. \ - * {@link KnownServiceScalingTriggerKind} can be used interchangeably with ServiceScalingTriggerKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AveragePartitionLoadTrigger**: Represents a scaling trigger related to an average load of a metric\/resource of a partition. The value is 0. \ - * **AverageServiceLoadTrigger**: Represents a scaling policy related to an average load of a metric\/resource of a service. The value is 1. - */ -export type ServiceScalingTriggerKind = string; - -/** Known values of {@link ClusterState} that the service accepts. */ -export enum KnownClusterState { - /** Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it. */ - WaitingForNodes = "WaitingForNodes", - /** Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up. */ - Deploying = "Deploying", - /** Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time. */ - BaselineUpgrade = "BaselineUpgrade", - /** Indicates that the cluster is being upgraded with the user provided configuration. */ - Upgrading = "Upgrading", - /** Indicates that the last upgrade for the cluster has failed. */ - UpgradeFailed = "UpgradeFailed", - /** Indicates that the cluster is in a stable state. */ - Ready = "Ready", -} - -/** - * Defines values for ClusterState. \ - * {@link KnownClusterState} can be used interchangeably with ClusterState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **WaitingForNodes**: Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it. \ - * **Deploying**: Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up. \ - * **BaselineUpgrade**: Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time. \ - * **Upgrading**: Indicates that the cluster is being upgraded with the user provided configuration. \ - * **UpgradeFailed**: Indicates that the last upgrade for the cluster has failed. \ - * **Ready**: Indicates that the cluster is in a stable state. - */ -export type ClusterState = string; - -/** Known values of {@link Protocol} that the service accepts. */ -export enum KnownProtocol { - /** Tcp */ - Tcp = "tcp", - /** Udp */ - Udp = "udp", -} - -/** - * Defines values for Protocol. \ - * {@link KnownProtocol} can be used interchangeably with Protocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **tcp** \ - * **udp** - */ -export type Protocol = string; - -/** Known values of {@link ProbeProtocol} that the service accepts. */ -export enum KnownProbeProtocol { - /** Tcp */ - Tcp = "tcp", - /** Http */ - Http = "http", - /** Https */ - Https = "https", -} - -/** - * Defines values for ProbeProtocol. \ - * {@link KnownProbeProtocol} can be used interchangeably with ProbeProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **tcp** \ - * **http** \ - * **https** - */ -export type ProbeProtocol = string; - -/** Known values of {@link NsgProtocol} that the service accepts. */ -export enum KnownNsgProtocol { - /** Http */ - Http = "http", - /** Https */ - Https = "https", - /** Tcp */ - Tcp = "tcp", - /** Udp */ - Udp = "udp", - /** Icmp */ - Icmp = "icmp", - /** Ah */ - Ah = "ah", - /** Esp */ - Esp = "esp", -} - -/** - * Defines values for NsgProtocol. \ - * {@link KnownNsgProtocol} can be used interchangeably with NsgProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **http** \ - * **https** \ - * **tcp** \ - * **udp** \ - * **icmp** \ - * **ah** \ - * **esp** - */ -export type NsgProtocol = string; - -/** Known values of {@link Access} that the service accepts. */ -export enum KnownAccess { - /** Allow */ - Allow = "allow", - /** Deny */ - Deny = "deny", -} - -/** - * Defines values for Access. \ - * {@link KnownAccess} can be used interchangeably with Access, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **allow** \ - * **deny** - */ -export type Access = string; - -/** Known values of {@link Direction} that the service accepts. */ -export enum KnownDirection { - /** Inbound */ - Inbound = "inbound", - /** Outbound */ - Outbound = "outbound", -} - -/** - * Defines values for Direction. \ - * {@link KnownDirection} can be used interchangeably with Direction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **inbound** \ - * **outbound** - */ -export type Direction = string; - -/** Known values of {@link ManagedResourceProvisioningState} that the service accepts. */ -export enum KnownManagedResourceProvisioningState { - /** None */ - None = "None", - /** Creating */ - Creating = "Creating", - /** Created */ - Created = "Created", - /** Updating */ - Updating = "Updating", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled", - /** Deleting */ - Deleting = "Deleting", - /** Deleted */ - Deleted = "Deleted", - /** Other */ - Other = "Other", -} - -/** - * Defines values for ManagedResourceProvisioningState. \ - * {@link KnownManagedResourceProvisioningState} can be used interchangeably with ManagedResourceProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Creating** \ - * **Created** \ - * **Updating** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Deleting** \ - * **Deleted** \ - * **Other** - */ -export type ManagedResourceProvisioningState = string; - -/** Known values of {@link ClusterUpgradeMode} that the service accepts. */ -export enum KnownClusterUpgradeMode { - /** The cluster will be automatically upgraded to the latest Service Fabric runtime version, **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes available. */ - Automatic = "Automatic", - /** The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource. */ - Manual = "Manual", -} - -/** - * Defines values for ClusterUpgradeMode. \ - * {@link KnownClusterUpgradeMode} can be used interchangeably with ClusterUpgradeMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Automatic**: The cluster will be automatically upgraded to the latest Service Fabric runtime version, **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes available. \ - * **Manual**: The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource. - */ -export type ClusterUpgradeMode = string; - -/** Known values of {@link ClusterUpgradeCadence} that the service accepts. */ -export enum KnownClusterUpgradeCadence { - /** Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test\/Dev clusters. */ - Wave0 = "Wave0", - /** Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters. */ - Wave1 = "Wave1", - /** Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters. */ - Wave2 = "Wave2", -} - -/** - * Defines values for ClusterUpgradeCadence. \ - * {@link KnownClusterUpgradeCadence} can be used interchangeably with ClusterUpgradeCadence, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Wave0**: Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test\/Dev clusters. \ - * **Wave1**: Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters. \ - * **Wave2**: Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters. - */ -export type ClusterUpgradeCadence = string; - -/** Known values of {@link ManagedClusterAddOnFeature} that the service accepts. */ -export enum KnownManagedClusterAddOnFeature { - /** Dns service */ - DnsService = "DnsService", - /** Backup and restore service */ - BackupRestoreService = "BackupRestoreService", - /** Resource monitor service */ - ResourceMonitorService = "ResourceMonitorService", -} - -/** - * Defines values for ManagedClusterAddOnFeature. \ - * {@link KnownManagedClusterAddOnFeature} can be used interchangeably with ManagedClusterAddOnFeature, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DnsService**: Dns service \ - * **BackupRestoreService**: Backup and restore service \ - * **ResourceMonitorService**: Resource monitor service - */ -export type ManagedClusterAddOnFeature = string; - -/** Known values of {@link PrivateEndpointNetworkPolicies} that the service accepts. */ -export enum KnownPrivateEndpointNetworkPolicies { - /** Enabled */ - Enabled = "enabled", - /** Disabled */ - Disabled = "disabled", -} - -/** - * Defines values for PrivateEndpointNetworkPolicies. \ - * {@link KnownPrivateEndpointNetworkPolicies} can be used interchangeably with PrivateEndpointNetworkPolicies, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **enabled** \ - * **disabled** - */ -export type PrivateEndpointNetworkPolicies = string; - -/** Known values of {@link PrivateLinkServiceNetworkPolicies} that the service accepts. */ -export enum KnownPrivateLinkServiceNetworkPolicies { - /** Enabled */ - Enabled = "enabled", - /** Disabled */ - Disabled = "disabled", -} - -/** - * Defines values for PrivateLinkServiceNetworkPolicies. \ - * {@link KnownPrivateLinkServiceNetworkPolicies} can be used interchangeably with PrivateLinkServiceNetworkPolicies, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **enabled** \ - * **disabled** - */ -export type PrivateLinkServiceNetworkPolicies = string; - -/** Known values of {@link ZonalUpdateMode} that the service accepts. */ -export enum KnownZonalUpdateMode { - /** The cluster will use 5 upgrade domains for Cross Az Node types. */ - Standard = "Standard", - /** The cluster will use a maximum of 3 upgrade domains per zone instead of 5 for Cross Az Node types for faster deployments. */ - Fast = "Fast", -} - -/** - * Defines values for ZonalUpdateMode. \ - * {@link KnownZonalUpdateMode} can be used interchangeably with ZonalUpdateMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard**: The cluster will use 5 upgrade domains for Cross Az Node types. \ - * **Fast**: The cluster will use a maximum of 3 upgrade domains per zone instead of 5 for Cross Az Node types for faster deployments. - */ -export type ZonalUpdateMode = string; - -/** Known values of {@link AutoGeneratedDomainNameLabelScope} that the service accepts. */ -export enum KnownAutoGeneratedDomainNameLabelScope { - /** TenantReuse allows for the same hash to be created if the resource is created in the same Tenant with the same resource name. */ - TenantReuse = "TenantReuse", - /** SubscriptionReuse allows for the same hash to be created if the resource is created in the same Subscription with the same resource name. */ - SubscriptionReuse = "SubscriptionReuse", - /** ResourceGroupReuse allows for the same hash to be created if the resource is created in the same Resource Group with the same resource name. */ - ResourceGroupReuse = "ResourceGroupReuse", - /** NoReuse will create a new hash regardless of the Subscription, Resource Group, Tenant and Resource name. */ - NoReuse = "NoReuse", -} - -/** - * Defines values for AutoGeneratedDomainNameLabelScope. \ - * {@link KnownAutoGeneratedDomainNameLabelScope} can be used interchangeably with AutoGeneratedDomainNameLabelScope, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TenantReuse**: TenantReuse allows for the same hash to be created if the resource is created in the same Tenant with the same resource name. \ - * **SubscriptionReuse**: SubscriptionReuse allows for the same hash to be created if the resource is created in the same Subscription with the same resource name. \ - * **ResourceGroupReuse**: ResourceGroupReuse allows for the same hash to be created if the resource is created in the same Resource Group with the same resource name. \ - * **NoReuse**: NoReuse will create a new hash regardless of the Subscription, Resource Group, Tenant and Resource name. - */ -export type AutoGeneratedDomainNameLabelScope = string; - -/** Known values of {@link SkuName} that the service accepts. */ -export enum KnownSkuName { - /** Basic requires a minimum of 3 nodes and allows only 1 node type. */ - Basic = "Basic", - /** Requires a minimum of 5 nodes and allows 1 or more node type. */ - Standard = "Standard", -} - -/** - * Defines values for SkuName. \ - * {@link KnownSkuName} can be used interchangeably with SkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic**: Basic requires a minimum of 3 nodes and allows only 1 node type. \ - * **Standard**: Requires a minimum of 5 nodes and allows 1 or more node type. - */ -export type SkuName = string; - -/** Known values of {@link OsType} that the service accepts. */ -export enum KnownOsType { - /** Indicates os is Windows. */ - Windows = "Windows", -} - -/** - * Defines values for OsType. \ - * {@link KnownOsType} can be used interchangeably with OsType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows**: Indicates os is Windows. - */ -export type OsType = string; - -/** Known values of {@link ManagedClusterVersionEnvironment} that the service accepts. */ -export enum KnownManagedClusterVersionEnvironment { - /** Windows. */ - Windows = "Windows", -} - -/** - * Defines values for ManagedClusterVersionEnvironment. \ - * {@link KnownManagedClusterVersionEnvironment} can be used interchangeably with ManagedClusterVersionEnvironment, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Windows**: Windows. - */ -export type ManagedClusterVersionEnvironment = string; - -/** Known values of {@link DiskType} that the service accepts. */ -export enum KnownDiskType { - /** Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. */ - StandardLRS = "Standard_LRS", - /** Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev\/test. */ - StandardSSDLRS = "StandardSSD_LRS", - /** Premium SSD locally redundant storage. Best for production and performance sensitive workloads. */ - PremiumLRS = "Premium_LRS", -} - -/** - * Defines values for DiskType. \ - * {@link KnownDiskType} can be used interchangeably with DiskType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard_LRS**: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. \ - * **StandardSSD_LRS**: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev\/test. \ - * **Premium_LRS**: Premium SSD locally redundant storage. Best for production and performance sensitive workloads. - */ -export type DiskType = string; - -/** Known values of {@link VmssExtensionSetupOrder} that the service accepts. */ -export enum KnownVmssExtensionSetupOrder { - /** Indicates that the vm extension should run before the service fabric runtime starts. */ - BeforeSFRuntime = "BeforeSFRuntime", -} - -/** - * Defines values for VmssExtensionSetupOrder. \ - * {@link KnownVmssExtensionSetupOrder} can be used interchangeably with VmssExtensionSetupOrder, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **BeforeSFRuntime**: Indicates that the vm extension should run before the service fabric runtime starts. - */ -export type VmssExtensionSetupOrder = string; - -/** Known values of {@link IPAddressType} that the service accepts. */ -export enum KnownIPAddressType { - /** IPv4 address type. */ - IPv4 = "IPv4", - /** IPv6 address type. */ - IPv6 = "IPv6", -} - -/** - * Defines values for IPAddressType. \ - * {@link KnownIPAddressType} can be used interchangeably with IPAddressType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4**: IPv4 address type. \ - * **IPv6**: IPv6 address type. - */ -export type IPAddressType = string; - -/** Known values of {@link EvictionPolicyType} that the service accepts. */ -export enum KnownEvictionPolicyType { - /** Eviction policy will be Delete for SPOT vms. */ - Delete = "Delete", - /** Eviction policy will be Deallocate for SPOT vms. */ - Deallocate = "Deallocate", -} - -/** - * Defines values for EvictionPolicyType. \ - * {@link KnownEvictionPolicyType} can be used interchangeably with EvictionPolicyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Delete**: Eviction policy will be Delete for SPOT vms. \ - * **Deallocate**: Eviction policy will be Deallocate for SPOT vms. - */ -export type EvictionPolicyType = string; - -/** Known values of {@link VmSetupAction} that the service accepts. */ -export enum KnownVmSetupAction { - /** Enable windows containers feature. */ - EnableContainers = "EnableContainers", - /** Enables windows HyperV feature. */ - EnableHyperV = "EnableHyperV", -} - -/** - * Defines values for VmSetupAction. \ - * {@link KnownVmSetupAction} can be used interchangeably with VmSetupAction, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **EnableContainers**: Enable windows containers feature. \ - * **EnableHyperV**: Enables windows HyperV feature. - */ -export type VmSetupAction = string; - -/** Known values of {@link SecurityType} that the service accepts. */ -export enum KnownSecurityType { - /** Trusted Launch is a security type that secures generation 2 virtual machines. */ - TrustedLaunch = "TrustedLaunch", - /** Standard is the default security type for all machines. */ - Standard = "Standard", -} - -/** - * Defines values for SecurityType. \ - * {@link KnownSecurityType} can be used interchangeably with SecurityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TrustedLaunch**: Trusted Launch is a security type that secures generation 2 virtual machines. \ - * **Standard**: Standard is the default security type for all machines. - */ -export type SecurityType = string; - -/** Known values of {@link PrivateIPAddressVersion} that the service accepts. */ -export enum KnownPrivateIPAddressVersion { - /** IPv4 */ - IPv4 = "IPv4", - /** IPv6 */ - IPv6 = "IPv6", -} - -/** - * Defines values for PrivateIPAddressVersion. \ - * {@link KnownPrivateIPAddressVersion} can be used interchangeably with PrivateIPAddressVersion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4** \ - * **IPv6** - */ -export type PrivateIPAddressVersion = string; - -/** Known values of {@link PublicIPAddressVersion} that the service accepts. */ -export enum KnownPublicIPAddressVersion { - /** IPv4 */ - IPv4 = "IPv4", - /** IPv6 */ - IPv6 = "IPv6", -} - -/** - * Defines values for PublicIPAddressVersion. \ - * {@link KnownPublicIPAddressVersion} can be used interchangeably with PublicIPAddressVersion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4** \ - * **IPv6** - */ -export type PublicIPAddressVersion = string; - -/** Known values of {@link UpdateType} that the service accepts. */ -export enum KnownUpdateType { - /** The operation will proceed in all specified nodes at the same time. */ - Default = "Default", - /** The operation will proceed one upgrade domain at a time, checking the health in between each to continue. */ - ByUpgradeDomain = "ByUpgradeDomain", -} - -/** - * Defines values for UpdateType. \ - * {@link KnownUpdateType} can be used interchangeably with UpdateType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default**: The operation will proceed in all specified nodes at the same time. \ - * **ByUpgradeDomain**: The operation will proceed one upgrade domain at a time, checking the health in between each to continue. - */ -export type UpdateType = string; - -/** Known values of {@link NodeTypeSkuScaleType} that the service accepts. */ -export enum KnownNodeTypeSkuScaleType { - /** Node count is not adjustable in any way (e.g. it is fixed). */ - None = "None", - /** The user must manually scale out\/in. */ - Manual = "Manual", - /** Automatic scale is allowed. */ - Automatic = "Automatic", -} - -/** - * Defines values for NodeTypeSkuScaleType. \ - * {@link KnownNodeTypeSkuScaleType} can be used interchangeably with NodeTypeSkuScaleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: Node count is not adjustable in any way (e.g. it is fixed). \ - * **Manual**: The user must manually scale out\/in. \ - * **Automatic**: Automatic scale is allowed. - */ -export type NodeTypeSkuScaleType = string; - -/** Known values of {@link UpgradeMode} that the service accepts. */ -export enum KnownUpgradeMode { - /** The upgrade will proceed automatically without performing any health monitoring. The value is 0 */ - UnmonitoredAuto = "UnmonitoredAuto", - /** The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 1 */ - UnmonitoredManual = "UnmonitoredManual", - /** The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 2 */ - Monitored = "Monitored", -} - -/** - * 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 - * **UnmonitoredAuto**: The upgrade will proceed automatically without performing any health monitoring. The value is 0 \ - * **UnmonitoredManual**: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 1 \ - * **Monitored**: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 2 - */ -export type UpgradeMode = string; -/** Defines values for ManagedIdentityType. */ -export type ManagedIdentityType = - | "None" - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned, UserAssigned"; - -/** Optional parameters. */ -export interface ApplicationTypesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationTypesGetResponse = ApplicationTypeResource; - -/** Optional parameters. */ -export interface ApplicationTypesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ApplicationTypesCreateOrUpdateResponse = ApplicationTypeResource; - -/** Optional parameters. */ -export interface ApplicationTypesUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApplicationTypesUpdateResponse = ApplicationTypeResource; - -/** Optional parameters. */ -export interface ApplicationTypesDeleteOptionalParams - 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 ApplicationTypesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApplicationTypesListResponse = ApplicationTypeResourceList; - -/** Optional parameters. */ -export interface ApplicationTypesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApplicationTypesListNextResponse = ApplicationTypeResourceList; - -/** Optional parameters. */ -export interface ApplicationTypeVersionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationTypeVersionsGetResponse = ApplicationTypeVersionResource; - -/** Optional parameters. */ -export interface ApplicationTypeVersionsCreateOrUpdateOptionalParams - 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 ApplicationTypeVersionsCreateOrUpdateResponse = - ApplicationTypeVersionResource; - -/** Optional parameters. */ -export interface ApplicationTypeVersionsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApplicationTypeVersionsUpdateResponse = - ApplicationTypeVersionResource; - -/** Optional parameters. */ -export interface ApplicationTypeVersionsDeleteOptionalParams - 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 ApplicationTypeVersionsListByApplicationTypesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApplicationTypes operation. */ -export type ApplicationTypeVersionsListByApplicationTypesResponse = - ApplicationTypeVersionResourceList; - -/** Optional parameters. */ -export interface ApplicationTypeVersionsListByApplicationTypesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApplicationTypesNext operation. */ -export type ApplicationTypeVersionsListByApplicationTypesNextResponse = - ApplicationTypeVersionResourceList; - -/** Optional parameters. */ -export interface ApplicationsReadUpgradeOptionalParams - 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 readUpgrade operation. */ -export type ApplicationsReadUpgradeResponse = ApplicationsReadUpgradeHeaders; - -/** Optional parameters. */ -export interface ApplicationsStartRollbackOptionalParams - 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 startRollback operation. */ -export type ApplicationsStartRollbackResponse = - ApplicationsStartRollbackHeaders; - -/** Optional parameters. */ -export interface ApplicationsResumeUpgradeOptionalParams - 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 resumeUpgrade operation. */ -export type ApplicationsResumeUpgradeResponse = - ApplicationsResumeUpgradeHeaders; - -/** Optional parameters. */ -export interface ApplicationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApplicationsGetResponse = ApplicationResource; - -/** Optional parameters. */ -export interface ApplicationsCreateOrUpdateOptionalParams - 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 ApplicationsCreateOrUpdateResponse = ApplicationResource; - -/** Optional parameters. */ -export interface ApplicationsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApplicationsUpdateResponse = ApplicationResource; - -/** Optional parameters. */ -export interface ApplicationsDeleteOptionalParams - 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 ApplicationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApplicationsListResponse = ApplicationResourceList; - -/** Optional parameters. */ -export interface ApplicationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApplicationsListNextResponse = ApplicationResourceList; - -/** Optional parameters. */ -export interface ServicesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ServicesGetResponse = ServiceResource; - -/** Optional parameters. */ -export interface ServicesCreateOrUpdateOptionalParams - 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 ServicesCreateOrUpdateResponse = ServiceResource; - -/** Optional parameters. */ -export interface ServicesUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ServicesUpdateResponse = ServiceResource; - -/** Optional parameters. */ -export interface ServicesDeleteOptionalParams - 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 ServicesListByApplicationsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApplications operation. */ -export type ServicesListByApplicationsResponse = ServiceResourceList; - -/** Optional parameters. */ -export interface ServicesListByApplicationsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApplicationsNext operation. */ -export type ServicesListByApplicationsNextResponse = ServiceResourceList; - -/** Optional parameters. */ -export interface ManagedClustersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ManagedClustersListByResourceGroupResponse = - ManagedClusterListResult; - -/** Optional parameters. */ -export interface ManagedClustersListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type ManagedClustersListBySubscriptionResponse = - ManagedClusterListResult; - -/** Optional parameters. */ -export interface ManagedClustersGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedClustersGetResponse = ManagedCluster; - -/** Optional parameters. */ -export interface ManagedClustersCreateOrUpdateOptionalParams - 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 ManagedClustersCreateOrUpdateResponse = ManagedCluster; - -/** Optional parameters. */ -export interface ManagedClustersUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ManagedClustersUpdateResponse = ManagedCluster; - -/** Optional parameters. */ -export interface ManagedClustersDeleteOptionalParams - 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 ManagedClustersListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ManagedClustersListByResourceGroupNextResponse = - ManagedClusterListResult; - -/** Optional parameters. */ -export interface ManagedClustersListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ManagedClustersListBySubscriptionNextResponse = - ManagedClusterListResult; - -/** Optional parameters. */ -export interface ManagedAzResiliencyStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedAzResiliencyStatusGetResponse = ManagedAzResiliencyStatus; - -/** Optional parameters. */ -export interface ManagedMaintenanceWindowStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedMaintenanceWindowStatusGetResponse = - ManagedMaintenanceWindowStatus; - -/** Optional parameters. */ -export interface ManagedApplyMaintenanceWindowPostOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ManagedClusterVersionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedClusterVersionGetResponse = ManagedClusterCodeVersionResult; - -/** Optional parameters. */ -export interface ManagedClusterVersionGetByEnvironmentOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByEnvironment operation. */ -export type ManagedClusterVersionGetByEnvironmentResponse = - ManagedClusterCodeVersionResult; - -/** Optional parameters. */ -export interface ManagedClusterVersionListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagedClusterVersionListResponse = - ManagedClusterCodeVersionResult[]; - -/** Optional parameters. */ -export interface ManagedClusterVersionListByEnvironmentOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByEnvironment operation. */ -export type ManagedClusterVersionListByEnvironmentResponse = - ManagedClusterCodeVersionResult[]; - -/** Optional parameters. */ -export interface ManagedUnsupportedVMSizesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagedUnsupportedVMSizesListResponse = ManagedVMSizesResult; - -/** Optional parameters. */ -export interface ManagedUnsupportedVMSizesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedUnsupportedVMSizesGetResponse = ManagedVMSize; - -/** Optional parameters. */ -export interface ManagedUnsupportedVMSizesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ManagedUnsupportedVMSizesListNextResponse = ManagedVMSizesResult; - -/** Optional parameters. */ -export interface OperationStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OperationStatusGetResponse = LongRunningOperationResult; - -/** Optional parameters. */ -export interface OperationResultsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OperationResultsGetResponse = OperationResultsGetHeaders; - -/** 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 NodeTypesListByManagedClustersOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByManagedClusters operation. */ -export type NodeTypesListByManagedClustersResponse = NodeTypeListResult; - -/** Optional parameters. */ -export interface NodeTypesRestartOptionalParams - 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 NodeTypesReimageOptionalParams - 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 NodeTypesDeleteNodeOptionalParams - 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 NodeTypesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NodeTypesGetResponse = NodeType; - -/** Optional parameters. */ -export interface NodeTypesCreateOrUpdateOptionalParams - 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 NodeTypesCreateOrUpdateResponse = NodeType; - -/** Optional parameters. */ -export interface NodeTypesUpdateOptionalParams - 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 NodeTypesUpdateResponse = NodeType; - -/** Optional parameters. */ -export interface NodeTypesDeleteOptionalParams - 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 NodeTypesListByManagedClustersNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByManagedClustersNext operation. */ -export type NodeTypesListByManagedClustersNextResponse = NodeTypeListResult; - -/** Optional parameters. */ -export interface NodeTypeSkusListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type NodeTypeSkusListResponse = NodeTypeListSkuResult; - -/** Optional parameters. */ -export interface NodeTypeSkusListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type NodeTypeSkusListNextResponse = NodeTypeListSkuResult; - -/** Optional parameters. */ -export interface ServiceFabricManagedClustersManagementClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + LongRunningOperationResult, + ErrorModelError, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + NodeType, + NodeTypeProperties, + DiskType, + EndpointRangeDescription, + VaultSecretGroup, + SubResource, + VaultCertificate, + VmssExtension, + VmssExtensionProperties, + VmssExtensionSetupOrder, + VmManagedIdentity, + FrontendConfiguration, + IPAddressType, + NetworkSecurityRule, + NsgProtocol, + Access, + Direction, + VmssDataDisk, + ManagedResourceProvisioningState, + EvictionPolicyType, + VmSetupAction, + SecurityType, + NodeTypeNatConfig, + VmImagePlan, + AdditionalNetworkInterfaceConfiguration, + IpConfiguration, + PrivateIPAddressVersion, + IpConfigurationPublicIPAddressConfiguration, + IpTag, + PublicIPAddressVersion, + VmApplication, + NodeTypeSku, + ProxyResource, + Resource, + SystemData, + CreatedByType, + NodeTypeUpdateParameters, + NodeTypeActionParameters, + UpdateType, + FaultSimulationParameters, + FaultSimulationParametersUnion, + FaultKind, + FaultSimulationConstraints, + ZoneFaultSimulationParameters, + FaultSimulationIdParameters, + FaultSimulation, + FaultSimulationStatus, + FaultSimulationDetails, + NodeTypeFaultSimulation, + SfmcOperationStatus, + NodeTypeAvailableSku, + NodeTypeSupportedSku, + NodeTypeSkuCapacity, + NodeTypeSkuScaleType, + ManagedCluster, + ManagedClusterProperties, + ClusterState, + LoadBalancingRule, + Protocol, + ProbeProtocol, + ClientCertificate, + AzureActiveDirectory, + SettingsSectionDescription, + SettingsParameterDescription, + ClusterUpgradeMode, + ClusterUpgradeCadence, + ManagedClusterAddOnFeature, + ApplicationTypeVersionsCleanupPolicy, + Subnet, + PrivateEndpointNetworkPolicies, + PrivateLinkServiceNetworkPolicies, + ServiceEndpoint, + ZonalUpdateMode, + ClusterUpgradePolicy, + ClusterHealthPolicy, + ClusterUpgradeDeltaHealthPolicy, + ClusterMonitoringPolicy, + AutoGeneratedDomainNameLabelScope, + Sku, + SkuName, + TrackedResource, + ManagedClusterUpdateParameters, + ManagedMaintenanceWindowStatus, + ManagedAzResiliencyStatus, + ResourceAzStatus, + ManagedVMSize, + VMSize, + ManagedClusterCodeVersionResult, + ManagedClusterVersionDetails, + OsType, + ServiceResource, + ServiceResourceProperties, + ServiceResourcePropertiesUnion, + ServiceKind, + Partition, + PartitionUnion, + PartitionScheme, + NamedPartitionScheme, + SingletonPartitionScheme, + UniformInt64RangePartitionScheme, + ServicePackageActivationMode, + StatefulServiceProperties, + StatelessServiceProperties, + ServiceResourcePropertiesBase, + ServiceCorrelation, + ServiceCorrelationScheme, + ServiceLoadMetric, + ServiceLoadMetricWeight, + ServicePlacementPolicy, + ServicePlacementPolicyUnion, + ServicePlacementPolicyType, + ServicePlacementInvalidDomainPolicy, + ServicePlacementNonPartiallyPlaceServicePolicy, + ServicePlacementPreferPrimaryDomainPolicy, + ServicePlacementRequireDomainDistributionPolicy, + ServicePlacementRequiredDomainPolicy, + MoveCost, + ScalingPolicy, + ScalingMechanism, + ScalingMechanismUnion, + ServiceScalingMechanismKind, + AddRemoveIncrementalNamedPartitionScalingMechanism, + PartitionInstanceCountScaleMechanism, + ScalingTrigger, + ScalingTriggerUnion, + ServiceScalingTriggerKind, + AveragePartitionLoadScalingTrigger, + AverageServiceLoadScalingTrigger, + ServiceUpdateParameters, + ApplicationTypeVersionResource, + ApplicationTypeVersionResourceProperties, + ApplicationTypeVersionUpdateParameters, + ApplicationTypeResource, + ApplicationTypeResourceProperties, + ApplicationTypeUpdateParameters, + ApplicationResource, + ApplicationResourceProperties, + ApplicationUpgradePolicy, + ApplicationHealthPolicy, + ServiceTypeHealthPolicy, + RollingUpgradeMonitoringPolicy, + FailureAction, + RollingUpgradeMode, + ApplicationUserAssignedIdentity, + ManagedIdentity, + ManagedIdentityType, + UserAssignedIdentity, + ApplicationUpdateParameters, + RuntimeResumeApplicationUpgradeParameters, + Operation, + OperationDisplay, + Origin, + ActionType, + Environment, + KnownVersions, +} from "./models.js"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts deleted file mode 100644 index df03057f06c7..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/mappers.ts +++ /dev/null @@ -1,4491 +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 ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - 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", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { 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 ErrorModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModelError", - }, - }, - }, - }, -}; - -export const ErrorModelError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorModelError", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationTypeUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationTypeUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ApplicationTypeResourceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationTypeResourceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationTypeResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationTypeVersionUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ApplicationTypeVersionUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, - }; - -export const ApplicationTypeVersionResourceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationTypeVersionResourceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationTypeVersionResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RuntimeResumeApplicationUpgradeParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RuntimeResumeApplicationUpgradeParameters", - modelProperties: { - upgradeDomainName: { - serializedName: "upgradeDomainName", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ManagedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "None", - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - ], - }, - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" }, - }, - }, - }, - }, - }, -}; - -export const UserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationUpgradePolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationUpgradePolicy", - modelProperties: { - applicationHealthPolicy: { - serializedName: "applicationHealthPolicy", - type: { - name: "Composite", - className: "ApplicationHealthPolicy", - }, - }, - forceRestart: { - defaultValue: false, - serializedName: "forceRestart", - type: { - name: "Boolean", - }, - }, - rollingUpgradeMonitoringPolicy: { - serializedName: "rollingUpgradeMonitoringPolicy", - type: { - name: "Composite", - className: "RollingUpgradeMonitoringPolicy", - }, - }, - instanceCloseDelayDuration: { - serializedName: "instanceCloseDelayDuration", - type: { - name: "Number", - }, - }, - upgradeMode: { - serializedName: "upgradeMode", - type: { - name: "String", - }, - }, - upgradeReplicaSetCheckTimeout: { - serializedName: "upgradeReplicaSetCheckTimeout", - type: { - name: "Number", - }, - }, - recreateApplication: { - serializedName: "recreateApplication", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ApplicationHealthPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationHealthPolicy", - modelProperties: { - considerWarningAsError: { - serializedName: "considerWarningAsError", - required: true, - type: { - name: "Boolean", - }, - }, - maxPercentUnhealthyDeployedApplications: { - serializedName: "maxPercentUnhealthyDeployedApplications", - required: true, - type: { - name: "Number", - }, - }, - defaultServiceTypeHealthPolicy: { - serializedName: "defaultServiceTypeHealthPolicy", - type: { - name: "Composite", - className: "ServiceTypeHealthPolicy", - }, - }, - serviceTypeHealthPolicyMap: { - serializedName: "serviceTypeHealthPolicyMap", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ServiceTypeHealthPolicy" }, - }, - }, - }, - }, - }, -}; - -export const ServiceTypeHealthPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceTypeHealthPolicy", - modelProperties: { - maxPercentUnhealthyServices: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentUnhealthyServices", - required: true, - type: { - name: "Number", - }, - }, - maxPercentUnhealthyPartitionsPerService: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentUnhealthyPartitionsPerService", - required: true, - type: { - name: "Number", - }, - }, - maxPercentUnhealthyReplicasPerPartition: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentUnhealthyReplicasPerPartition", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const RollingUpgradeMonitoringPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RollingUpgradeMonitoringPolicy", - modelProperties: { - failureAction: { - serializedName: "failureAction", - required: true, - type: { - name: "String", - }, - }, - healthCheckWaitDuration: { - serializedName: "healthCheckWaitDuration", - required: true, - type: { - name: "String", - }, - }, - healthCheckStableDuration: { - serializedName: "healthCheckStableDuration", - required: true, - type: { - name: "String", - }, - }, - healthCheckRetryTimeout: { - serializedName: "healthCheckRetryTimeout", - required: true, - type: { - name: "String", - }, - }, - upgradeTimeout: { - serializedName: "upgradeTimeout", - required: true, - type: { - name: "String", - }, - }, - upgradeDomainTimeout: { - serializedName: "upgradeDomainTimeout", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationUserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationUserAssignedIdentity", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - principalId: { - serializedName: "principalId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ApplicationResourceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationResourceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Partition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Partition", - uberParent: "Partition", - polymorphicDiscriminator: { - serializedName: "partitionScheme", - clientName: "partitionScheme", - }, - modelProperties: { - partitionScheme: { - serializedName: "partitionScheme", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceResourcePropertiesBase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceResourcePropertiesBase", - modelProperties: { - placementConstraints: { - serializedName: "placementConstraints", - type: { - name: "String", - }, - }, - correlationScheme: { - serializedName: "correlationScheme", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceCorrelation", - }, - }, - }, - }, - serviceLoadMetrics: { - serializedName: "serviceLoadMetrics", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceLoadMetric", - }, - }, - }, - }, - servicePlacementPolicies: { - serializedName: "servicePlacementPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServicePlacementPolicy", - }, - }, - }, - }, - defaultMoveCost: { - serializedName: "defaultMoveCost", - type: { - name: "String", - }, - }, - scalingPolicies: { - serializedName: "scalingPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScalingPolicy", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceCorrelation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceCorrelation", - modelProperties: { - scheme: { - serializedName: "scheme", - required: true, - type: { - name: "String", - }, - }, - serviceName: { - serializedName: "serviceName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceLoadMetric: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceLoadMetric", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - weight: { - serializedName: "weight", - type: { - name: "String", - }, - }, - primaryDefaultLoad: { - serializedName: "primaryDefaultLoad", - type: { - name: "Number", - }, - }, - secondaryDefaultLoad: { - serializedName: "secondaryDefaultLoad", - type: { - name: "Number", - }, - }, - defaultLoad: { - serializedName: "defaultLoad", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ServicePlacementPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServicePlacementPolicy", - uberParent: "ServicePlacementPolicy", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type", - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScalingPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScalingPolicy", - modelProperties: { - scalingMechanism: { - serializedName: "scalingMechanism", - type: { - name: "Composite", - className: "ScalingMechanism", - }, - }, - scalingTrigger: { - serializedName: "scalingTrigger", - type: { - name: "Composite", - className: "ScalingTrigger", - }, - }, - }, - }, -}; - -export const ScalingMechanism: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScalingMechanism", - uberParent: "ScalingMechanism", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, - modelProperties: { - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ScalingTrigger: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScalingTrigger", - uberParent: "ScalingTrigger", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, - modelProperties: { - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ServiceResourceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceResourceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedClusterListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedCluster", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancingRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancingRule", - modelProperties: { - frontendPort: { - constraints: { - InclusiveMaximum: 65534, - InclusiveMinimum: 1, - }, - serializedName: "frontendPort", - required: true, - type: { - name: "Number", - }, - }, - backendPort: { - constraints: { - InclusiveMaximum: 65534, - InclusiveMinimum: 1, - }, - serializedName: "backendPort", - required: true, - type: { - name: "Number", - }, - }, - protocol: { - serializedName: "protocol", - required: true, - type: { - name: "String", - }, - }, - probePort: { - constraints: { - InclusiveMaximum: 65534, - InclusiveMinimum: 1, - }, - serializedName: "probePort", - type: { - name: "Number", - }, - }, - probeProtocol: { - serializedName: "probeProtocol", - required: true, - type: { - name: "String", - }, - }, - probeRequestPath: { - serializedName: "probeRequestPath", - type: { - name: "String", - }, - }, - loadDistribution: { - serializedName: "loadDistribution", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkSecurityRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkSecurityRule", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - required: true, - type: { - name: "String", - }, - }, - sourceAddressPrefixes: { - serializedName: "sourceAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationAddressPrefixes: { - serializedName: "destinationAddressPrefixes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourcePortRanges: { - serializedName: "sourcePortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - destinationPortRanges: { - serializedName: "destinationPortRanges", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - sourceAddressPrefix: { - serializedName: "sourceAddressPrefix", - type: { - name: "String", - }, - }, - destinationAddressPrefix: { - serializedName: "destinationAddressPrefix", - type: { - name: "String", - }, - }, - sourcePortRange: { - serializedName: "sourcePortRange", - type: { - name: "String", - }, - }, - destinationPortRange: { - serializedName: "destinationPortRange", - type: { - name: "String", - }, - }, - access: { - serializedName: "access", - required: true, - type: { - name: "String", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 3000, - InclusiveMinimum: 1000, - }, - serializedName: "priority", - required: true, - type: { - name: "Number", - }, - }, - direction: { - serializedName: "direction", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClientCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClientCertificate", - modelProperties: { - isAdmin: { - serializedName: "isAdmin", - required: true, - type: { - name: "Boolean", - }, - }, - thumbprint: { - serializedName: "thumbprint", - type: { - name: "String", - }, - }, - commonName: { - serializedName: "commonName", - type: { - name: "String", - }, - }, - issuerThumbprint: { - serializedName: "issuerThumbprint", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AzureActiveDirectory: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureActiveDirectory", - modelProperties: { - tenantId: { - serializedName: "tenantId", - type: { - name: "String", - }, - }, - clusterApplication: { - serializedName: "clusterApplication", - type: { - name: "String", - }, - }, - clientApplication: { - serializedName: "clientApplication", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SettingsSectionDescription: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SettingsSectionDescription", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - parameters: { - serializedName: "parameters", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SettingsParameterDescription", - }, - }, - }, - }, - }, - }, -}; - -export const SettingsParameterDescription: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SettingsParameterDescription", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationTypeVersionsCleanupPolicy: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ApplicationTypeVersionsCleanupPolicy", - modelProperties: { - maxUnusedVersionsToKeep: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "maxUnusedVersionsToKeep", - required: true, - type: { - name: "Number", - }, - }, - }, - }, - }; - -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 Subnet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Subnet", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - enableIpv6: { - serializedName: "enableIpv6", - type: { - name: "Boolean", - }, - }, - privateEndpointNetworkPolicies: { - serializedName: "privateEndpointNetworkPolicies", - type: { - name: "String", - }, - }, - privateLinkServiceNetworkPolicies: { - serializedName: "privateLinkServiceNetworkPolicies", - type: { - name: "String", - }, - }, - networkSecurityGroupId: { - serializedName: "networkSecurityGroupId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServiceEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceEndpoint", - modelProperties: { - service: { - serializedName: "service", - required: true, - type: { - name: "String", - }, - }, - locations: { - serializedName: "locations", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ClusterUpgradePolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradePolicy", - modelProperties: { - forceRestart: { - serializedName: "forceRestart", - type: { - name: "Boolean", - }, - }, - healthPolicy: { - serializedName: "healthPolicy", - type: { - name: "Composite", - className: "ClusterHealthPolicy", - }, - }, - deltaHealthPolicy: { - serializedName: "deltaHealthPolicy", - type: { - name: "Composite", - className: "ClusterUpgradeDeltaHealthPolicy", - }, - }, - monitoringPolicy: { - serializedName: "monitoringPolicy", - type: { - name: "Composite", - className: "ClusterMonitoringPolicy", - }, - }, - upgradeReplicaSetCheckTimeout: { - serializedName: "upgradeReplicaSetCheckTimeout", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClusterHealthPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterHealthPolicy", - modelProperties: { - maxPercentUnhealthyNodes: { - defaultValue: 0, - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentUnhealthyNodes", - required: true, - type: { - name: "Number", - }, - }, - maxPercentUnhealthyApplications: { - defaultValue: 0, - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentUnhealthyApplications", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ClusterUpgradeDeltaHealthPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterUpgradeDeltaHealthPolicy", - modelProperties: { - maxPercentDeltaUnhealthyNodes: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentDeltaUnhealthyNodes", - required: true, - type: { - name: "Number", - }, - }, - maxPercentUpgradeDomainDeltaUnhealthyNodes: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentUpgradeDomainDeltaUnhealthyNodes", - type: { - name: "Number", - }, - }, - maxPercentDeltaUnhealthyApplications: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "maxPercentDeltaUnhealthyApplications", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ClusterMonitoringPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterMonitoringPolicy", - modelProperties: { - healthCheckWaitDuration: { - serializedName: "healthCheckWaitDuration", - required: true, - type: { - name: "String", - }, - }, - healthCheckStableDuration: { - serializedName: "healthCheckStableDuration", - required: true, - type: { - name: "String", - }, - }, - healthCheckRetryTimeout: { - serializedName: "healthCheckRetryTimeout", - required: true, - type: { - name: "String", - }, - }, - upgradeTimeout: { - serializedName: "upgradeTimeout", - required: true, - type: { - name: "String", - }, - }, - upgradeDomainTimeout: { - serializedName: "upgradeDomainTimeout", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Sku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - serializedName: "name", - required: true, - 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", - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const ManagedClusterUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ManagedAzResiliencyStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedAzResiliencyStatus", - modelProperties: { - baseResourceStatus: { - serializedName: "baseResourceStatus", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceAzStatus", - }, - }, - }, - }, - isClusterZoneResilient: { - serializedName: "isClusterZoneResilient", - readOnly: true, - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ResourceAzStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAzStatus", - modelProperties: { - resourceName: { - serializedName: "resourceName", - readOnly: true, - type: { - name: "String", - }, - }, - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String", - }, - }, - isZoneResilient: { - serializedName: "isZoneResilient", - readOnly: true, - type: { - name: "Boolean", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedMaintenanceWindowStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedMaintenanceWindowStatus", - modelProperties: { - isWindowEnabled: { - serializedName: "isWindowEnabled", - readOnly: true, - type: { - name: "Boolean", - }, - }, - isRegionReady: { - serializedName: "isRegionReady", - readOnly: true, - type: { - name: "Boolean", - }, - }, - isWindowActive: { - serializedName: "isWindowActive", - readOnly: true, - type: { - name: "Boolean", - }, - }, - canApplyUpdates: { - serializedName: "canApplyUpdates", - readOnly: true, - type: { - name: "Boolean", - }, - }, - lastWindowStatusUpdateAtUTC: { - serializedName: "lastWindowStatusUpdateAtUTC", - readOnly: true, - type: { - name: "DateTime", - }, - }, - lastWindowStartTimeUTC: { - serializedName: "lastWindowStartTimeUTC", - readOnly: true, - type: { - name: "DateTime", - }, - }, - lastWindowEndTimeUTC: { - serializedName: "lastWindowEndTimeUTC", - readOnly: true, - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const ManagedClusterCodeVersionResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterCodeVersionResult", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - clusterCodeVersion: { - serializedName: "properties.clusterCodeVersion", - type: { - name: "String", - }, - }, - supportExpiryUtc: { - serializedName: "properties.supportExpiryUtc", - type: { - name: "String", - }, - }, - osType: { - serializedName: "properties.osType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedVMSizesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedVMSizesResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedVMSize", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedVMSize: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedVMSize", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VMSize", - }, - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VMSize: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMSize", - modelProperties: { - size: { - serializedName: "size", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LongRunningOperationResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LongRunningOperationResult", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime", - }, - }, - percentComplete: { - serializedName: "percentComplete", - type: { - name: "Number", - }, - }, - status: { - serializedName: "status", - type: { - name: "String", - }, - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModelError", - }, - }, - }, - }, -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationResult", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - isDataAction: { - serializedName: "isDataAction", - type: { - name: "Boolean", - }, - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "AvailableOperationDisplay", - }, - }, - origin: { - serializedName: "origin", - type: { - name: "String", - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableOperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableOperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypeListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NodeType", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EndpointRangeDescription: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EndpointRangeDescription", - modelProperties: { - startPort: { - serializedName: "startPort", - required: true, - type: { - name: "Number", - }, - }, - endPort: { - serializedName: "endPort", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VaultSecretGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VaultSecretGroup", - modelProperties: { - sourceVault: { - serializedName: "sourceVault", - type: { - name: "Composite", - className: "SubResource", - }, - }, - vaultCertificates: { - serializedName: "vaultCertificates", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VaultCertificate", - }, - }, - }, - }, - }, - }, -}; - -export const SubResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubResource", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VaultCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VaultCertificate", - modelProperties: { - certificateUrl: { - serializedName: "certificateUrl", - required: true, - type: { - name: "String", - }, - }, - certificateStore: { - serializedName: "certificateStore", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmssExtension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmssExtension", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - publisher: { - serializedName: "properties.publisher", - required: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "properties.type", - required: true, - type: { - name: "String", - }, - }, - typeHandlerVersion: { - serializedName: "properties.typeHandlerVersion", - required: true, - type: { - name: "String", - }, - }, - autoUpgradeMinorVersion: { - serializedName: "properties.autoUpgradeMinorVersion", - type: { - name: "Boolean", - }, - }, - settings: { - serializedName: "properties.settings", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - protectedSettings: { - serializedName: "properties.protectedSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - forceUpdateTag: { - serializedName: "properties.forceUpdateTag", - type: { - name: "String", - }, - }, - provisionAfterExtensions: { - serializedName: "properties.provisionAfterExtensions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - enableAutomaticUpgrade: { - serializedName: "properties.enableAutomaticUpgrade", - type: { - name: "Boolean", - }, - }, - setupOrder: { - serializedName: "properties.setupOrder", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const VmManagedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmManagedIdentity", - modelProperties: { - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const FrontendConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FrontendConfiguration", - modelProperties: { - ipAddressType: { - defaultValue: "IPv4", - serializedName: "ipAddressType", - type: { - name: "String", - }, - }, - loadBalancerBackendAddressPoolId: { - serializedName: "loadBalancerBackendAddressPoolId", - type: { - name: "String", - }, - }, - loadBalancerInboundNatPoolId: { - serializedName: "loadBalancerInboundNatPoolId", - type: { - name: "String", - }, - }, - applicationGatewayBackendAddressPoolId: { - serializedName: "applicationGatewayBackendAddressPoolId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VmssDataDisk: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmssDataDisk", - modelProperties: { - lun: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "lun", - required: true, - type: { - name: "Number", - }, - }, - diskSizeGB: { - serializedName: "diskSizeGB", - required: true, - type: { - name: "Number", - }, - }, - diskType: { - defaultValue: "StandardSSD_LRS", - serializedName: "diskType", - required: true, - type: { - name: "String", - }, - }, - diskLetter: { - constraints: { - Pattern: new RegExp("^[a-zA-Z]{1}$"), - }, - serializedName: "diskLetter", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypeNatConfig: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeNatConfig", - modelProperties: { - backendPort: { - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1, - }, - serializedName: "backendPort", - type: { - name: "Number", - }, - }, - frontendPortRangeStart: { - constraints: { - InclusiveMaximum: 65534, - InclusiveMinimum: 1, - }, - serializedName: "frontendPortRangeStart", - type: { - name: "Number", - }, - }, - frontendPortRangeEnd: { - constraints: { - InclusiveMaximum: 65534, - InclusiveMinimum: 1, - }, - serializedName: "frontendPortRangeEnd", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const VmImagePlan: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmImagePlan", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - product: { - serializedName: "product", - type: { - name: "String", - }, - }, - promotionCode: { - serializedName: "promotionCode", - type: { - name: "String", - }, - }, - publisher: { - serializedName: "publisher", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdditionalNetworkInterfaceConfiguration: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "AdditionalNetworkInterfaceConfiguration", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - enableAcceleratedNetworking: { - serializedName: "enableAcceleratedNetworking", - type: { - name: "Boolean", - }, - }, - dscpConfiguration: { - serializedName: "dscpConfiguration", - type: { - name: "Composite", - className: "SubResource", - }, - }, - ipConfigurations: { - serializedName: "ipConfigurations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpConfiguration", - }, - }, - }, - }, - }, - }, - }; - -export const IpConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IpConfiguration", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - applicationGatewayBackendAddressPools: { - serializedName: "applicationGatewayBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - loadBalancerBackendAddressPools: { - serializedName: "loadBalancerBackendAddressPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - loadBalancerInboundNatPools: { - serializedName: "loadBalancerInboundNatPools", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubResource", - }, - }, - }, - }, - subnet: { - serializedName: "subnet", - type: { - name: "Composite", - className: "SubResource", - }, - }, - privateIPAddressVersion: { - defaultValue: "IPv4", - serializedName: "privateIPAddressVersion", - type: { - name: "String", - }, - }, - publicIPAddressConfiguration: { - serializedName: "publicIPAddressConfiguration", - type: { - name: "Composite", - className: "IpConfigurationPublicIPAddressConfiguration", - }, - }, - }, - }, -}; - -export const IpConfigurationPublicIPAddressConfiguration: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "IpConfigurationPublicIPAddressConfiguration", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - ipTags: { - serializedName: "ipTags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpTag", - }, - }, - }, - }, - publicIPAddressVersion: { - defaultValue: "IPv4", - serializedName: "publicIPAddressVersion", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const VmApplication: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VmApplication", - modelProperties: { - configurationReference: { - serializedName: "configurationReference", - type: { - name: "String", - }, - }, - enableAutomaticUpgrade: { - serializedName: "enableAutomaticUpgrade", - type: { - name: "Boolean", - }, - }, - order: { - serializedName: "order", - type: { - name: "Number", - }, - }, - packageReferenceId: { - serializedName: "packageReferenceId", - required: true, - type: { - name: "String", - }, - }, - vmGalleryTags: { - serializedName: "vmGalleryTags", - type: { - name: "String", - }, - }, - treatFailureAsDeploymentFailure: { - serializedName: "treatFailureAsDeploymentFailure", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NodeTypeSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - type: { - name: "String", - }, - }, - capacity: { - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: 1, - }, - serializedName: "capacity", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ManagedProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedProxyResource", - 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", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const NodeTypeActionParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeActionParameters", - modelProperties: { - nodes: { - serializedName: "nodes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - force: { - serializedName: "force", - type: { - name: "Boolean", - }, - }, - updateType: { - serializedName: "updateType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypeListSkuResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeListSkuResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NodeTypeAvailableSku", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypeAvailableSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeAvailableSku", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "NodeTypeSupportedSku", - }, - }, - capacity: { - serializedName: "capacity", - type: { - name: "Composite", - className: "NodeTypeSkuCapacity", - }, - }, - }, - }, -}; - -export const NodeTypeSupportedSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeSupportedSku", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypeSkuCapacity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - type: { - name: "Number", - }, - }, - maximum: { - serializedName: "maximum", - readOnly: true, - type: { - name: "Number", - }, - }, - default: { - serializedName: "default", - readOnly: true, - type: { - name: "Number", - }, - }, - scaleType: { - defaultValue: "None", - serializedName: "scaleType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypeUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypeUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "NodeTypeSku", - }, - }, - }, - }, -}; - -export const ApplicationTypeResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationTypeResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationTypeVersionResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationTypeVersionResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - appPackageUrl: { - serializedName: "properties.appPackageUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedIdentity", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - version: { - serializedName: "properties.version", - type: { - name: "String", - }, - }, - parameters: { - serializedName: "properties.parameters", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - upgradePolicy: { - serializedName: "properties.upgradePolicy", - type: { - name: "Composite", - className: "ApplicationUpgradePolicy", - }, - }, - managedIdentities: { - serializedName: "properties.managedIdentities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationUserAssignedIdentity", - }, - }, - }, - }, - }, - }, -}; - -export const ServiceResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ServiceResourceProperties", - }, - }, - }, - }, -}; - -export const NamedPartitionScheme: coreClient.CompositeMapper = { - serializedName: "Named", - type: { - name: "Composite", - className: "NamedPartitionScheme", - uberParent: "Partition", - polymorphicDiscriminator: Partition.type.polymorphicDiscriminator, - modelProperties: { - ...Partition.type.modelProperties, - names: { - serializedName: "names", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const SingletonPartitionScheme: coreClient.CompositeMapper = { - serializedName: "Singleton", - type: { - name: "Composite", - className: "SingletonPartitionScheme", - uberParent: "Partition", - polymorphicDiscriminator: Partition.type.polymorphicDiscriminator, - modelProperties: { - ...Partition.type.modelProperties, - }, - }, -}; - -export const UniformInt64RangePartitionScheme: coreClient.CompositeMapper = { - serializedName: "UniformInt64Range", - type: { - name: "Composite", - className: "UniformInt64RangePartitionScheme", - uberParent: "Partition", - polymorphicDiscriminator: Partition.type.polymorphicDiscriminator, - modelProperties: { - ...Partition.type.modelProperties, - count: { - serializedName: "count", - required: true, - type: { - name: "Number", - }, - }, - lowKey: { - serializedName: "lowKey", - required: true, - type: { - name: "Number", - }, - }, - highKey: { - serializedName: "highKey", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ServiceResourceProperties: coreClient.CompositeMapper = { - serializedName: "ServiceResourceProperties", - type: { - name: "Composite", - className: "ServiceResourceProperties", - uberParent: "ServiceResourcePropertiesBase", - polymorphicDiscriminator: { - serializedName: "serviceKind", - clientName: "serviceKind", - }, - modelProperties: { - ...ServiceResourcePropertiesBase.type.modelProperties, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - serviceKind: { - serializedName: "serviceKind", - required: true, - type: { - name: "String", - }, - }, - serviceTypeName: { - serializedName: "serviceTypeName", - required: true, - type: { - name: "String", - }, - }, - partitionDescription: { - serializedName: "partitionDescription", - type: { - name: "Composite", - className: "Partition", - }, - }, - servicePackageActivationMode: { - serializedName: "servicePackageActivationMode", - type: { - name: "String", - }, - }, - serviceDnsName: { - serializedName: "serviceDnsName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServicePlacementInvalidDomainPolicy: coreClient.CompositeMapper = { - serializedName: "InvalidDomain", - type: { - name: "Composite", - className: "ServicePlacementInvalidDomainPolicy", - uberParent: "ServicePlacementPolicy", - polymorphicDiscriminator: - ServicePlacementPolicy.type.polymorphicDiscriminator, - modelProperties: { - ...ServicePlacementPolicy.type.modelProperties, - domainName: { - serializedName: "domainName", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServicePlacementNonPartiallyPlaceServicePolicy: coreClient.CompositeMapper = - { - serializedName: "NonPartiallyPlaceService", - type: { - name: "Composite", - className: "ServicePlacementNonPartiallyPlaceServicePolicy", - uberParent: "ServicePlacementPolicy", - polymorphicDiscriminator: - ServicePlacementPolicy.type.polymorphicDiscriminator, - modelProperties: { - ...ServicePlacementPolicy.type.modelProperties, - }, - }, - }; - -export const ServicePlacementPreferPrimaryDomainPolicy: coreClient.CompositeMapper = - { - serializedName: "PreferredPrimaryDomain", - type: { - name: "Composite", - className: "ServicePlacementPreferPrimaryDomainPolicy", - uberParent: "ServicePlacementPolicy", - polymorphicDiscriminator: - ServicePlacementPolicy.type.polymorphicDiscriminator, - modelProperties: { - ...ServicePlacementPolicy.type.modelProperties, - domainName: { - serializedName: "domainName", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ServicePlacementRequiredDomainPolicy: coreClient.CompositeMapper = - { - serializedName: "RequiredDomain", - type: { - name: "Composite", - className: "ServicePlacementRequiredDomainPolicy", - uberParent: "ServicePlacementPolicy", - polymorphicDiscriminator: - ServicePlacementPolicy.type.polymorphicDiscriminator, - modelProperties: { - ...ServicePlacementPolicy.type.modelProperties, - domainName: { - serializedName: "domainName", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ServicePlacementRequireDomainDistributionPolicy: coreClient.CompositeMapper = - { - serializedName: "RequiredDomainDistribution", - type: { - name: "Composite", - className: "ServicePlacementRequireDomainDistributionPolicy", - uberParent: "ServicePlacementPolicy", - polymorphicDiscriminator: - ServicePlacementPolicy.type.polymorphicDiscriminator, - modelProperties: { - ...ServicePlacementPolicy.type.modelProperties, - domainName: { - serializedName: "domainName", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AddRemoveIncrementalNamedPartitionScalingMechanism: coreClient.CompositeMapper = - { - serializedName: "AddRemoveIncrementalNamedPartition", - type: { - name: "Composite", - className: "AddRemoveIncrementalNamedPartitionScalingMechanism", - uberParent: "ScalingMechanism", - polymorphicDiscriminator: ScalingMechanism.type.polymorphicDiscriminator, - modelProperties: { - ...ScalingMechanism.type.modelProperties, - minPartitionCount: { - serializedName: "minPartitionCount", - required: true, - type: { - name: "Number", - }, - }, - maxPartitionCount: { - serializedName: "maxPartitionCount", - required: true, - type: { - name: "Number", - }, - }, - scaleIncrement: { - serializedName: "scaleIncrement", - required: true, - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const PartitionInstanceCountScaleMechanism: coreClient.CompositeMapper = - { - serializedName: "ScalePartitionInstanceCount", - type: { - name: "Composite", - className: "PartitionInstanceCountScaleMechanism", - uberParent: "ScalingMechanism", - polymorphicDiscriminator: ScalingMechanism.type.polymorphicDiscriminator, - modelProperties: { - ...ScalingMechanism.type.modelProperties, - minInstanceCount: { - serializedName: "minInstanceCount", - required: true, - type: { - name: "Number", - }, - }, - maxInstanceCount: { - serializedName: "maxInstanceCount", - required: true, - type: { - name: "Number", - }, - }, - scaleIncrement: { - serializedName: "scaleIncrement", - required: true, - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const AveragePartitionLoadScalingTrigger: coreClient.CompositeMapper = { - serializedName: "AveragePartitionLoadTrigger", - type: { - name: "Composite", - className: "AveragePartitionLoadScalingTrigger", - uberParent: "ScalingTrigger", - polymorphicDiscriminator: ScalingTrigger.type.polymorphicDiscriminator, - modelProperties: { - ...ScalingTrigger.type.modelProperties, - metricName: { - serializedName: "metricName", - required: true, - type: { - name: "String", - }, - }, - lowerLoadThreshold: { - serializedName: "lowerLoadThreshold", - required: true, - type: { - name: "Number", - }, - }, - upperLoadThreshold: { - serializedName: "upperLoadThreshold", - required: true, - type: { - name: "Number", - }, - }, - scaleInterval: { - serializedName: "scaleInterval", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AverageServiceLoadScalingTrigger: coreClient.CompositeMapper = { - serializedName: "AverageServiceLoadTrigger", - type: { - name: "Composite", - className: "AverageServiceLoadScalingTrigger", - uberParent: "ScalingTrigger", - polymorphicDiscriminator: ScalingTrigger.type.polymorphicDiscriminator, - modelProperties: { - ...ScalingTrigger.type.modelProperties, - metricName: { - serializedName: "metricName", - required: true, - type: { - name: "String", - }, - }, - lowerLoadThreshold: { - serializedName: "lowerLoadThreshold", - required: true, - type: { - name: "Number", - }, - }, - upperLoadThreshold: { - serializedName: "upperLoadThreshold", - required: true, - type: { - name: "Number", - }, - }, - scaleInterval: { - serializedName: "scaleInterval", - required: true, - type: { - name: "String", - }, - }, - useOnlyPrimaryLoad: { - serializedName: "useOnlyPrimaryLoad", - required: true, - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ManagedCluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedCluster", - modelProperties: { - ...Resource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku", - }, - }, - dnsName: { - serializedName: "properties.dnsName", - type: { - name: "String", - }, - }, - fqdn: { - serializedName: "properties.fqdn", - readOnly: true, - type: { - name: "String", - }, - }, - ipv4Address: { - serializedName: "properties.ipv4Address", - readOnly: true, - type: { - name: "String", - }, - }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, - type: { - name: "String", - }, - }, - clusterState: { - serializedName: "properties.clusterState", - readOnly: true, - type: { - name: "String", - }, - }, - clusterCertificateThumbprints: { - serializedName: "properties.clusterCertificateThumbprints", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clientConnectionPort: { - defaultValue: 19000, - serializedName: "properties.clientConnectionPort", - type: { - name: "Number", - }, - }, - httpGatewayConnectionPort: { - defaultValue: 19080, - serializedName: "properties.httpGatewayConnectionPort", - type: { - name: "Number", - }, - }, - adminUserName: { - serializedName: "properties.adminUserName", - type: { - name: "String", - }, - }, - adminPassword: { - serializedName: "properties.adminPassword", - type: { - name: "String", - }, - }, - loadBalancingRules: { - serializedName: "properties.loadBalancingRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoadBalancingRule", - }, - }, - }, - }, - allowRdpAccess: { - serializedName: "properties.allowRdpAccess", - type: { - name: "Boolean", - }, - }, - networkSecurityRules: { - serializedName: "properties.networkSecurityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkSecurityRule", - }, - }, - }, - }, - clients: { - serializedName: "properties.clients", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClientCertificate", - }, - }, - }, - }, - azureActiveDirectory: { - serializedName: "properties.azureActiveDirectory", - type: { - name: "Composite", - className: "AzureActiveDirectory", - }, - }, - fabricSettings: { - serializedName: "properties.fabricSettings", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SettingsSectionDescription", - }, - }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - clusterCodeVersion: { - serializedName: "properties.clusterCodeVersion", - type: { - name: "String", - }, - }, - clusterUpgradeMode: { - defaultValue: "Automatic", - serializedName: "properties.clusterUpgradeMode", - type: { - name: "String", - }, - }, - clusterUpgradeCadence: { - serializedName: "properties.clusterUpgradeCadence", - type: { - name: "String", - }, - }, - addonFeatures: { - serializedName: "properties.addonFeatures", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - enableAutoOSUpgrade: { - serializedName: "properties.enableAutoOSUpgrade", - type: { - name: "Boolean", - }, - }, - zonalResiliency: { - defaultValue: false, - serializedName: "properties.zonalResiliency", - type: { - name: "Boolean", - }, - }, - applicationTypeVersionsCleanupPolicy: { - serializedName: "properties.applicationTypeVersionsCleanupPolicy", - type: { - name: "Composite", - className: "ApplicationTypeVersionsCleanupPolicy", - }, - }, - enableIpv6: { - serializedName: "properties.enableIpv6", - type: { - name: "Boolean", - }, - }, - subnetId: { - serializedName: "properties.subnetId", - type: { - name: "String", - }, - }, - ipTags: { - serializedName: "properties.ipTags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpTag", - }, - }, - }, - }, - ipv6Address: { - serializedName: "properties.ipv6Address", - readOnly: true, - type: { - name: "String", - }, - }, - enableServicePublicIP: { - serializedName: "properties.enableServicePublicIP", - type: { - name: "Boolean", - }, - }, - auxiliarySubnets: { - serializedName: "properties.auxiliarySubnets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Subnet", - }, - }, - }, - }, - serviceEndpoints: { - serializedName: "properties.serviceEndpoints", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceEndpoint", - }, - }, - }, - }, - zonalUpdateMode: { - serializedName: "properties.zonalUpdateMode", - type: { - name: "String", - }, - }, - useCustomVnet: { - serializedName: "properties.useCustomVnet", - type: { - name: "Boolean", - }, - }, - publicIPPrefixId: { - serializedName: "properties.publicIPPrefixId", - type: { - name: "String", - }, - }, - publicIPv6PrefixId: { - serializedName: "properties.publicIPv6PrefixId", - type: { - name: "String", - }, - }, - ddosProtectionPlanId: { - serializedName: "properties.ddosProtectionPlanId", - type: { - name: "String", - }, - }, - upgradeDescription: { - serializedName: "properties.upgradeDescription", - type: { - name: "Composite", - className: "ClusterUpgradePolicy", - }, - }, - httpGatewayTokenAuthConnectionPort: { - serializedName: "properties.httpGatewayTokenAuthConnectionPort", - type: { - name: "Number", - }, - }, - enableHttpGatewayExclusiveAuthMode: { - serializedName: "properties.enableHttpGatewayExclusiveAuthMode", - type: { - name: "Boolean", - }, - }, - autoGeneratedDomainNameLabelScope: { - serializedName: "properties.autoGeneratedDomainNameLabelScope", - type: { - name: "String", - }, - }, - allocatedOutboundPorts: { - serializedName: "properties.allocatedOutboundPorts", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const NodeType: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeType", - modelProperties: { - ...ManagedProxyResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "NodeTypeSku", - }, - }, - isPrimary: { - serializedName: "properties.isPrimary", - type: { - name: "Boolean", - }, - }, - vmInstanceCount: { - constraints: { - InclusiveMaximum: 2147483647, - InclusiveMinimum: -1, - }, - serializedName: "properties.vmInstanceCount", - type: { - name: "Number", - }, - }, - dataDiskSizeGB: { - serializedName: "properties.dataDiskSizeGB", - type: { - name: "Number", - }, - }, - dataDiskType: { - defaultValue: "StandardSSD_LRS", - serializedName: "properties.dataDiskType", - type: { - name: "String", - }, - }, - dataDiskLetter: { - constraints: { - Pattern: new RegExp("^[a-zA-Z]{1}$"), - }, - serializedName: "properties.dataDiskLetter", - type: { - name: "String", - }, - }, - placementProperties: { - serializedName: "properties.placementProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - capacities: { - serializedName: "properties.capacities", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - applicationPorts: { - serializedName: "properties.applicationPorts", - type: { - name: "Composite", - className: "EndpointRangeDescription", - }, - }, - ephemeralPorts: { - serializedName: "properties.ephemeralPorts", - type: { - name: "Composite", - className: "EndpointRangeDescription", - }, - }, - vmSize: { - serializedName: "properties.vmSize", - type: { - name: "String", - }, - }, - vmImagePublisher: { - serializedName: "properties.vmImagePublisher", - type: { - name: "String", - }, - }, - vmImageOffer: { - serializedName: "properties.vmImageOffer", - type: { - name: "String", - }, - }, - vmImageSku: { - serializedName: "properties.vmImageSku", - type: { - name: "String", - }, - }, - vmImageVersion: { - serializedName: "properties.vmImageVersion", - type: { - name: "String", - }, - }, - vmSecrets: { - serializedName: "properties.vmSecrets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VaultSecretGroup", - }, - }, - }, - }, - vmExtensions: { - serializedName: "properties.vmExtensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VmssExtension", - }, - }, - }, - }, - vmManagedIdentity: { - serializedName: "properties.vmManagedIdentity", - type: { - name: "Composite", - className: "VmManagedIdentity", - }, - }, - isStateless: { - defaultValue: false, - serializedName: "properties.isStateless", - type: { - name: "Boolean", - }, - }, - multiplePlacementGroups: { - defaultValue: false, - serializedName: "properties.multiplePlacementGroups", - type: { - name: "Boolean", - }, - }, - frontendConfigurations: { - serializedName: "properties.frontendConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FrontendConfiguration", - }, - }, - }, - }, - networkSecurityRules: { - serializedName: "properties.networkSecurityRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkSecurityRule", - }, - }, - }, - }, - additionalDataDisks: { - serializedName: "properties.additionalDataDisks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VmssDataDisk", - }, - }, - }, - }, - enableEncryptionAtHost: { - defaultValue: false, - serializedName: "properties.enableEncryptionAtHost", - type: { - name: "Boolean", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - enableAcceleratedNetworking: { - serializedName: "properties.enableAcceleratedNetworking", - type: { - name: "Boolean", - }, - }, - useDefaultPublicLoadBalancer: { - serializedName: "properties.useDefaultPublicLoadBalancer", - type: { - name: "Boolean", - }, - }, - useTempDataDisk: { - serializedName: "properties.useTempDataDisk", - type: { - name: "Boolean", - }, - }, - enableOverProvisioning: { - serializedName: "properties.enableOverProvisioning", - type: { - name: "Boolean", - }, - }, - zones: { - serializedName: "properties.zones", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - isSpotVM: { - serializedName: "properties.isSpotVM", - type: { - name: "Boolean", - }, - }, - hostGroupId: { - serializedName: "properties.hostGroupId", - type: { - name: "String", - }, - }, - useEphemeralOSDisk: { - serializedName: "properties.useEphemeralOSDisk", - type: { - name: "Boolean", - }, - }, - spotRestoreTimeout: { - serializedName: "properties.spotRestoreTimeout", - type: { - name: "String", - }, - }, - evictionPolicy: { - serializedName: "properties.evictionPolicy", - type: { - name: "String", - }, - }, - vmImageResourceId: { - serializedName: "properties.vmImageResourceId", - type: { - name: "String", - }, - }, - subnetId: { - serializedName: "properties.subnetId", - type: { - name: "String", - }, - }, - vmSetupActions: { - serializedName: "properties.vmSetupActions", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - securityType: { - serializedName: "properties.securityType", - type: { - name: "String", - }, - }, - secureBootEnabled: { - serializedName: "properties.secureBootEnabled", - type: { - name: "Boolean", - }, - }, - enableNodePublicIP: { - serializedName: "properties.enableNodePublicIP", - type: { - name: "Boolean", - }, - }, - enableNodePublicIPv6: { - serializedName: "properties.enableNodePublicIPv6", - type: { - name: "Boolean", - }, - }, - vmSharedGalleryImageId: { - serializedName: "properties.vmSharedGalleryImageId", - type: { - name: "String", - }, - }, - natGatewayId: { - serializedName: "properties.natGatewayId", - type: { - name: "String", - }, - }, - natConfigurations: { - serializedName: "properties.natConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NodeTypeNatConfig", - }, - }, - }, - }, - vmImagePlan: { - serializedName: "properties.vmImagePlan", - type: { - name: "Composite", - className: "VmImagePlan", - }, - }, - serviceArtifactReferenceId: { - serializedName: "properties.serviceArtifactReferenceId", - type: { - name: "String", - }, - }, - dscpConfigurationId: { - serializedName: "properties.dscpConfigurationId", - type: { - name: "String", - }, - }, - additionalNetworkInterfaceConfigurations: { - serializedName: "properties.additionalNetworkInterfaceConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalNetworkInterfaceConfiguration", - }, - }, - }, - }, - computerNamePrefix: { - serializedName: "properties.computerNamePrefix", - type: { - name: "String", - }, - }, - vmApplications: { - serializedName: "properties.vmApplications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VmApplication", - }, - }, - }, - }, - }, - }, -}; - -export const StatefulServiceProperties: coreClient.CompositeMapper = { - serializedName: "Stateful", - type: { - name: "Composite", - className: "StatefulServiceProperties", - uberParent: "ServiceResourceProperties", - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - hasPersistedState: { - serializedName: "hasPersistedState", - type: { - name: "Boolean", - }, - }, - targetReplicaSetSize: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "targetReplicaSetSize", - type: { - name: "Number", - }, - }, - minReplicaSetSize: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "minReplicaSetSize", - type: { - name: "Number", - }, - }, - replicaRestartWaitDuration: { - serializedName: "replicaRestartWaitDuration", - type: { - name: "String", - }, - }, - quorumLossWaitDuration: { - serializedName: "quorumLossWaitDuration", - type: { - name: "String", - }, - }, - standByReplicaKeepDuration: { - serializedName: "standByReplicaKeepDuration", - type: { - name: "String", - }, - }, - servicePlacementTimeLimit: { - serializedName: "servicePlacementTimeLimit", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StatelessServiceProperties: coreClient.CompositeMapper = { - serializedName: "Stateless", - type: { - name: "Composite", - className: "StatelessServiceProperties", - uberParent: "ServiceResourceProperties", - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, - modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - instanceCount: { - constraints: { - InclusiveMinimum: -1, - }, - serializedName: "instanceCount", - required: true, - type: { - name: "Number", - }, - }, - minInstanceCount: { - serializedName: "minInstanceCount", - type: { - name: "Number", - }, - }, - minInstancePercentage: { - serializedName: "minInstancePercentage", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ApplicationTypeVersionsCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ApplicationTypeVersionsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApplicationTypeVersionsDeleteHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ApplicationTypeVersionsDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApplicationsReadUpgradeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationsReadUpgradeHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationsStartRollbackHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationsStartRollbackHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationsResumeUpgradeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationsResumeUpgradeHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationsCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationsCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApplicationsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationsDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServicesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServicesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ServicesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServicesDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedClustersCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ManagedClustersCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ManagedClustersDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClustersDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationResultsGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationResultsGetHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypesRestartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypesRestartHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypesReimageHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypesReimageHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypesDeleteNodeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypesDeleteNodeHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypesCreateOrUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypesCreateOrUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypesUpdateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NodeTypesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NodeTypesDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export let discriminators = { - Partition: Partition, - ServicePlacementPolicy: ServicePlacementPolicy, - ScalingMechanism: ScalingMechanism, - ScalingTrigger: ScalingTrigger, - "Partition.Named": NamedPartitionScheme, - "Partition.Singleton": SingletonPartitionScheme, - "Partition.UniformInt64Range": UniformInt64RangePartitionScheme, - "ServiceResourcePropertiesBase.ServiceResourceProperties": - ServiceResourceProperties, - "ServicePlacementPolicy.InvalidDomain": ServicePlacementInvalidDomainPolicy, - "ServicePlacementPolicy.NonPartiallyPlaceService": - ServicePlacementNonPartiallyPlaceServicePolicy, - "ServicePlacementPolicy.PreferredPrimaryDomain": - ServicePlacementPreferPrimaryDomainPolicy, - "ServicePlacementPolicy.RequiredDomain": ServicePlacementRequiredDomainPolicy, - "ServicePlacementPolicy.RequiredDomainDistribution": - ServicePlacementRequireDomainDistributionPolicy, - "ScalingMechanism.AddRemoveIncrementalNamedPartition": - AddRemoveIncrementalNamedPartitionScalingMechanism, - "ScalingMechanism.ScalePartitionInstanceCount": - PartitionInstanceCountScaleMechanism, - "ScalingTrigger.AveragePartitionLoadTrigger": - AveragePartitionLoadScalingTrigger, - "ScalingTrigger.AverageServiceLoadTrigger": AverageServiceLoadScalingTrigger, - "ServiceResourceProperties.Stateful": StatefulServiceProperties, - "ServiceResourceProperties.Stateless": StatelessServiceProperties, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts new file mode 100644 index 000000000000..5c6653ca63c9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts @@ -0,0 +1,4681 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** Long running operation result. */ +export interface LongRunningOperationResult { + /** The name of the operation. */ + name?: string; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The completion percentage of the operation. */ + percentComplete?: number; + /** The status of the operation. */ + status?: string; + /** The operation error. */ + error?: ErrorModelError; +} + +export function longRunningOperationResultDeserializer(item: any): LongRunningOperationResult { + return { + name: item["name"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + percentComplete: item["percentComplete"], + status: item["status"], + error: !item["error"] ? item["error"] : errorModelErrorDeserializer(item["error"]), + }; +} + +/** The error details. */ +export interface ErrorModelError { + /** The error code. */ + code?: string; + /** The error message. */ + message?: string; +} + +export function errorModelErrorDeserializer(item: any): ErrorModelError { + return { + code: item["code"], + message: item["message"], + }; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: Record; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]), + }; +} + +/** model interface _ErrorAdditionalInfoInfo */ +export interface _ErrorAdditionalInfoInfo {} + +export function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo { + return item; +} + +/** Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ +export interface NodeType extends ProxyResource { + /** The node type properties */ + properties?: NodeTypeProperties; + /** Resource tags. */ + tags?: Record; + /** The node type sku. */ + sku?: NodeTypeSku; +} + +export function nodeTypeSerializer(item: NodeType): any { + return { + properties: !item["properties"] + ? item["properties"] + : nodeTypePropertiesSerializer(item["properties"]), + tags: item["tags"], + sku: !item["sku"] ? item["sku"] : nodeTypeSkuSerializer(item["sku"]), + }; +} + +export function nodeTypeDeserializer(item: any): NodeType { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : nodeTypePropertiesDeserializer(item["properties"]), + tags: item["tags"], + sku: !item["sku"] ? item["sku"] : nodeTypeSkuDeserializer(item["sku"]), + }; +} + +/** Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ +export interface NodeTypeProperties { + /** Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. */ + isPrimary: boolean; + /** The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. */ + vmInstanceCount: number; + /** Disk size for the managed disk attached to the vms on the node type in GBs. */ + dataDiskSizeGB?: number; + /** Managed data disk type. Specifies the storage account type for the managed disk */ + dataDiskType?: DiskType; + /** Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. */ + dataDiskLetter?: string; + /** The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. */ + placementProperties?: Record; + /** The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. */ + capacities?: Record; + /** The range of ports from which cluster assigned port to Service Fabric applications. */ + applicationPorts?: EndpointRangeDescription; + /** The range of ephemeral ports that nodes in this node type should be configured with. */ + ephemeralPorts?: EndpointRangeDescription; + /** The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3. */ + vmSize?: string; + /** The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. */ + vmImagePublisher?: string; + /** The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. */ + vmImageOffer?: string; + /** The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. */ + vmImageSku?: string; + /** The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. */ + vmImageVersion?: string; + /** The secrets to install in the virtual machines. */ + vmSecrets?: VaultSecretGroup[]; + /** Set of extensions that should be installed onto the virtual machines. */ + vmExtensions?: VmssExtension[]; + /** Identities to assign to the virtual machine scale set under the node type. */ + vmManagedIdentity?: VmManagedIdentity; + /** Indicates if the node type can only host Stateless workloads. */ + isStateless?: boolean; + /** Indicates if scale set associated with the node type can be composed of multiple placement groups. */ + multiplePlacementGroups?: boolean; + /** Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created. */ + frontendConfigurations?: FrontendConfiguration[]; + /** The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations. */ + networkSecurityRules?: NetworkSecurityRule[]; + /** Additional managed data disks. */ + additionalDataDisks?: VmssDataDisk[]; + /** Enable or disable the Host Encryption for the virtual machines on the node type. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource. */ + enableEncryptionAtHost?: boolean; + /** The provisioning state of the node type resource. */ + readonly provisioningState?: ManagedResourceProvisioningState; + /** Specifies whether the network interface is accelerated networking-enabled. */ + enableAcceleratedNetworking?: boolean; + /** Specifies whether the use public load balancer. If not specified and the node type doesn't have its own frontend configuration, it will be attached to the default load balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is true, then the frontend has to be an Internal Load Balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is false or not set, then the custom load balancer must include a public load balancer to provide outbound connectivity. */ + useDefaultPublicLoadBalancer?: boolean; + /** Specifies whether to use the temporary disk for the service fabric data root, in which case no managed data disk will be attached and the temporary disk will be used. It is only allowed for stateless node types. */ + useTempDataDisk?: boolean; + /** Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types. */ + enableOverProvisioning?: boolean; + /** Specifies the availability zones where the node type would span across. If the cluster is not spanning across availability zones, initiates az migration for the cluster. */ + zones?: string[]; + /** Indicates whether the node type will be Spot Virtual Machines. Azure will allocate the VMs if there is capacity available and the VMs can be evicted at any time. */ + isSpotVM?: boolean; + /** Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts. */ + hostGroupId?: string; + /** Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature. */ + useEphemeralOSDisk?: boolean; + /** Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601. */ + spotRestoreTimeout?: string; + /** Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete. */ + evictionPolicy?: EvictionPolicyType; + /** Indicates the resource id of the vm image. This parameter is used for custom vm image. */ + vmImageResourceId?: string; + /** Indicates the resource id of the subnet for the node type. */ + subnetId?: string; + /** Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. */ + vmSetupActions?: VmSetupAction[]; + /** Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported */ + securityType?: SecurityType; + /** Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType */ + secureBootEnabled?: boolean; + /** Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. */ + enableNodePublicIP?: boolean; + /** Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. */ + enableNodePublicIPv6?: boolean; + /** Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. */ + vmSharedGalleryImageId?: string; + /** Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer. */ + natGatewayId?: string; + /** Specifies the NAT configuration on default public Load Balancer for the node type. This is only supported for node types use the default public Load Balancer. */ + natConfigurations?: NodeTypeNatConfig[]; + /** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. */ + vmImagePlan?: VmImagePlan; + /** Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. */ + serviceArtifactReferenceId?: string; + /** Specifies the resource id of the DSCP configuration to apply to the node type network interface. */ + dscpConfigurationId?: string; + /** Specifies the settings for any additional secondary network interfaces to attach to the node type. */ + additionalNetworkInterfaceConfigurations?: AdditionalNetworkInterfaceConfiguration[]; + /** Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. */ + computerNamePrefix?: string; + /** Specifies the gallery applications that should be made available to the underlying VMSS. */ + vmApplications?: VmApplication[]; +} + +export function nodeTypePropertiesSerializer(item: NodeTypeProperties): any { + return { + isPrimary: item["isPrimary"], + vmInstanceCount: item["vmInstanceCount"], + dataDiskSizeGB: item["dataDiskSizeGB"], + dataDiskType: item["dataDiskType"], + dataDiskLetter: item["dataDiskLetter"], + placementProperties: item["placementProperties"], + capacities: item["capacities"], + applicationPorts: !item["applicationPorts"] + ? item["applicationPorts"] + : endpointRangeDescriptionSerializer(item["applicationPorts"]), + ephemeralPorts: !item["ephemeralPorts"] + ? item["ephemeralPorts"] + : endpointRangeDescriptionSerializer(item["ephemeralPorts"]), + vmSize: item["vmSize"], + vmImagePublisher: item["vmImagePublisher"], + vmImageOffer: item["vmImageOffer"], + vmImageSku: item["vmImageSku"], + vmImageVersion: item["vmImageVersion"], + vmSecrets: !item["vmSecrets"] + ? item["vmSecrets"] + : vaultSecretGroupArraySerializer(item["vmSecrets"]), + vmExtensions: !item["vmExtensions"] + ? item["vmExtensions"] + : vmssExtensionArraySerializer(item["vmExtensions"]), + vmManagedIdentity: !item["vmManagedIdentity"] + ? item["vmManagedIdentity"] + : vmManagedIdentitySerializer(item["vmManagedIdentity"]), + isStateless: item["isStateless"], + multiplePlacementGroups: item["multiplePlacementGroups"], + frontendConfigurations: !item["frontendConfigurations"] + ? item["frontendConfigurations"] + : frontendConfigurationArraySerializer(item["frontendConfigurations"]), + networkSecurityRules: !item["networkSecurityRules"] + ? item["networkSecurityRules"] + : networkSecurityRuleArraySerializer(item["networkSecurityRules"]), + additionalDataDisks: !item["additionalDataDisks"] + ? item["additionalDataDisks"] + : vmssDataDiskArraySerializer(item["additionalDataDisks"]), + enableEncryptionAtHost: item["enableEncryptionAtHost"], + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + useDefaultPublicLoadBalancer: item["useDefaultPublicLoadBalancer"], + useTempDataDisk: item["useTempDataDisk"], + enableOverProvisioning: item["enableOverProvisioning"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + isSpotVM: item["isSpotVM"], + hostGroupId: item["hostGroupId"], + useEphemeralOSDisk: item["useEphemeralOSDisk"], + spotRestoreTimeout: item["spotRestoreTimeout"], + evictionPolicy: item["evictionPolicy"], + vmImageResourceId: item["vmImageResourceId"], + subnetId: item["subnetId"], + vmSetupActions: !item["vmSetupActions"] + ? item["vmSetupActions"] + : item["vmSetupActions"].map((p: any) => { + return p; + }), + securityType: item["securityType"], + secureBootEnabled: item["secureBootEnabled"], + enableNodePublicIP: item["enableNodePublicIP"], + enableNodePublicIPv6: item["enableNodePublicIPv6"], + vmSharedGalleryImageId: item["vmSharedGalleryImageId"], + natGatewayId: item["natGatewayId"], + natConfigurations: !item["natConfigurations"] + ? item["natConfigurations"] + : nodeTypeNatConfigArraySerializer(item["natConfigurations"]), + vmImagePlan: !item["vmImagePlan"] + ? item["vmImagePlan"] + : vmImagePlanSerializer(item["vmImagePlan"]), + serviceArtifactReferenceId: item["serviceArtifactReferenceId"], + dscpConfigurationId: item["dscpConfigurationId"], + additionalNetworkInterfaceConfigurations: !item["additionalNetworkInterfaceConfigurations"] + ? item["additionalNetworkInterfaceConfigurations"] + : additionalNetworkInterfaceConfigurationArraySerializer( + item["additionalNetworkInterfaceConfigurations"], + ), + computerNamePrefix: item["computerNamePrefix"], + vmApplications: !item["vmApplications"] + ? item["vmApplications"] + : vmApplicationArraySerializer(item["vmApplications"]), + }; +} + +export function nodeTypePropertiesDeserializer(item: any): NodeTypeProperties { + return { + isPrimary: item["isPrimary"], + vmInstanceCount: item["vmInstanceCount"], + dataDiskSizeGB: item["dataDiskSizeGB"], + dataDiskType: item["dataDiskType"], + dataDiskLetter: item["dataDiskLetter"], + placementProperties: item["placementProperties"], + capacities: item["capacities"], + applicationPorts: !item["applicationPorts"] + ? item["applicationPorts"] + : endpointRangeDescriptionDeserializer(item["applicationPorts"]), + ephemeralPorts: !item["ephemeralPorts"] + ? item["ephemeralPorts"] + : endpointRangeDescriptionDeserializer(item["ephemeralPorts"]), + vmSize: item["vmSize"], + vmImagePublisher: item["vmImagePublisher"], + vmImageOffer: item["vmImageOffer"], + vmImageSku: item["vmImageSku"], + vmImageVersion: item["vmImageVersion"], + vmSecrets: !item["vmSecrets"] + ? item["vmSecrets"] + : vaultSecretGroupArrayDeserializer(item["vmSecrets"]), + vmExtensions: !item["vmExtensions"] + ? item["vmExtensions"] + : vmssExtensionArrayDeserializer(item["vmExtensions"]), + vmManagedIdentity: !item["vmManagedIdentity"] + ? item["vmManagedIdentity"] + : vmManagedIdentityDeserializer(item["vmManagedIdentity"]), + isStateless: item["isStateless"], + multiplePlacementGroups: item["multiplePlacementGroups"], + frontendConfigurations: !item["frontendConfigurations"] + ? item["frontendConfigurations"] + : frontendConfigurationArrayDeserializer(item["frontendConfigurations"]), + networkSecurityRules: !item["networkSecurityRules"] + ? item["networkSecurityRules"] + : networkSecurityRuleArrayDeserializer(item["networkSecurityRules"]), + additionalDataDisks: !item["additionalDataDisks"] + ? item["additionalDataDisks"] + : vmssDataDiskArrayDeserializer(item["additionalDataDisks"]), + enableEncryptionAtHost: item["enableEncryptionAtHost"], + provisioningState: item["provisioningState"], + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + useDefaultPublicLoadBalancer: item["useDefaultPublicLoadBalancer"], + useTempDataDisk: item["useTempDataDisk"], + enableOverProvisioning: item["enableOverProvisioning"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + isSpotVM: item["isSpotVM"], + hostGroupId: item["hostGroupId"], + useEphemeralOSDisk: item["useEphemeralOSDisk"], + spotRestoreTimeout: item["spotRestoreTimeout"], + evictionPolicy: item["evictionPolicy"], + vmImageResourceId: item["vmImageResourceId"], + subnetId: item["subnetId"], + vmSetupActions: !item["vmSetupActions"] + ? item["vmSetupActions"] + : item["vmSetupActions"].map((p: any) => { + return p; + }), + securityType: item["securityType"], + secureBootEnabled: item["secureBootEnabled"], + enableNodePublicIP: item["enableNodePublicIP"], + enableNodePublicIPv6: item["enableNodePublicIPv6"], + vmSharedGalleryImageId: item["vmSharedGalleryImageId"], + natGatewayId: item["natGatewayId"], + natConfigurations: !item["natConfigurations"] + ? item["natConfigurations"] + : nodeTypeNatConfigArrayDeserializer(item["natConfigurations"]), + vmImagePlan: !item["vmImagePlan"] + ? item["vmImagePlan"] + : vmImagePlanDeserializer(item["vmImagePlan"]), + serviceArtifactReferenceId: item["serviceArtifactReferenceId"], + dscpConfigurationId: item["dscpConfigurationId"], + additionalNetworkInterfaceConfigurations: !item["additionalNetworkInterfaceConfigurations"] + ? item["additionalNetworkInterfaceConfigurations"] + : additionalNetworkInterfaceConfigurationArrayDeserializer( + item["additionalNetworkInterfaceConfigurations"], + ), + computerNamePrefix: item["computerNamePrefix"], + vmApplications: !item["vmApplications"] + ? item["vmApplications"] + : vmApplicationArrayDeserializer(item["vmApplications"]), + }; +} + +/** Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. */ +export type DiskType = + | "Standard_LRS" + | "StandardSSD_LRS" + | "Premium_LRS" + | "PremiumV2_LRS" + | "StandardSSD_ZRS" + | "Premium_ZRS"; + +/** Port range details */ +export interface EndpointRangeDescription { + /** Starting port of a range of ports */ + startPort: number; + /** End port of a range of ports */ + endPort: number; +} + +export function endpointRangeDescriptionSerializer(item: EndpointRangeDescription): any { + return { startPort: item["startPort"], endPort: item["endPort"] }; +} + +export function endpointRangeDescriptionDeserializer(item: any): EndpointRangeDescription { + return { + startPort: item["startPort"], + endPort: item["endPort"], + }; +} + +export function vaultSecretGroupArraySerializer(result: Array): any[] { + return result.map((item) => { + return vaultSecretGroupSerializer(item); + }); +} + +export function vaultSecretGroupArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vaultSecretGroupDeserializer(item); + }); +} + +/** Specifies set of certificates that should be installed onto the virtual machines. */ +export interface VaultSecretGroup { + /** The relative URL of the Key Vault containing all of the certificates in VaultCertificates. */ + sourceVault: SubResource; + /** The list of key vault references in SourceVault which contain certificates. */ + vaultCertificates: VaultCertificate[]; +} + +export function vaultSecretGroupSerializer(item: VaultSecretGroup): any { + return { + sourceVault: subResourceSerializer(item["sourceVault"]), + vaultCertificates: vaultCertificateArraySerializer(item["vaultCertificates"]), + }; +} + +export function vaultSecretGroupDeserializer(item: any): VaultSecretGroup { + return { + sourceVault: subResourceDeserializer(item["sourceVault"]), + vaultCertificates: vaultCertificateArrayDeserializer(item["vaultCertificates"]), + }; +} + +/** Azure resource identifier. */ +export interface SubResource { + /** Azure resource identifier. */ + id?: string; +} + +export function subResourceSerializer(item: SubResource): any { + return { id: item["id"] }; +} + +export function subResourceDeserializer(item: any): SubResource { + return { + id: item["id"], + }; +} + +export function vaultCertificateArraySerializer(result: Array): any[] { + return result.map((item) => { + return vaultCertificateSerializer(item); + }); +} + +export function vaultCertificateArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vaultCertificateDeserializer(item); + }); +} + +/** Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. */ +export interface VaultCertificate { + /** This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). */ + certificateUrl: string; + /** For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. */ + certificateStore: string; +} + +export function vaultCertificateSerializer(item: VaultCertificate): any { + return { + certificateUrl: item["certificateUrl"], + certificateStore: item["certificateStore"], + }; +} + +export function vaultCertificateDeserializer(item: any): VaultCertificate { + return { + certificateUrl: item["certificateUrl"], + certificateStore: item["certificateStore"], + }; +} + +export function vmssExtensionArraySerializer(result: Array): any[] { + return result.map((item) => { + return vmssExtensionSerializer(item); + }); +} + +export function vmssExtensionArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vmssExtensionDeserializer(item); + }); +} + +/** Specifies set of extensions that should be installed onto the virtual machines. */ +export interface VmssExtension { + /** The name of the extension. */ + name: string; + /** Describes the properties of a Virtual Machine Scale Set Extension. */ + properties: VmssExtensionProperties; +} + +export function vmssExtensionSerializer(item: VmssExtension): any { + return { + name: item["name"], + properties: vmssExtensionPropertiesSerializer(item["properties"]), + }; +} + +export function vmssExtensionDeserializer(item: any): VmssExtension { + return { + name: item["name"], + properties: vmssExtensionPropertiesDeserializer(item["properties"]), + }; +} + +/** Describes the properties of a Virtual Machine Scale Set Extension. */ +export interface VmssExtensionProperties { + /** The name of the extension handler publisher. */ + publisher: string; + /** Specifies the type of the extension; an example is "CustomScriptExtension". */ + type: string; + /** Specifies the version of the script handler. */ + typeHandlerVersion: string; + /** Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ + autoUpgradeMinorVersion?: boolean; + /** Json formatted public settings for the extension. */ + settings?: Record; + /** The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ + protectedSettings?: Record; + /** If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. */ + forceUpdateTag?: string; + /** Collection of extension names after which this extension needs to be provisioned. */ + provisionAfterExtensions?: string[]; + /** The provisioning state, which only appears in the response. */ + readonly provisioningState?: string; + /** Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. */ + enableAutomaticUpgrade?: boolean; + /** Indicates the setup order for the extension. */ + setupOrder?: VmssExtensionSetupOrder[]; +} + +export function vmssExtensionPropertiesSerializer(item: VmssExtensionProperties): any { + return { + publisher: item["publisher"], + type: item["type"], + typeHandlerVersion: item["typeHandlerVersion"], + autoUpgradeMinorVersion: item["autoUpgradeMinorVersion"], + settings: item["settings"], + protectedSettings: item["protectedSettings"], + forceUpdateTag: item["forceUpdateTag"], + provisionAfterExtensions: !item["provisionAfterExtensions"] + ? item["provisionAfterExtensions"] + : item["provisionAfterExtensions"].map((p: any) => { + return p; + }), + enableAutomaticUpgrade: item["enableAutomaticUpgrade"], + setupOrder: !item["setupOrder"] + ? item["setupOrder"] + : item["setupOrder"].map((p: any) => { + return p; + }), + }; +} + +export function vmssExtensionPropertiesDeserializer(item: any): VmssExtensionProperties { + return { + publisher: item["publisher"], + type: item["type"], + typeHandlerVersion: item["typeHandlerVersion"], + autoUpgradeMinorVersion: item["autoUpgradeMinorVersion"], + settings: item["settings"], + protectedSettings: item["protectedSettings"], + forceUpdateTag: item["forceUpdateTag"], + provisionAfterExtensions: !item["provisionAfterExtensions"] + ? item["provisionAfterExtensions"] + : item["provisionAfterExtensions"].map((p: any) => { + return p; + }), + provisioningState: item["provisioningState"], + enableAutomaticUpgrade: item["enableAutomaticUpgrade"], + setupOrder: !item["setupOrder"] + ? item["setupOrder"] + : item["setupOrder"].map((p: any) => { + return p; + }), + }; +} + +/** Vm extension setup order. */ +export type VmssExtensionSetupOrder = "BeforeSFRuntime"; + +/** Identities for the virtual machine scale set under the node type. */ +export interface VmManagedIdentity { + /** The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: string[]; +} + +export function vmManagedIdentitySerializer(item: VmManagedIdentity): any { + return { + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : item["userAssignedIdentities"].map((p: any) => { + return p; + }), + }; +} + +export function vmManagedIdentityDeserializer(item: any): VmManagedIdentity { + return { + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : item["userAssignedIdentities"].map((p: any) => { + return p; + }), + }; +} + +export function frontendConfigurationArraySerializer(result: Array): any[] { + return result.map((item) => { + return frontendConfigurationSerializer(item); + }); +} + +export function frontendConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return frontendConfigurationDeserializer(item); + }); +} + +/** Describes the frontend configurations for the node type. */ +export interface FrontendConfiguration { + /** The IP address type of this frontend configuration. If omitted the default value is IPv4. */ + ipAddressType?: IPAddressType; + /** The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. */ + loadBalancerBackendAddressPoolId?: string; + /** The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. */ + loadBalancerInboundNatPoolId?: string; + /** The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions//resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. */ + applicationGatewayBackendAddressPoolId?: string; +} + +export function frontendConfigurationSerializer(item: FrontendConfiguration): any { + return { + ipAddressType: item["ipAddressType"], + loadBalancerBackendAddressPoolId: item["loadBalancerBackendAddressPoolId"], + loadBalancerInboundNatPoolId: item["loadBalancerInboundNatPoolId"], + applicationGatewayBackendAddressPoolId: item["applicationGatewayBackendAddressPoolId"], + }; +} + +export function frontendConfigurationDeserializer(item: any): FrontendConfiguration { + return { + ipAddressType: item["ipAddressType"], + loadBalancerBackendAddressPoolId: item["loadBalancerBackendAddressPoolId"], + loadBalancerInboundNatPoolId: item["loadBalancerInboundNatPoolId"], + applicationGatewayBackendAddressPoolId: item["applicationGatewayBackendAddressPoolId"], + }; +} + +/** The IP address type. */ +export type IPAddressType = "IPv4" | "IPv6"; + +export function networkSecurityRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return networkSecurityRuleSerializer(item); + }); +} + +export function networkSecurityRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return networkSecurityRuleDeserializer(item); + }); +} + +/** Describes a network security rule. */ +export interface NetworkSecurityRule { + /** Network security rule name. */ + name: string; + /** Network security rule description. */ + description?: string; + /** Network protocol this rule applies to. */ + protocol: NsgProtocol; + /** The CIDR or source IP ranges. */ + sourceAddressPrefixes?: string[]; + /** The destination address prefixes. CIDR or destination IP ranges. */ + destinationAddressPrefixes?: string[]; + /** The source port ranges. */ + sourcePortRanges?: string[]; + /** The destination port ranges. */ + destinationPortRanges?: string[]; + /** The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. */ + sourceAddressPrefix?: string; + /** The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ + destinationAddressPrefix?: string; + /** The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ + sourcePortRange?: string; + /** he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. */ + destinationPortRange?: string; + /** The network traffic is allowed or denied. */ + access: Access; + /** The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ + priority: number; + /** Network security rule direction. */ + direction: Direction; +} + +export function networkSecurityRuleSerializer(item: NetworkSecurityRule): any { + return { + name: item["name"], + description: item["description"], + protocol: item["protocol"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + sourceAddressPrefix: item["sourceAddressPrefix"], + destinationAddressPrefix: item["destinationAddressPrefix"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +export function networkSecurityRuleDeserializer(item: any): NetworkSecurityRule { + return { + name: item["name"], + description: item["description"], + protocol: item["protocol"], + sourceAddressPrefixes: !item["sourceAddressPrefixes"] + ? item["sourceAddressPrefixes"] + : item["sourceAddressPrefixes"].map((p: any) => { + return p; + }), + destinationAddressPrefixes: !item["destinationAddressPrefixes"] + ? item["destinationAddressPrefixes"] + : item["destinationAddressPrefixes"].map((p: any) => { + return p; + }), + sourcePortRanges: !item["sourcePortRanges"] + ? item["sourcePortRanges"] + : item["sourcePortRanges"].map((p: any) => { + return p; + }), + destinationPortRanges: !item["destinationPortRanges"] + ? item["destinationPortRanges"] + : item["destinationPortRanges"].map((p: any) => { + return p; + }), + sourceAddressPrefix: item["sourceAddressPrefix"], + destinationAddressPrefix: item["destinationAddressPrefix"], + sourcePortRange: item["sourcePortRange"], + destinationPortRange: item["destinationPortRange"], + access: item["access"], + priority: item["priority"], + direction: item["direction"], + }; +} + +/** Network protocol this rule applies to. */ +export type NsgProtocol = "http" | "https" | "tcp" | "udp" | "icmp" | "ah" | "esp"; +/** The network traffic is allowed or denied. */ +export type Access = "allow" | "deny"; +/** Network security rule direction. */ +export type Direction = "inbound" | "outbound"; + +export function vmssDataDiskArraySerializer(result: Array): any[] { + return result.map((item) => { + return vmssDataDiskSerializer(item); + }); +} + +export function vmssDataDiskArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vmssDataDiskDeserializer(item); + }); +} + +/** Managed data disk description. */ +export interface VmssDataDisk { + /** Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. Lun 0 is reserved for the service fabric data disk. */ + lun: number; + /** Disk size for each vm in the node type in GBs. */ + diskSizeGB: number; + /** Managed data disk type. Specifies the storage account type for the managed disk */ + diskType: DiskType; + /** Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. */ + diskLetter: string; +} + +export function vmssDataDiskSerializer(item: VmssDataDisk): any { + return { + lun: item["lun"], + diskSizeGB: item["diskSizeGB"], + diskType: item["diskType"], + diskLetter: item["diskLetter"], + }; +} + +export function vmssDataDiskDeserializer(item: any): VmssDataDisk { + return { + lun: item["lun"], + diskSizeGB: item["diskSizeGB"], + diskType: item["diskType"], + diskLetter: item["diskLetter"], + }; +} + +/** The provisioning state of the managed resource. */ +export type ManagedResourceProvisioningState = + | "None" + | "Creating" + | "Created" + | "Updating" + | "Succeeded" + | "Failed" + | "Canceled" + | "Deleting" + | "Deleted" + | "Other"; +/** Specifies the eviction policy for virtual machines in a SPOT node type. */ +export type EvictionPolicyType = "Delete" | "Deallocate"; +/** action to be performed on the vms before bootstrapping the service fabric runtime. */ +export type VmSetupAction = "EnableContainers" | "EnableHyperV"; +/** Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported */ +export type SecurityType = "TrustedLaunch" | "Standard"; + +export function nodeTypeNatConfigArraySerializer(result: Array): any[] { + return result.map((item) => { + return nodeTypeNatConfigSerializer(item); + }); +} + +export function nodeTypeNatConfigArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nodeTypeNatConfigDeserializer(item); + }); +} + +/** Provides information about NAT configuration on the default public Load Balancer for the node type. */ +export interface NodeTypeNatConfig { + /** The internal port for the NAT configuration. */ + backendPort?: number; + /** The port range start for the external endpoint. */ + frontendPortRangeStart?: number; + /** The port range end for the external endpoint. */ + frontendPortRangeEnd?: number; +} + +export function nodeTypeNatConfigSerializer(item: NodeTypeNatConfig): any { + return { + backendPort: item["backendPort"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + }; +} + +export function nodeTypeNatConfigDeserializer(item: any): NodeTypeNatConfig { + return { + backendPort: item["backendPort"], + frontendPortRangeStart: item["frontendPortRangeStart"], + frontendPortRangeEnd: item["frontendPortRangeEnd"], + }; +} + +/** Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started. Enter any required information and then click Save. */ +export interface VmImagePlan { + /** The plan ID. */ + name?: string; + /** Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. */ + product?: string; + /** The promotion code. */ + promotionCode?: string; + /** The publisher ID. */ + publisher?: string; +} + +export function vmImagePlanSerializer(item: VmImagePlan): any { + return { + name: item["name"], + product: item["product"], + promotionCode: item["promotionCode"], + publisher: item["publisher"], + }; +} + +export function vmImagePlanDeserializer(item: any): VmImagePlan { + return { + name: item["name"], + product: item["product"], + promotionCode: item["promotionCode"], + publisher: item["publisher"], + }; +} + +export function additionalNetworkInterfaceConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return additionalNetworkInterfaceConfigurationSerializer(item); + }); +} + +export function additionalNetworkInterfaceConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return additionalNetworkInterfaceConfigurationDeserializer(item); + }); +} + +/** Specifies the settings for a network interface to attach to the node type. */ +export interface AdditionalNetworkInterfaceConfiguration { + /** Name of the network interface. */ + name: string; + /** Specifies whether the network interface is accelerated networking-enabled. */ + enableAcceleratedNetworking?: boolean; + /** Specifies the DSCP configuration to apply to the network interface. */ + dscpConfiguration?: SubResource; + /** Specifies the IP configurations of the network interface. */ + ipConfigurations: IpConfiguration[]; +} + +export function additionalNetworkInterfaceConfigurationSerializer( + item: AdditionalNetworkInterfaceConfiguration, +): any { + return { + name: item["name"], + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + dscpConfiguration: !item["dscpConfiguration"] + ? item["dscpConfiguration"] + : subResourceSerializer(item["dscpConfiguration"]), + ipConfigurations: ipConfigurationArraySerializer(item["ipConfigurations"]), + }; +} + +export function additionalNetworkInterfaceConfigurationDeserializer( + item: any, +): AdditionalNetworkInterfaceConfiguration { + return { + name: item["name"], + enableAcceleratedNetworking: item["enableAcceleratedNetworking"], + dscpConfiguration: !item["dscpConfiguration"] + ? item["dscpConfiguration"] + : subResourceDeserializer(item["dscpConfiguration"]), + ipConfigurations: ipConfigurationArrayDeserializer(item["ipConfigurations"]), + }; +} + +export function ipConfigurationArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipConfigurationSerializer(item); + }); +} + +export function ipConfigurationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipConfigurationDeserializer(item); + }); +} + +/** Specifies an IP configuration of the network interface. */ +export interface IpConfiguration { + /** Name of the network interface. */ + name: string; + /** Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. */ + applicationGatewayBackendAddressPools?: SubResource[]; + /** Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. */ + loadBalancerBackendAddressPools?: SubResource[]; + /** Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. */ + loadBalancerInboundNatPools?: SubResource[]; + /** Specifies the subnet of the network interface. */ + subnet?: SubResource; + /** Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. */ + privateIPAddressVersion?: PrivateIPAddressVersion; + /** The public IP address configuration of the network interface. */ + publicIPAddressConfiguration?: IpConfigurationPublicIPAddressConfiguration; +} + +export function ipConfigurationSerializer(item: IpConfiguration): any { + return { + name: item["name"], + applicationGatewayBackendAddressPools: !item["applicationGatewayBackendAddressPools"] + ? item["applicationGatewayBackendAddressPools"] + : subResourceArraySerializer(item["applicationGatewayBackendAddressPools"]), + loadBalancerBackendAddressPools: !item["loadBalancerBackendAddressPools"] + ? item["loadBalancerBackendAddressPools"] + : subResourceArraySerializer(item["loadBalancerBackendAddressPools"]), + loadBalancerInboundNatPools: !item["loadBalancerInboundNatPools"] + ? item["loadBalancerInboundNatPools"] + : subResourceArraySerializer(item["loadBalancerInboundNatPools"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceSerializer(item["subnet"]), + privateIPAddressVersion: item["privateIPAddressVersion"], + publicIPAddressConfiguration: !item["publicIPAddressConfiguration"] + ? item["publicIPAddressConfiguration"] + : ipConfigurationPublicIPAddressConfigurationSerializer(item["publicIPAddressConfiguration"]), + }; +} + +export function ipConfigurationDeserializer(item: any): IpConfiguration { + return { + name: item["name"], + applicationGatewayBackendAddressPools: !item["applicationGatewayBackendAddressPools"] + ? item["applicationGatewayBackendAddressPools"] + : subResourceArrayDeserializer(item["applicationGatewayBackendAddressPools"]), + loadBalancerBackendAddressPools: !item["loadBalancerBackendAddressPools"] + ? item["loadBalancerBackendAddressPools"] + : subResourceArrayDeserializer(item["loadBalancerBackendAddressPools"]), + loadBalancerInboundNatPools: !item["loadBalancerInboundNatPools"] + ? item["loadBalancerInboundNatPools"] + : subResourceArrayDeserializer(item["loadBalancerInboundNatPools"]), + subnet: !item["subnet"] ? item["subnet"] : subResourceDeserializer(item["subnet"]), + privateIPAddressVersion: item["privateIPAddressVersion"], + publicIPAddressConfiguration: !item["publicIPAddressConfiguration"] + ? item["publicIPAddressConfiguration"] + : ipConfigurationPublicIPAddressConfigurationDeserializer( + item["publicIPAddressConfiguration"], + ), + }; +} + +export function subResourceArraySerializer(result: Array): any[] { + return result.map((item) => { + return subResourceSerializer(item); + }); +} + +export function subResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subResourceDeserializer(item); + }); +} + +/** Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. */ +export type PrivateIPAddressVersion = "IPv4" | "IPv6"; + +/** The public IP address configuration of the network interface. */ +export interface IpConfigurationPublicIPAddressConfiguration { + /** Name of the network interface. */ + name: string; + /** Specifies the list of IP tags associated with the public IP address. */ + ipTags?: IpTag[]; + /** Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4. */ + publicIPAddressVersion?: PublicIPAddressVersion; +} + +export function ipConfigurationPublicIPAddressConfigurationSerializer( + item: IpConfigurationPublicIPAddressConfiguration, +): any { + return { + name: item["name"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArraySerializer(item["ipTags"]), + publicIPAddressVersion: item["publicIPAddressVersion"], + }; +} + +export function ipConfigurationPublicIPAddressConfigurationDeserializer( + item: any, +): IpConfigurationPublicIPAddressConfiguration { + return { + name: item["name"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArrayDeserializer(item["ipTags"]), + publicIPAddressVersion: item["publicIPAddressVersion"], + }; +} + +export function ipTagArraySerializer(result: Array): any[] { + return result.map((item) => { + return ipTagSerializer(item); + }); +} + +export function ipTagArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return ipTagDeserializer(item); + }); +} + +/** The IP tag associated with the public IP address. */ +export interface IpTag { + /** IP tag type. Example: FirstPartyUsage. */ + ipTagType: string; + /** IP tag associated with the public IP. Example: SQL, Storage etc. */ + tag: string; +} + +export function ipTagSerializer(item: IpTag): any { + return { ipTagType: item["ipTagType"], tag: item["tag"] }; +} + +export function ipTagDeserializer(item: any): IpTag { + return { + ipTagType: item["ipTagType"], + tag: item["tag"], + }; +} + +/** Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4. */ +export type PublicIPAddressVersion = "IPv4" | "IPv6"; + +export function vmApplicationArraySerializer(result: Array): any[] { + return result.map((item) => { + return vmApplicationSerializer(item); + }); +} + +export function vmApplicationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return vmApplicationDeserializer(item); + }); +} + +/** Specifies the gallery application that should be made available to the underlying VMSS. */ +export interface VmApplication { + /** Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided. */ + configurationReference?: string; + /** If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the underlying VMSS. */ + enableAutomaticUpgrade?: boolean; + /** Optional, Specifies the order in which the packages have to be installed. */ + order?: number; + /** Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. */ + packageReferenceId: string; + /** Optional, Specifies a passthrough value for more generic context. Accepts a JSON-formatted string e.g. '{"Tag1":"Value1","Tag2":"Value2"}'. */ + vmGalleryTags?: string; + /** Optional, If true, any failure for any operation in the VmApplication will fail the deployment. */ + treatFailureAsDeploymentFailure?: boolean; +} + +export function vmApplicationSerializer(item: VmApplication): any { + return { + configurationReference: item["configurationReference"], + enableAutomaticUpgrade: item["enableAutomaticUpgrade"], + order: item["order"], + packageReferenceId: item["packageReferenceId"], + vmGalleryTags: item["vmGalleryTags"], + treatFailureAsDeploymentFailure: item["treatFailureAsDeploymentFailure"], + }; +} + +export function vmApplicationDeserializer(item: any): VmApplication { + return { + configurationReference: item["configurationReference"], + enableAutomaticUpgrade: item["enableAutomaticUpgrade"], + order: item["order"], + packageReferenceId: item["packageReferenceId"], + vmGalleryTags: item["vmGalleryTags"], + treatFailureAsDeploymentFailure: item["treatFailureAsDeploymentFailure"], + }; +} + +/** Describes a node type sku. */ +export interface NodeTypeSku { + /** The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. */ + name?: string; + /** Specifies the tier of the node type. Possible Values: **Standard** */ + tier?: string; + /** The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. */ + capacity: number; +} + +export function nodeTypeSkuSerializer(item: NodeTypeSku): any { + return { name: item["name"], tier: item["tier"], capacity: item["capacity"] }; +} + +export function nodeTypeSkuDeserializer(item: any): NodeTypeSku { + return { + name: item["name"], + tier: item["tier"], + capacity: item["capacity"], + }; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceSerializer(item: ProxyResource): any { + return item; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(item: Resource): any { + return item; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["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; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export type CreatedByType = "User" | "Application" | "ManagedIdentity" | "Key"; + +/** Node type update request */ +export interface NodeTypeUpdateParameters { + /** Node type update parameters */ + tags?: Record; + /** The node type sku. */ + sku?: NodeTypeSku; +} + +export function nodeTypeUpdateParametersSerializer(item: NodeTypeUpdateParameters): any { + return { + tags: item["tags"], + sku: !item["sku"] ? item["sku"] : nodeTypeSkuSerializer(item["sku"]), + }; +} + +/** The response of a NodeType list operation. */ +export interface _NodeTypeListResult { + /** The NodeType items on this page */ + value: NodeType[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nodeTypeListResultDeserializer(item: any): _NodeTypeListResult { + return { + value: nodeTypeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function nodeTypeArraySerializer(result: Array): any[] { + return result.map((item) => { + return nodeTypeSerializer(item); + }); +} + +export function nodeTypeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nodeTypeDeserializer(item); + }); +} + +/** Parameters for Node type action. If nodes are not specified on the parameters, the operation will be performed in all nodes of the node type one upgrade domain at a time. */ +export interface NodeTypeActionParameters { + /** List of node names from the node type. */ + nodes?: string[]; + /** Force the action to go through. */ + force?: boolean; + /** Specifies the way the operation will be performed. */ + updateType?: UpdateType; +} + +export function nodeTypeActionParametersSerializer(item: NodeTypeActionParameters): any { + return { + nodes: !item["nodes"] + ? item["nodes"] + : item["nodes"].map((p: any) => { + return p; + }), + force: item["force"], + updateType: item["updateType"], + }; +} + +/** Specifies the way the operation will be performed. */ +export type UpdateType = "Default" | "ByUpgradeDomain"; + +/** Parameters for Fault Simulation action. */ +export interface FaultSimulationParameters { + /** The kind of fault to be simulated. */ + /** The discriminator possible values: Zone */ + faultKind: FaultKind; + /** Force the action to go through without any check on the cluster. */ + force?: boolean; + /** Constraints for Fault Simulation action. */ + constraints?: FaultSimulationConstraints; +} + +export function faultSimulationParametersSerializer(item: FaultSimulationParameters): any { + return { + faultKind: item["faultKind"], + force: item["force"], + constraints: !item["constraints"] + ? item["constraints"] + : faultSimulationConstraintsSerializer(item["constraints"]), + }; +} + +export function faultSimulationParametersDeserializer(item: any): FaultSimulationParameters { + return { + faultKind: item["faultKind"], + force: item["force"], + constraints: !item["constraints"] + ? item["constraints"] + : faultSimulationConstraintsDeserializer(item["constraints"]), + }; +} + +/** Alias for FaultSimulationParametersUnion */ +export type FaultSimulationParametersUnion = + | ZoneFaultSimulationParameters + | FaultSimulationParameters; + +export function faultSimulationParametersUnionSerializer( + item: FaultSimulationParametersUnion, +): any { + switch (item.faultKind) { + case "Zone": + return zoneFaultSimulationParametersSerializer(item as ZoneFaultSimulationParameters); + + default: + return faultSimulationParametersSerializer(item); + } +} + +export function faultSimulationParametersUnionDeserializer( + item: any, +): FaultSimulationParametersUnion { + switch (item.faultKind) { + case "Zone": + return zoneFaultSimulationParametersDeserializer(item as ZoneFaultSimulationParameters); + + default: + return faultSimulationParametersDeserializer(item); + } +} + +/** The kind of fault simulation. */ +export type FaultKind = "Zone"; + +/** Constraints for Fault Simulation action. */ +export interface FaultSimulationConstraints { + /** The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. */ + expirationTime?: Date; +} + +export function faultSimulationConstraintsSerializer(item: FaultSimulationConstraints): any { + return { + expirationTime: !item["expirationTime"] + ? item["expirationTime"] + : item["expirationTime"].toISOString(), + }; +} + +export function faultSimulationConstraintsDeserializer(item: any): FaultSimulationConstraints { + return { + expirationTime: !item["expirationTime"] + ? item["expirationTime"] + : new Date(item["expirationTime"]), + }; +} + +/** Parameters for Zone Fault Simulation action. */ +export interface ZoneFaultSimulationParameters extends FaultSimulationParameters { + /** Indicates the zones of the fault simulation. */ + zones?: string[]; + /** The kind of fault simulation. */ + faultKind: "Zone"; +} + +export function zoneFaultSimulationParametersSerializer(item: ZoneFaultSimulationParameters): any { + return { + faultKind: item["faultKind"], + force: item["force"], + constraints: !item["constraints"] + ? item["constraints"] + : faultSimulationConstraintsSerializer(item["constraints"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function zoneFaultSimulationParametersDeserializer( + item: any, +): ZoneFaultSimulationParameters { + return { + faultKind: item["faultKind"], + force: item["force"], + constraints: !item["constraints"] + ? item["constraints"] + : faultSimulationConstraintsDeserializer(item["constraints"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Parameters for Fault Simulation id. */ +export interface FaultSimulationIdParameters { + /** unique identifier for the fault simulation. */ + simulationId: string; +} + +export function faultSimulationIdParametersSerializer(item: FaultSimulationIdParameters): any { + return { simulationId: item["simulationId"] }; +} + +/** Fault simulation object with status. */ +export interface FaultSimulation { + /** unique identifier for the fault simulation. */ + simulationId?: string; + /** Fault simulation status */ + status?: FaultSimulationStatus; + /** The start time of the fault simulation. */ + startTime?: Date; + /** The end time of the fault simulation. */ + endTime?: Date; + /** Fault simulation details */ + details?: FaultSimulationDetails; +} + +export function faultSimulationDeserializer(item: any): FaultSimulation { + return { + simulationId: item["simulationId"], + status: item["status"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + details: !item["details"] + ? item["details"] + : faultSimulationDetailsDeserializer(item["details"]), + }; +} + +/** Fault simulation status. */ +export type FaultSimulationStatus = + | "Starting" + | "Active" + | "Stopping" + | "Done" + | "StartFailed" + | "StopFailed"; + +/** Details for Fault Simulation. */ +export interface FaultSimulationDetails { + /** unique identifier for the cluster resource. */ + clusterId?: string; + /** unique identifier for the operation associated with the fault simulation. */ + operationId?: string; + /** List of node type simulations associated with the cluster fault simulation. */ + nodeTypeFaultSimulation?: NodeTypeFaultSimulation[]; + /** Fault simulation parameters. */ + parameters?: FaultSimulationParametersUnion; +} + +export function faultSimulationDetailsDeserializer(item: any): FaultSimulationDetails { + return { + clusterId: item["clusterId"], + operationId: item["operationId"], + nodeTypeFaultSimulation: !item["nodeTypeFaultSimulation"] + ? item["nodeTypeFaultSimulation"] + : nodeTypeFaultSimulationArrayDeserializer(item["nodeTypeFaultSimulation"]), + parameters: !item["parameters"] + ? item["parameters"] + : faultSimulationParametersUnionDeserializer(item["parameters"]), + }; +} + +export function nodeTypeFaultSimulationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return nodeTypeFaultSimulationDeserializer(item); + }); +} + +/** Node type fault simulation object with status. */ +export interface NodeTypeFaultSimulation { + /** Node type name. */ + nodeTypeName?: string; + /** Fault simulation status */ + status?: FaultSimulationStatus; + /** Current or latest asynchronous operation identifier on the node type. */ + operationId?: string; + /** Current or latest asynchronous operation status on the node type */ + operationStatus?: SfmcOperationStatus; +} + +export function nodeTypeFaultSimulationDeserializer(item: any): NodeTypeFaultSimulation { + return { + nodeTypeName: item["nodeTypeName"], + status: item["status"], + operationId: item["operationId"], + operationStatus: item["operationStatus"], + }; +} + +/** Sfmc operation status. */ +export type SfmcOperationStatus = + | "Created" + | "Started" + | "Succeeded" + | "Failed" + | "Aborted" + | "Canceled"; + +/** Fault simulation list results */ +export interface _FaultSimulationListResult { + /** The FaultSimulation items on this page */ + value: FaultSimulation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _faultSimulationListResultDeserializer(item: any): _FaultSimulationListResult { + return { + value: faultSimulationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function faultSimulationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return faultSimulationDeserializer(item); + }); +} + +/** Node type available sku list results */ +export interface _NodeTypeListSkuResult { + /** The NodeTypeAvailableSku items on this page */ + value: NodeTypeAvailableSku[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _nodeTypeListSkuResultDeserializer(item: any): _NodeTypeListSkuResult { + return { + value: nodeTypeAvailableSkuArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function nodeTypeAvailableSkuArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return nodeTypeAvailableSkuDeserializer(item); + }); +} + +/** Defines the type of sku available for a node type */ +export interface NodeTypeAvailableSku { + /** The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. */ + readonly resourceType?: string; + /** The supported SKU for a for node type. */ + readonly sku?: NodeTypeSupportedSku; + /** Provides information about how the node count can be scaled. */ + readonly capacity?: NodeTypeSkuCapacity; +} + +export function nodeTypeAvailableSkuDeserializer(item: any): NodeTypeAvailableSku { + return { + resourceType: item["resourceType"], + sku: !item["sku"] ? item["sku"] : nodeTypeSupportedSkuDeserializer(item["sku"]), + capacity: !item["capacity"] + ? item["capacity"] + : nodeTypeSkuCapacityDeserializer(item["capacity"]), + }; +} + +/** Describes a node type supported sku. */ +export interface NodeTypeSupportedSku { + /** The sku name. */ + readonly name?: string; + /** Specifies the tier of the node type. Possible Values: **Standard** */ + readonly tier?: string; +} + +export function nodeTypeSupportedSkuDeserializer(item: any): NodeTypeSupportedSku { + return { + name: item["name"], + tier: item["tier"], + }; +} + +/** Provides information about how node type can be scaled. */ +export interface NodeTypeSkuCapacity { + /** Lowest permitted node count in a node type. */ + readonly minimum?: number; + /** Highest permitted node count in a node type. */ + readonly maximum?: number; + /** Default node count in a node type. */ + readonly default?: number; + /** Node type capacity scale type. */ + readonly scaleType?: NodeTypeSkuScaleType; +} + +export function nodeTypeSkuCapacityDeserializer(item: any): NodeTypeSkuCapacity { + return { + minimum: item["minimum"], + maximum: item["maximum"], + default: item["default"], + scaleType: item["scaleType"], + }; +} + +/** Node type capacity scale type. */ +export type NodeTypeSkuScaleType = "None" | "Manual" | "Automatic"; + +/** The managed cluster resource */ +export interface ManagedCluster extends TrackedResource { + /** The managed cluster resource properties */ + properties?: ManagedClusterProperties; + /** If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.", */ + readonly etag?: string; + /** The sku of the managed cluster */ + sku?: Sku; +} + +export function managedClusterSerializer(item: ManagedCluster): any { + return { + tags: item["tags"], + location: item["location"], + properties: !item["properties"] + ? item["properties"] + : managedClusterPropertiesSerializer(item["properties"]), + sku: !item["sku"] ? item["sku"] : skuSerializer(item["sku"]), + }; +} + +export function managedClusterDeserializer(item: any): ManagedCluster { + return { + tags: item["tags"], + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : managedClusterPropertiesDeserializer(item["properties"]), + etag: item["etag"], + sku: !item["sku"] ? item["sku"] : skuDeserializer(item["sku"]), + }; +} + +/** Describes the managed cluster resource properties. */ +export interface ManagedClusterProperties { + /** The cluster dns name. */ + dnsName: string; + /** The fully qualified domain name associated with the public load balancer of the cluster. */ + readonly fqdn?: string; + /** The IPv4 address associated with the public load balancer of the cluster. */ + readonly ipv4Address?: string; + /** A service generated unique identifier for the cluster resource. */ + readonly clusterId?: string; + /** The current state of the cluster. */ + readonly clusterState?: ClusterState; + /** List of thumbprints of the cluster certificates. */ + readonly clusterCertificateThumbprints?: string[]; + /** The port used for client connections to the cluster. */ + clientConnectionPort?: number; + /** The port used for HTTP connections to the cluster. */ + httpGatewayConnectionPort?: number; + /** VM admin user name. */ + adminUserName: string; + /** VM admin user password. */ + adminPassword?: string; + /** Load balancing rules that are applied to the public load balancer of the cluster. */ + loadBalancingRules?: LoadBalancingRule[]; + /** Setting this to true enables RDP access to the VM. The default NSG rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false. */ + allowRdpAccess?: boolean; + /** Custom Network Security Rules that are applied to the Virtual Network of the cluster. */ + networkSecurityRules?: NetworkSecurityRule[]; + /** Client certificates that are allowed to manage the cluster. */ + clients?: ClientCertificate[]; + /** The AAD authentication settings of the cluster. */ + azureActiveDirectory?: AzureActiveDirectory; + /** The list of custom fabric settings to configure the cluster. */ + fabricSettings?: SettingsSectionDescription[]; + /** The provisioning state of the managed cluster resource. */ + readonly provisioningState?: ManagedResourceProvisioningState; + /** The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. */ + clusterCodeVersion?: string; + /** The upgrade mode of the cluster when new Service Fabric runtime version is available. */ + clusterUpgradeMode?: ClusterUpgradeMode; + /** Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. */ + clusterUpgradeCadence?: ClusterUpgradeCadence; + /** List of add-on features to enable on the cluster. */ + addonFeatures?: ManagedClusterAddOnFeature[]; + /** Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. */ + enableAutoOSUpgrade?: boolean; + /** Indicates if the cluster has zone resiliency. */ + zonalResiliency?: boolean; + /** The policy used to clean up unused versions. */ + applicationTypeVersionsCleanupPolicy?: ApplicationTypeVersionsCleanupPolicy; + /** Setting this to true creates IPv6 address space for the default VNet used by the cluster. This setting cannot be changed once the cluster is created. The default value for this setting is false. */ + enableIpv6?: boolean; + /** If specified, the node types for the cluster are created in this subnet instead of the default VNet. The **networkSecurityRules** specified for the cluster are also applied to this subnet. This setting cannot be changed once the cluster is created. */ + subnetId?: string; + /** The list of IP tags associated with the default public IP address of the cluster. */ + ipTags?: IpTag[]; + /** IPv6 address for the cluster if IPv6 is enabled. */ + readonly ipv6Address?: string; + /** Setting this to true will link the IPv4 address as the ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. */ + enableServicePublicIP?: boolean; + /** Auxiliary subnets for the cluster. */ + auxiliarySubnets?: Subnet[]; + /** Service endpoints for subnets in the cluster. */ + serviceEndpoints?: ServiceEndpoint[]; + /** Indicates the update mode for Cross Az clusters. */ + zonalUpdateMode?: ZonalUpdateMode; + /** For new clusters, this parameter indicates that it uses Bring your own VNet, but the subnet is specified at node type level; and for such clusters, the subnetId property is required for node types. */ + useCustomVnet?: boolean; + /** Specify the resource id of a public IPv4 prefix that the load balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. */ + publicIPPrefixId?: string; + /** Specify the resource id of a public IPv6 prefix that the load balancer will allocate a public IPv6 address from. This setting cannot be changed once the cluster is created. */ + publicIPv6PrefixId?: string; + /** Specify the resource id of a DDoS network protection plan that will be associated with the virtual network of the cluster. */ + ddosProtectionPlanId?: string; + /** The policy to use when upgrading the cluster. */ + upgradeDescription?: ClusterUpgradePolicy; + /** The port used for token-auth based HTTPS connections to the cluster. Cannot be set to the same port as HttpGatewayEndpoint. */ + httpGatewayTokenAuthConnectionPort?: number; + /** If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. */ + enableHttpGatewayExclusiveAuthMode?: boolean; + /** This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. */ + autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; + /** The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. */ + allocatedOutboundPorts?: number; +} + +export function managedClusterPropertiesSerializer(item: ManagedClusterProperties): any { + return { + dnsName: item["dnsName"], + clientConnectionPort: item["clientConnectionPort"], + httpGatewayConnectionPort: item["httpGatewayConnectionPort"], + adminUserName: item["adminUserName"], + adminPassword: item["adminPassword"], + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : loadBalancingRuleArraySerializer(item["loadBalancingRules"]), + allowRdpAccess: item["allowRdpAccess"], + networkSecurityRules: !item["networkSecurityRules"] + ? item["networkSecurityRules"] + : networkSecurityRuleArraySerializer(item["networkSecurityRules"]), + clients: !item["clients"] ? item["clients"] : clientCertificateArraySerializer(item["clients"]), + azureActiveDirectory: !item["azureActiveDirectory"] + ? item["azureActiveDirectory"] + : azureActiveDirectorySerializer(item["azureActiveDirectory"]), + fabricSettings: !item["fabricSettings"] + ? item["fabricSettings"] + : settingsSectionDescriptionArraySerializer(item["fabricSettings"]), + clusterCodeVersion: item["clusterCodeVersion"], + clusterUpgradeMode: item["clusterUpgradeMode"], + clusterUpgradeCadence: item["clusterUpgradeCadence"], + addonFeatures: !item["addonFeatures"] + ? item["addonFeatures"] + : item["addonFeatures"].map((p: any) => { + return p; + }), + enableAutoOSUpgrade: item["enableAutoOSUpgrade"], + zonalResiliency: item["zonalResiliency"], + applicationTypeVersionsCleanupPolicy: !item["applicationTypeVersionsCleanupPolicy"] + ? item["applicationTypeVersionsCleanupPolicy"] + : applicationTypeVersionsCleanupPolicySerializer( + item["applicationTypeVersionsCleanupPolicy"], + ), + enableIpv6: item["enableIpv6"], + subnetId: item["subnetId"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArraySerializer(item["ipTags"]), + enableServicePublicIP: item["enableServicePublicIP"], + auxiliarySubnets: !item["auxiliarySubnets"] + ? item["auxiliarySubnets"] + : subnetArraySerializer(item["auxiliarySubnets"]), + serviceEndpoints: !item["serviceEndpoints"] + ? item["serviceEndpoints"] + : serviceEndpointArraySerializer(item["serviceEndpoints"]), + zonalUpdateMode: item["zonalUpdateMode"], + useCustomVnet: item["useCustomVnet"], + publicIPPrefixId: item["publicIPPrefixId"], + publicIPv6PrefixId: item["publicIPv6PrefixId"], + ddosProtectionPlanId: item["ddosProtectionPlanId"], + upgradeDescription: !item["upgradeDescription"] + ? item["upgradeDescription"] + : clusterUpgradePolicySerializer(item["upgradeDescription"]), + httpGatewayTokenAuthConnectionPort: item["httpGatewayTokenAuthConnectionPort"], + enableHttpGatewayExclusiveAuthMode: item["enableHttpGatewayExclusiveAuthMode"], + autoGeneratedDomainNameLabelScope: item["autoGeneratedDomainNameLabelScope"], + allocatedOutboundPorts: item["allocatedOutboundPorts"], + }; +} + +export function managedClusterPropertiesDeserializer(item: any): ManagedClusterProperties { + return { + dnsName: item["dnsName"], + fqdn: item["fqdn"], + ipv4Address: item["ipv4Address"], + clusterId: item["clusterId"], + clusterState: item["clusterState"], + clusterCertificateThumbprints: !item["clusterCertificateThumbprints"] + ? item["clusterCertificateThumbprints"] + : item["clusterCertificateThumbprints"].map((p: any) => { + return p; + }), + clientConnectionPort: item["clientConnectionPort"], + httpGatewayConnectionPort: item["httpGatewayConnectionPort"], + adminUserName: item["adminUserName"], + adminPassword: item["adminPassword"], + loadBalancingRules: !item["loadBalancingRules"] + ? item["loadBalancingRules"] + : loadBalancingRuleArrayDeserializer(item["loadBalancingRules"]), + allowRdpAccess: item["allowRdpAccess"], + networkSecurityRules: !item["networkSecurityRules"] + ? item["networkSecurityRules"] + : networkSecurityRuleArrayDeserializer(item["networkSecurityRules"]), + clients: !item["clients"] + ? item["clients"] + : clientCertificateArrayDeserializer(item["clients"]), + azureActiveDirectory: !item["azureActiveDirectory"] + ? item["azureActiveDirectory"] + : azureActiveDirectoryDeserializer(item["azureActiveDirectory"]), + fabricSettings: !item["fabricSettings"] + ? item["fabricSettings"] + : settingsSectionDescriptionArrayDeserializer(item["fabricSettings"]), + provisioningState: item["provisioningState"], + clusterCodeVersion: item["clusterCodeVersion"], + clusterUpgradeMode: item["clusterUpgradeMode"], + clusterUpgradeCadence: item["clusterUpgradeCadence"], + addonFeatures: !item["addonFeatures"] + ? item["addonFeatures"] + : item["addonFeatures"].map((p: any) => { + return p; + }), + enableAutoOSUpgrade: item["enableAutoOSUpgrade"], + zonalResiliency: item["zonalResiliency"], + applicationTypeVersionsCleanupPolicy: !item["applicationTypeVersionsCleanupPolicy"] + ? item["applicationTypeVersionsCleanupPolicy"] + : applicationTypeVersionsCleanupPolicyDeserializer( + item["applicationTypeVersionsCleanupPolicy"], + ), + enableIpv6: item["enableIpv6"], + subnetId: item["subnetId"], + ipTags: !item["ipTags"] ? item["ipTags"] : ipTagArrayDeserializer(item["ipTags"]), + ipv6Address: item["ipv6Address"], + enableServicePublicIP: item["enableServicePublicIP"], + auxiliarySubnets: !item["auxiliarySubnets"] + ? item["auxiliarySubnets"] + : subnetArrayDeserializer(item["auxiliarySubnets"]), + serviceEndpoints: !item["serviceEndpoints"] + ? item["serviceEndpoints"] + : serviceEndpointArrayDeserializer(item["serviceEndpoints"]), + zonalUpdateMode: item["zonalUpdateMode"], + useCustomVnet: item["useCustomVnet"], + publicIPPrefixId: item["publicIPPrefixId"], + publicIPv6PrefixId: item["publicIPv6PrefixId"], + ddosProtectionPlanId: item["ddosProtectionPlanId"], + upgradeDescription: !item["upgradeDescription"] + ? item["upgradeDescription"] + : clusterUpgradePolicyDeserializer(item["upgradeDescription"]), + httpGatewayTokenAuthConnectionPort: item["httpGatewayTokenAuthConnectionPort"], + enableHttpGatewayExclusiveAuthMode: item["enableHttpGatewayExclusiveAuthMode"], + autoGeneratedDomainNameLabelScope: item["autoGeneratedDomainNameLabelScope"], + allocatedOutboundPorts: item["allocatedOutboundPorts"], + }; +} + +/** The current state of the cluster. */ +export type ClusterState = + | "WaitingForNodes" + | "Deploying" + | "BaselineUpgrade" + | "Upgrading" + | "UpgradeFailed" + | "Ready"; + +export function loadBalancingRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return loadBalancingRuleSerializer(item); + }); +} + +export function loadBalancingRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return loadBalancingRuleDeserializer(item); + }); +} + +/** Describes a load balancing rule. */ +export interface LoadBalancingRule { + /** The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534. */ + frontendPort: number; + /** The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. */ + backendPort: number; + /** The reference to the transport protocol used by the load balancing rule. */ + protocol: Protocol; + /** The prob port used by the load balancing rule. Acceptable values are between 1 and 65535. */ + probePort?: number; + /** the reference to the load balancer probe used by the load balancing rule. */ + probeProtocol: ProbeProtocol; + /** The probe request path. Only supported for HTTP/HTTPS probes. */ + probeRequestPath?: string; + /** The load distribution policy for this rule. */ + loadDistribution?: string; +} + +export function loadBalancingRuleSerializer(item: LoadBalancingRule): any { + return { + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + protocol: item["protocol"], + probePort: item["probePort"], + probeProtocol: item["probeProtocol"], + probeRequestPath: item["probeRequestPath"], + loadDistribution: item["loadDistribution"], + }; +} + +export function loadBalancingRuleDeserializer(item: any): LoadBalancingRule { + return { + frontendPort: item["frontendPort"], + backendPort: item["backendPort"], + protocol: item["protocol"], + probePort: item["probePort"], + probeProtocol: item["probeProtocol"], + probeRequestPath: item["probeRequestPath"], + loadDistribution: item["loadDistribution"], + }; +} + +/** The reference to the transport protocol used by the load balancing rule. */ +export type Protocol = "tcp" | "udp"; +/** The reference to the load balancer probe used by the load balancing rule. */ +export type ProbeProtocol = "tcp" | "http" | "https"; + +export function clientCertificateArraySerializer(result: Array): any[] { + return result.map((item) => { + return clientCertificateSerializer(item); + }); +} + +export function clientCertificateArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return clientCertificateDeserializer(item); + }); +} + +/** Client certificate definition. */ +export interface ClientCertificate { + /** Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster. */ + isAdmin: boolean; + /** Certificate thumbprint. */ + thumbprint?: string; + /** Certificate common name. */ + commonName?: string; + /** Issuer thumbprint for the certificate. Only used together with CommonName. */ + issuerThumbprint?: string; +} + +export function clientCertificateSerializer(item: ClientCertificate): any { + return { + isAdmin: item["isAdmin"], + thumbprint: item["thumbprint"], + commonName: item["commonName"], + issuerThumbprint: item["issuerThumbprint"], + }; +} + +export function clientCertificateDeserializer(item: any): ClientCertificate { + return { + isAdmin: item["isAdmin"], + thumbprint: item["thumbprint"], + commonName: item["commonName"], + issuerThumbprint: item["issuerThumbprint"], + }; +} + +/** The settings to enable AAD authentication on the cluster. */ +export interface AzureActiveDirectory { + /** Azure active directory tenant id. */ + tenantId?: string; + /** Azure active directory cluster application id. */ + clusterApplication?: string; + /** Azure active directory client application id. */ + clientApplication?: string; +} + +export function azureActiveDirectorySerializer(item: AzureActiveDirectory): any { + return { + tenantId: item["tenantId"], + clusterApplication: item["clusterApplication"], + clientApplication: item["clientApplication"], + }; +} + +export function azureActiveDirectoryDeserializer(item: any): AzureActiveDirectory { + return { + tenantId: item["tenantId"], + clusterApplication: item["clusterApplication"], + clientApplication: item["clientApplication"], + }; +} + +export function settingsSectionDescriptionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return settingsSectionDescriptionSerializer(item); + }); +} + +export function settingsSectionDescriptionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return settingsSectionDescriptionDeserializer(item); + }); +} + +/** Describes a section in the fabric settings of the cluster. */ +export interface SettingsSectionDescription { + /** The section name of the fabric settings. */ + name: string; + /** The collection of parameters in the section. */ + parameters: SettingsParameterDescription[]; +} + +export function settingsSectionDescriptionSerializer(item: SettingsSectionDescription): any { + return { + name: item["name"], + parameters: settingsParameterDescriptionArraySerializer(item["parameters"]), + }; +} + +export function settingsSectionDescriptionDeserializer(item: any): SettingsSectionDescription { + return { + name: item["name"], + parameters: settingsParameterDescriptionArrayDeserializer(item["parameters"]), + }; +} + +export function settingsParameterDescriptionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return settingsParameterDescriptionSerializer(item); + }); +} + +export function settingsParameterDescriptionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return settingsParameterDescriptionDeserializer(item); + }); +} + +/** Describes a parameter in fabric settings of the cluster. */ +export interface SettingsParameterDescription { + /** The parameter name of fabric setting. */ + name: string; + /** The parameter value of fabric setting. */ + value: string; +} + +export function settingsParameterDescriptionSerializer(item: SettingsParameterDescription): any { + return { name: item["name"], value: item["value"] }; +} + +export function settingsParameterDescriptionDeserializer(item: any): SettingsParameterDescription { + return { + name: item["name"], + value: item["value"], + }; +} + +/** The upgrade mode of the cluster when new Service Fabric runtime version is available. */ +export type ClusterUpgradeMode = "Automatic" | "Manual"; +/** Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. */ +export type ClusterUpgradeCadence = "Wave0" | "Wave1" | "Wave2"; +/** Available cluster add-on features */ +export type ManagedClusterAddOnFeature = + | "DnsService" + | "BackupRestoreService" + | "ResourceMonitorService"; + +/** The policy used to clean up unused versions. When the policy is not specified explicitly, the default unused application versions to keep will be 3. */ +export interface ApplicationTypeVersionsCleanupPolicy { + /** Number of unused versions per application type to keep. */ + maxUnusedVersionsToKeep: number; +} + +export function applicationTypeVersionsCleanupPolicySerializer( + item: ApplicationTypeVersionsCleanupPolicy, +): any { + return { maxUnusedVersionsToKeep: item["maxUnusedVersionsToKeep"] }; +} + +export function applicationTypeVersionsCleanupPolicyDeserializer( + item: any, +): ApplicationTypeVersionsCleanupPolicy { + return { + maxUnusedVersionsToKeep: item["maxUnusedVersionsToKeep"], + }; +} + +export function subnetArraySerializer(result: Array): any[] { + return result.map((item) => { + return subnetSerializer(item); + }); +} + +export function subnetArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subnetDeserializer(item); + }); +} + +/** Describes a Subnet. */ +export interface Subnet { + /** Subnet name. */ + name: string; + /** Indicates wether to enable Ipv6 or not. If not provided, it will take the same configuration as the cluster. */ + enableIpv6?: boolean; + /** Enable or Disable apply network policies on private end point in the subnet. */ + privateEndpointNetworkPolicies?: PrivateEndpointNetworkPolicies; + /** Enable or Disable apply network policies on private link service in the subnet. */ + privateLinkServiceNetworkPolicies?: PrivateLinkServiceNetworkPolicies; + /** Full resource id for the network security group. */ + networkSecurityGroupId?: string; +} + +export function subnetSerializer(item: Subnet): any { + return { + name: item["name"], + enableIpv6: item["enableIpv6"], + privateEndpointNetworkPolicies: item["privateEndpointNetworkPolicies"], + privateLinkServiceNetworkPolicies: item["privateLinkServiceNetworkPolicies"], + networkSecurityGroupId: item["networkSecurityGroupId"], + }; +} + +export function subnetDeserializer(item: any): Subnet { + return { + name: item["name"], + enableIpv6: item["enableIpv6"], + privateEndpointNetworkPolicies: item["privateEndpointNetworkPolicies"], + privateLinkServiceNetworkPolicies: item["privateLinkServiceNetworkPolicies"], + networkSecurityGroupId: item["networkSecurityGroupId"], + }; +} + +/** Enable or Disable apply network policies on private end point in the subnet. */ +export type PrivateEndpointNetworkPolicies = "enabled" | "disabled"; +/** Enable or Disable apply network policies on private link service in the subnet. */ +export type PrivateLinkServiceNetworkPolicies = "enabled" | "disabled"; + +export function serviceEndpointArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceEndpointSerializer(item); + }); +} + +export function serviceEndpointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return serviceEndpointDeserializer(item); + }); +} + +/** The service endpoint properties. */ +export interface ServiceEndpoint { + /** The type of the endpoint service. */ + service: string; + /** A list of locations. */ + locations?: string[]; +} + +export function serviceEndpointSerializer(item: ServiceEndpoint): any { + return { + service: item["service"], + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + }; +} + +export function serviceEndpointDeserializer(item: any): ServiceEndpoint { + return { + service: item["service"], + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + }; +} + +/** Indicates the update mode for Cross Az clusters. */ +export type ZonalUpdateMode = "Standard" | "Fast"; + +/** Describes the policy used when upgrading the cluster. */ +export interface ClusterUpgradePolicy { + /** If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). */ + forceRestart?: boolean; + /** The cluster health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade. */ + healthPolicy?: ClusterHealthPolicy; + /** The cluster delta health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade. */ + deltaHealthPolicy?: ClusterUpgradeDeltaHealthPolicy; + /** The cluster monitoring policy describes the parameters for monitoring an upgrade in Monitored mode. */ + monitoringPolicy?: ClusterMonitoringPolicy; + /** + * The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. + * When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. + * The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. + * This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) + */ + upgradeReplicaSetCheckTimeout?: string; +} + +export function clusterUpgradePolicySerializer(item: ClusterUpgradePolicy): any { + return { + forceRestart: item["forceRestart"], + healthPolicy: !item["healthPolicy"] + ? item["healthPolicy"] + : clusterHealthPolicySerializer(item["healthPolicy"]), + deltaHealthPolicy: !item["deltaHealthPolicy"] + ? item["deltaHealthPolicy"] + : clusterUpgradeDeltaHealthPolicySerializer(item["deltaHealthPolicy"]), + monitoringPolicy: !item["monitoringPolicy"] + ? item["monitoringPolicy"] + : clusterMonitoringPolicySerializer(item["monitoringPolicy"]), + upgradeReplicaSetCheckTimeout: item["upgradeReplicaSetCheckTimeout"], + }; +} + +export function clusterUpgradePolicyDeserializer(item: any): ClusterUpgradePolicy { + return { + forceRestart: item["forceRestart"], + healthPolicy: !item["healthPolicy"] + ? item["healthPolicy"] + : clusterHealthPolicyDeserializer(item["healthPolicy"]), + deltaHealthPolicy: !item["deltaHealthPolicy"] + ? item["deltaHealthPolicy"] + : clusterUpgradeDeltaHealthPolicyDeserializer(item["deltaHealthPolicy"]), + monitoringPolicy: !item["monitoringPolicy"] + ? item["monitoringPolicy"] + : clusterMonitoringPolicyDeserializer(item["monitoringPolicy"]), + upgradeReplicaSetCheckTimeout: item["upgradeReplicaSetCheckTimeout"], + }; +} + +/** Defines a health policy used to evaluate the health of the cluster or of a cluster node. */ +export interface ClusterHealthPolicy { + /** + * The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + * + * In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. + */ + maxPercentUnhealthyNodes: number; + /** + * The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. + * + * The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. + * If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. + * The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. + */ + maxPercentUnhealthyApplications: number; +} + +export function clusterHealthPolicySerializer(item: ClusterHealthPolicy): any { + return { + maxPercentUnhealthyNodes: item["maxPercentUnhealthyNodes"], + maxPercentUnhealthyApplications: item["maxPercentUnhealthyApplications"], + }; +} + +export function clusterHealthPolicyDeserializer(item: any): ClusterHealthPolicy { + return { + maxPercentUnhealthyNodes: item["maxPercentUnhealthyNodes"], + maxPercentUnhealthyApplications: item["maxPercentUnhealthyApplications"], + }; +} + +/** Describes the delta health policies for the cluster upgrade. */ +export interface ClusterUpgradeDeltaHealthPolicy { + /** + * The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. + * The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. + */ + maxPercentDeltaUnhealthyNodes: number; + /** + * The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. + * The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. + */ + maxPercentUpgradeDomainDeltaUnhealthyNodes?: number; + /** + * The maximum allowed percentage of applications health degradation allowed during cluster upgrades. + * The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. + * The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. + * NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications + */ + maxPercentDeltaUnhealthyApplications?: number; +} + +export function clusterUpgradeDeltaHealthPolicySerializer( + item: ClusterUpgradeDeltaHealthPolicy, +): any { + return { + maxPercentDeltaUnhealthyNodes: item["maxPercentDeltaUnhealthyNodes"], + maxPercentUpgradeDomainDeltaUnhealthyNodes: item["maxPercentUpgradeDomainDeltaUnhealthyNodes"], + maxPercentDeltaUnhealthyApplications: item["maxPercentDeltaUnhealthyApplications"], + }; +} + +export function clusterUpgradeDeltaHealthPolicyDeserializer( + item: any, +): ClusterUpgradeDeltaHealthPolicy { + return { + maxPercentDeltaUnhealthyNodes: item["maxPercentDeltaUnhealthyNodes"], + maxPercentUpgradeDomainDeltaUnhealthyNodes: item["maxPercentUpgradeDomainDeltaUnhealthyNodes"], + maxPercentDeltaUnhealthyApplications: item["maxPercentDeltaUnhealthyApplications"], + }; +} + +/** Describes the monitoring policies for the cluster upgrade. */ +export interface ClusterMonitoringPolicy { + /** The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ + healthCheckWaitDuration: string; + /** The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ + healthCheckStableDuration: string; + /** The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ + healthCheckRetryTimeout: string; + /** The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ + upgradeTimeout: string; + /** The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. */ + upgradeDomainTimeout: string; +} + +export function clusterMonitoringPolicySerializer(item: ClusterMonitoringPolicy): any { + return { + healthCheckWaitDuration: item["healthCheckWaitDuration"], + healthCheckStableDuration: item["healthCheckStableDuration"], + healthCheckRetryTimeout: item["healthCheckRetryTimeout"], + upgradeTimeout: item["upgradeTimeout"], + upgradeDomainTimeout: item["upgradeDomainTimeout"], + }; +} + +export function clusterMonitoringPolicyDeserializer(item: any): ClusterMonitoringPolicy { + return { + healthCheckWaitDuration: item["healthCheckWaitDuration"], + healthCheckStableDuration: item["healthCheckStableDuration"], + healthCheckRetryTimeout: item["healthCheckRetryTimeout"], + upgradeTimeout: item["upgradeTimeout"], + upgradeDomainTimeout: item["upgradeDomainTimeout"], + }; +} + +/** + * This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the + * domain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain. + * The hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group + * and Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen. + */ +export type AutoGeneratedDomainNameLabelScope = + | "TenantReuse" + | "SubscriptionReuse" + | "ResourceGroupReuse" + | "NoReuse"; + +/** Service Fabric managed cluster Sku definition */ +export interface Sku { + /** Sku Name. */ + name: SkuName; +} + +export function skuSerializer(item: Sku): any { + return { name: item["name"] }; +} + +export function skuDeserializer(item: any): Sku { + return { + name: item["name"], + }; +} + +/** Sku Name. */ +export type SkuName = "Basic" | "Standard"; + +/** 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?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function trackedResourceSerializer(item: TrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function trackedResourceDeserializer(item: any): TrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** Managed cluster update request */ +export interface ManagedClusterUpdateParameters { + /** Managed cluster update parameters */ + tags?: Record; +} + +export function managedClusterUpdateParametersSerializer( + item: ManagedClusterUpdateParameters, +): any { + return { tags: item["tags"] }; +} + +/** The response of a ManagedCluster list operation. */ +export interface _ManagedClusterListResult { + /** The ManagedCluster items on this page */ + value: ManagedCluster[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _managedClusterListResultDeserializer(item: any): _ManagedClusterListResult { + return { + value: managedClusterArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function managedClusterArraySerializer(result: Array): any[] { + return result.map((item) => { + return managedClusterSerializer(item); + }); +} + +export function managedClusterArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return managedClusterDeserializer(item); + }); +} + +/** Describes the maintenance window status of the Service Fabric Managed Cluster. */ +export interface ManagedMaintenanceWindowStatus { + /** If maintenance window is enabled on this cluster. */ + readonly isWindowEnabled?: boolean; + /** Indicates if the region is ready to configure maintenance windows. */ + readonly isRegionReady?: boolean; + /** If maintenance window is active. */ + readonly isWindowActive?: boolean; + /** If updates can be applied. */ + readonly canApplyUpdates?: boolean; + /** Last window update time in UTC. */ + readonly lastWindowStatusUpdateAtUTC?: Date; + /** Last window start time in UTC. */ + readonly lastWindowStartTimeUTC?: Date; + /** Last window end time in UTC. */ + readonly lastWindowEndTimeUTC?: Date; +} + +export function managedMaintenanceWindowStatusDeserializer( + item: any, +): ManagedMaintenanceWindowStatus { + return { + isWindowEnabled: item["isWindowEnabled"], + isRegionReady: item["isRegionReady"], + isWindowActive: item["isWindowActive"], + canApplyUpdates: item["canApplyUpdates"], + lastWindowStatusUpdateAtUTC: !item["lastWindowStatusUpdateAtUTC"] + ? item["lastWindowStatusUpdateAtUTC"] + : new Date(item["lastWindowStatusUpdateAtUTC"]), + lastWindowStartTimeUTC: !item["lastWindowStartTimeUTC"] + ? item["lastWindowStartTimeUTC"] + : new Date(item["lastWindowStartTimeUTC"]), + lastWindowEndTimeUTC: !item["lastWindowEndTimeUTC"] + ? item["lastWindowEndTimeUTC"] + : new Date(item["lastWindowEndTimeUTC"]), + }; +} + +/** Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters. */ +export interface ManagedAzResiliencyStatus { + /** List of Managed VM Sizes for Service Fabric Managed Clusters. */ + baseResourceStatus?: ResourceAzStatus[]; + /** URL to get the next set of Managed VM Sizes if there are any. */ + readonly isClusterZoneResilient?: boolean; +} + +export function managedAzResiliencyStatusDeserializer(item: any): ManagedAzResiliencyStatus { + return { + baseResourceStatus: !item["baseResourceStatus"] + ? item["baseResourceStatus"] + : resourceAzStatusArrayDeserializer(item["baseResourceStatus"]), + isClusterZoneResilient: item["isClusterZoneResilient"], + }; +} + +export function resourceAzStatusArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return resourceAzStatusDeserializer(item); + }); +} + +/** Describes Az Resiliency status of Base resources */ +export interface ResourceAzStatus { + /** VM Size properties. */ + readonly resourceName?: string; + /** VM Size id. */ + readonly resourceType?: string; + /** VM Size name. */ + readonly isZoneResilient?: boolean; + /** Zone resiliency status details for the resource. */ + readonly details?: string; +} + +export function resourceAzStatusDeserializer(item: any): ResourceAzStatus { + return { + resourceName: item["resourceName"], + resourceType: item["resourceType"], + isZoneResilient: item["isZoneResilient"], + details: item["details"], + }; +} + +/** Describes a VM Sizes. */ +export interface ManagedVMSize { + /** VM Size properties. */ + readonly properties?: VMSize; + /** VM Size id. */ + readonly id?: string; + /** VM Size name. */ + readonly name?: string; + /** VM Size type. */ + readonly type?: string; +} + +export function managedVMSizeDeserializer(item: any): ManagedVMSize { + return { + properties: !item["properties"] ? item["properties"] : vMSizeDeserializer(item["properties"]), + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + +/** VM Sizes properties. */ +export interface VMSize { + /** VM Size name. */ + readonly size?: string; +} + +export function vMSizeDeserializer(item: any): VMSize { + return { + size: item["size"], + }; +} + +/** Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters. */ +export interface _ManagedVMSizesResult { + /** The ManagedVMSize items on this page */ + value: ManagedVMSize[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _managedVMSizesResultDeserializer(item: any): _ManagedVMSizesResult { + return { + value: managedVMSizeArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function managedVMSizeArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return managedVMSizeDeserializer(item); + }); +} + +/** The result of the Service Fabric runtime versions */ +export interface ManagedClusterCodeVersionResult { + /** The identification of the result */ + id?: string; + /** The name of the result */ + name?: string; + /** The result resource type */ + type?: string; + /** The detail of the Service Fabric runtime version result */ + properties?: ManagedClusterVersionDetails; +} + +export function managedClusterCodeVersionResultDeserializer( + item: any, +): ManagedClusterCodeVersionResult { + return { + id: item["id"], + name: item["name"], + type: item["type"], + properties: !item["properties"] + ? item["properties"] + : managedClusterVersionDetailsDeserializer(item["properties"]), + }; +} + +/** The detail of the Service Fabric runtime version result */ +export interface ManagedClusterVersionDetails { + /** The Service Fabric runtime version of the cluster. */ + clusterCodeVersion?: string; + /** The date of expiry of support of the version. */ + supportExpiryUtc?: string; + /** Cluster operating system, the default will be Windows */ + osType?: OsType; +} + +export function managedClusterVersionDetailsDeserializer(item: any): ManagedClusterVersionDetails { + return { + clusterCodeVersion: item["clusterCodeVersion"], + supportExpiryUtc: item["supportExpiryUtc"], + osType: item["osType"], + }; +} + +/** Cluster operating system, the default will be Windows */ +export type OsType = "Windows"; + +/** The service resource. */ +export interface ServiceResource extends ProxyResource { + /** The service resource properties. */ + properties?: ServiceResourcePropertiesUnion; + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location?: string; +} + +export function serviceResourceSerializer(item: ServiceResource): any { + return { + properties: !item["properties"] + ? item["properties"] + : serviceResourcePropertiesUnionSerializer(item["properties"]), + tags: item["tags"], + location: item["location"], + }; +} + +export function serviceResourceDeserializer(item: any): ServiceResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : serviceResourcePropertiesUnionDeserializer(item["properties"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** The service resource properties. */ +export interface ServiceResourceProperties extends ServiceResourcePropertiesBase { + /** The current deployment or provisioning state, which only appears in the response */ + readonly provisioningState?: string; + /** The kind of service (Stateless or Stateful). */ + /** The discriminator possible values: Stateful, Stateless */ + serviceKind: ServiceKind; + /** The name of the service type */ + serviceTypeName: string; + /** Describes how the service is partitioned. */ + partitionDescription: PartitionUnion; + /** The activation Mode of the service package */ + servicePackageActivationMode?: ServicePackageActivationMode; + /** + * Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + * When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + * When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + */ + serviceDnsName?: string; +} + +export function serviceResourcePropertiesSerializer(item: ServiceResourceProperties): any { + return { + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArraySerializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArraySerializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArraySerializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArraySerializer(item["scalingPolicies"]), + serviceKind: item["serviceKind"], + serviceTypeName: item["serviceTypeName"], + partitionDescription: partitionUnionSerializer(item["partitionDescription"]), + servicePackageActivationMode: item["servicePackageActivationMode"], + serviceDnsName: item["serviceDnsName"], + }; +} + +export function serviceResourcePropertiesDeserializer(item: any): ServiceResourceProperties { + return { + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArrayDeserializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArrayDeserializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArrayDeserializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArrayDeserializer(item["scalingPolicies"]), + provisioningState: item["provisioningState"], + serviceKind: item["serviceKind"], + serviceTypeName: item["serviceTypeName"], + partitionDescription: partitionUnionDeserializer(item["partitionDescription"]), + servicePackageActivationMode: item["servicePackageActivationMode"], + serviceDnsName: item["serviceDnsName"], + }; +} + +/** Alias for ServiceResourcePropertiesUnion */ +export type ServiceResourcePropertiesUnion = + | StatefulServiceProperties + | StatelessServiceProperties + | ServiceResourceProperties; + +export function serviceResourcePropertiesUnionSerializer( + item: ServiceResourcePropertiesUnion, +): any { + switch (item.serviceKind) { + case "Stateful": + return statefulServicePropertiesSerializer(item as StatefulServiceProperties); + + case "Stateless": + return statelessServicePropertiesSerializer(item as StatelessServiceProperties); + + default: + return serviceResourcePropertiesSerializer(item); + } +} + +export function serviceResourcePropertiesUnionDeserializer( + item: any, +): ServiceResourcePropertiesUnion { + switch (item.serviceKind) { + case "Stateful": + return statefulServicePropertiesDeserializer(item as StatefulServiceProperties); + + case "Stateless": + return statelessServicePropertiesDeserializer(item as StatelessServiceProperties); + + default: + return serviceResourcePropertiesDeserializer(item); + } +} + +/** The kind of service (Stateless or Stateful). */ +export type ServiceKind = "Stateless" | "Stateful"; + +/** Describes how the service is partitioned. */ +export interface Partition { + partitionScheme: PartitionScheme; +} + +export function partitionSerializer(item: Partition): any { + return { partitionScheme: item["partitionScheme"] }; +} + +export function partitionDeserializer(item: any): Partition { + return { + partitionScheme: item["partitionScheme"], + }; +} + +/** Alias for PartitionUnion */ +export type PartitionUnion = + | NamedPartitionScheme + | SingletonPartitionScheme + | UniformInt64RangePartitionScheme + | Partition; + +export function partitionUnionSerializer(item: PartitionUnion): any { + switch (item.partitionScheme) { + case "Named": + return namedPartitionSchemeSerializer(item as NamedPartitionScheme); + + case "Singleton": + return singletonPartitionSchemeSerializer(item as SingletonPartitionScheme); + + case "UniformInt64Range": + return uniformInt64RangePartitionSchemeSerializer(item as UniformInt64RangePartitionScheme); + + default: + return partitionSerializer(item); + } +} + +export function partitionUnionDeserializer(item: any): PartitionUnion { + switch (item.partitionScheme) { + case "Named": + return namedPartitionSchemeDeserializer(item as NamedPartitionScheme); + + case "Singleton": + return singletonPartitionSchemeDeserializer(item as SingletonPartitionScheme); + + case "UniformInt64Range": + return uniformInt64RangePartitionSchemeDeserializer(item as UniformInt64RangePartitionScheme); + + default: + return partitionDeserializer(item); + } +} + +/** Enumerates the ways that a service can be partitioned. */ +export type PartitionScheme = "Singleton" | "UniformInt64Range" | "Named"; + +/** Describes the named partition scheme of the service. */ +export interface NamedPartitionScheme extends Partition { + /** Array for the names of the partitions. */ + names: string[]; + /** Specifies how the service is partitioned. */ + partitionScheme: "Named"; +} + +export function namedPartitionSchemeSerializer(item: NamedPartitionScheme): any { + return { + partitionScheme: item["partitionScheme"], + names: item["names"].map((p: any) => { + return p; + }), + }; +} + +export function namedPartitionSchemeDeserializer(item: any): NamedPartitionScheme { + return { + partitionScheme: item["partitionScheme"], + names: item["names"].map((p: any) => { + return p; + }), + }; +} + +/** Describes the partition scheme of a singleton-partitioned, or non-partitioned service. */ +export interface SingletonPartitionScheme extends Partition { + /** Specifies how the service is partitioned. */ + partitionScheme: "Singleton"; +} + +export function singletonPartitionSchemeSerializer(item: SingletonPartitionScheme): any { + return { partitionScheme: item["partitionScheme"] }; +} + +export function singletonPartitionSchemeDeserializer(item: any): SingletonPartitionScheme { + return { + partitionScheme: item["partitionScheme"], + }; +} + +/** Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions. */ +export interface UniformInt64RangePartitionScheme extends Partition { + /** The number of partitions. */ + count: number; + /** + * The lower bound of the partition key range that + * should be split between the partition ‘Count’ + */ + lowKey: number; + /** + * The upper bound of the partition key range that + * should be split between the partition ‘Count’ + */ + highKey: number; + /** Specifies how the service is partitioned. */ + partitionScheme: "UniformInt64Range"; +} + +export function uniformInt64RangePartitionSchemeSerializer( + item: UniformInt64RangePartitionScheme, +): any { + return { + partitionScheme: item["partitionScheme"], + count: item["count"], + lowKey: item["lowKey"], + highKey: item["highKey"], + }; +} + +export function uniformInt64RangePartitionSchemeDeserializer( + item: any, +): UniformInt64RangePartitionScheme { + return { + partitionScheme: item["partitionScheme"], + count: item["count"], + lowKey: item["lowKey"], + highKey: item["highKey"], + }; +} + +/** The activation Mode of the service package */ +export type ServicePackageActivationMode = "SharedProcess" | "ExclusiveProcess"; + +/** The properties of a stateful service resource. */ +export interface StatefulServiceProperties extends ServiceResourceProperties { + /** A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. */ + hasPersistedState?: boolean; + /** The target replica set size as a number. */ + targetReplicaSetSize?: number; + /** The minimum replica set size as a number. */ + minReplicaSetSize?: number; + /** The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". */ + replicaRestartWaitDuration?: string; + /** The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". */ + quorumLossWaitDuration?: string; + /** The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". */ + standByReplicaKeepDuration?: string; + /** The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". */ + servicePlacementTimeLimit?: string; + /** The kind of service (Stateless or Stateful). */ + serviceKind: "Stateful"; +} + +export function statefulServicePropertiesSerializer(item: StatefulServiceProperties): any { + return { + serviceKind: item["serviceKind"], + serviceTypeName: item["serviceTypeName"], + partitionDescription: partitionUnionSerializer(item["partitionDescription"]), + servicePackageActivationMode: item["servicePackageActivationMode"], + serviceDnsName: item["serviceDnsName"], + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArraySerializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArraySerializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArraySerializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArraySerializer(item["scalingPolicies"]), + hasPersistedState: item["hasPersistedState"], + targetReplicaSetSize: item["targetReplicaSetSize"], + minReplicaSetSize: item["minReplicaSetSize"], + replicaRestartWaitDuration: item["replicaRestartWaitDuration"], + quorumLossWaitDuration: item["quorumLossWaitDuration"], + standByReplicaKeepDuration: item["standByReplicaKeepDuration"], + servicePlacementTimeLimit: item["servicePlacementTimeLimit"], + }; +} + +export function statefulServicePropertiesDeserializer(item: any): StatefulServiceProperties { + return { + provisioningState: item["provisioningState"], + serviceKind: item["serviceKind"], + serviceTypeName: item["serviceTypeName"], + partitionDescription: partitionUnionDeserializer(item["partitionDescription"]), + servicePackageActivationMode: item["servicePackageActivationMode"], + serviceDnsName: item["serviceDnsName"], + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArrayDeserializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArrayDeserializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArrayDeserializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArrayDeserializer(item["scalingPolicies"]), + hasPersistedState: item["hasPersistedState"], + targetReplicaSetSize: item["targetReplicaSetSize"], + minReplicaSetSize: item["minReplicaSetSize"], + replicaRestartWaitDuration: item["replicaRestartWaitDuration"], + quorumLossWaitDuration: item["quorumLossWaitDuration"], + standByReplicaKeepDuration: item["standByReplicaKeepDuration"], + servicePlacementTimeLimit: item["servicePlacementTimeLimit"], + }; +} + +/** The properties of a stateless service resource. */ +export interface StatelessServiceProperties extends ServiceResourceProperties { + /** The instance count. */ + instanceCount: number; + /** MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. */ + minInstanceCount?: number; + /** MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. */ + minInstancePercentage?: number; + /** The kind of service (Stateless or Stateful). */ + serviceKind: "Stateless"; +} + +export function statelessServicePropertiesSerializer(item: StatelessServiceProperties): any { + return { + serviceKind: item["serviceKind"], + serviceTypeName: item["serviceTypeName"], + partitionDescription: partitionUnionSerializer(item["partitionDescription"]), + servicePackageActivationMode: item["servicePackageActivationMode"], + serviceDnsName: item["serviceDnsName"], + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArraySerializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArraySerializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArraySerializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArraySerializer(item["scalingPolicies"]), + instanceCount: item["instanceCount"], + minInstanceCount: item["minInstanceCount"], + minInstancePercentage: item["minInstancePercentage"], + }; +} + +export function statelessServicePropertiesDeserializer(item: any): StatelessServiceProperties { + return { + provisioningState: item["provisioningState"], + serviceKind: item["serviceKind"], + serviceTypeName: item["serviceTypeName"], + partitionDescription: partitionUnionDeserializer(item["partitionDescription"]), + servicePackageActivationMode: item["servicePackageActivationMode"], + serviceDnsName: item["serviceDnsName"], + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArrayDeserializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArrayDeserializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArrayDeserializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArrayDeserializer(item["scalingPolicies"]), + instanceCount: item["instanceCount"], + minInstanceCount: item["minInstanceCount"], + minInstancePercentage: item["minInstancePercentage"], + }; +} + +/** The common service resource properties. */ +export interface ServiceResourcePropertiesBase { + /** The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". */ + placementConstraints?: string; + /** A list that describes the correlation of the service with other services. */ + correlationScheme?: ServiceCorrelation[]; + /** The service load metrics is given as an array of ServiceLoadMetric objects. */ + serviceLoadMetrics?: ServiceLoadMetric[]; + /** A list that describes the correlation of the service with other services. */ + servicePlacementPolicies?: ServicePlacementPolicyUnion[]; + /** Specifies the move cost for the service. */ + defaultMoveCost?: MoveCost; + /** Scaling policies for this service. */ + scalingPolicies?: ScalingPolicy[]; +} + +export function serviceResourcePropertiesBaseSerializer(item: ServiceResourcePropertiesBase): any { + return { + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArraySerializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArraySerializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArraySerializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArraySerializer(item["scalingPolicies"]), + }; +} + +export function serviceResourcePropertiesBaseDeserializer( + item: any, +): ServiceResourcePropertiesBase { + return { + placementConstraints: item["placementConstraints"], + correlationScheme: !item["correlationScheme"] + ? item["correlationScheme"] + : serviceCorrelationArrayDeserializer(item["correlationScheme"]), + serviceLoadMetrics: !item["serviceLoadMetrics"] + ? item["serviceLoadMetrics"] + : serviceLoadMetricArrayDeserializer(item["serviceLoadMetrics"]), + servicePlacementPolicies: !item["servicePlacementPolicies"] + ? item["servicePlacementPolicies"] + : servicePlacementPolicyUnionArrayDeserializer(item["servicePlacementPolicies"]), + defaultMoveCost: item["defaultMoveCost"], + scalingPolicies: !item["scalingPolicies"] + ? item["scalingPolicies"] + : scalingPolicyArrayDeserializer(item["scalingPolicies"]), + }; +} + +export function serviceCorrelationArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceCorrelationSerializer(item); + }); +} + +export function serviceCorrelationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return serviceCorrelationDeserializer(item); + }); +} + +/** Creates a particular correlation between services. */ +export interface ServiceCorrelation { + /** The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. */ + scheme: ServiceCorrelationScheme; + /** The Arm Resource ID of the service that the correlation relationship is established with. */ + serviceName: string; +} + +export function serviceCorrelationSerializer(item: ServiceCorrelation): any { + return { scheme: item["scheme"], serviceName: item["serviceName"] }; +} + +export function serviceCorrelationDeserializer(item: any): ServiceCorrelation { + return { + scheme: item["scheme"], + serviceName: item["serviceName"], + }; +} + +/** The service correlation scheme. */ +export type ServiceCorrelationScheme = "AlignedAffinity" | "NonAlignedAffinity"; + +export function serviceLoadMetricArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceLoadMetricSerializer(item); + }); +} + +export function serviceLoadMetricArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return serviceLoadMetricDeserializer(item); + }); +} + +/** Specifies a metric to load balance a service during runtime. */ +export interface ServiceLoadMetric { + /** The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive. */ + name: string; + /** The service load metric relative weight, compared to other metrics configured for this service, as a number. */ + weight?: ServiceLoadMetricWeight; + /** Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. */ + primaryDefaultLoad?: number; + /** Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. */ + secondaryDefaultLoad?: number; + /** Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. */ + defaultLoad?: number; +} + +export function serviceLoadMetricSerializer(item: ServiceLoadMetric): any { + return { + name: item["name"], + weight: item["weight"], + primaryDefaultLoad: item["primaryDefaultLoad"], + secondaryDefaultLoad: item["secondaryDefaultLoad"], + defaultLoad: item["defaultLoad"], + }; +} + +export function serviceLoadMetricDeserializer(item: any): ServiceLoadMetric { + return { + name: item["name"], + weight: item["weight"], + primaryDefaultLoad: item["primaryDefaultLoad"], + secondaryDefaultLoad: item["secondaryDefaultLoad"], + defaultLoad: item["defaultLoad"], + }; +} + +/** Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight. */ +export type ServiceLoadMetricWeight = "Zero" | "Low" | "Medium" | "High"; + +export function servicePlacementPolicyUnionArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return servicePlacementPolicyUnionSerializer(item); + }); +} + +export function servicePlacementPolicyUnionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return servicePlacementPolicyUnionDeserializer(item); + }); +} + +/** Describes the policy to be used for placement of a Service Fabric service. */ +export interface ServicePlacementPolicy { + type: ServicePlacementPolicyType; +} + +export function servicePlacementPolicySerializer(item: ServicePlacementPolicy): any { + return { type: item["type"] }; +} + +export function servicePlacementPolicyDeserializer(item: any): ServicePlacementPolicy { + return { + type: item["type"], + }; +} + +/** Alias for ServicePlacementPolicyUnion */ +export type ServicePlacementPolicyUnion = + | ServicePlacementInvalidDomainPolicy + | ServicePlacementNonPartiallyPlaceServicePolicy + | ServicePlacementPreferPrimaryDomainPolicy + | ServicePlacementRequireDomainDistributionPolicy + | ServicePlacementRequiredDomainPolicy + | ServicePlacementPolicy; + +export function servicePlacementPolicyUnionSerializer(item: ServicePlacementPolicyUnion): any { + switch (item.type) { + case "InvalidDomain": + return servicePlacementInvalidDomainPolicySerializer( + item as ServicePlacementInvalidDomainPolicy, + ); + + case "NonPartiallyPlaceService": + return servicePlacementNonPartiallyPlaceServicePolicySerializer( + item as ServicePlacementNonPartiallyPlaceServicePolicy, + ); + + case "PreferredPrimaryDomain": + return servicePlacementPreferPrimaryDomainPolicySerializer( + item as ServicePlacementPreferPrimaryDomainPolicy, + ); + + case "RequiredDomainDistribution": + return servicePlacementRequireDomainDistributionPolicySerializer( + item as ServicePlacementRequireDomainDistributionPolicy, + ); + + case "RequiredDomain": + return servicePlacementRequiredDomainPolicySerializer( + item as ServicePlacementRequiredDomainPolicy, + ); + + default: + return servicePlacementPolicySerializer(item); + } +} + +export function servicePlacementPolicyUnionDeserializer(item: any): ServicePlacementPolicyUnion { + switch (item.type) { + case "InvalidDomain": + return servicePlacementInvalidDomainPolicyDeserializer( + item as ServicePlacementInvalidDomainPolicy, + ); + + case "NonPartiallyPlaceService": + return servicePlacementNonPartiallyPlaceServicePolicyDeserializer( + item as ServicePlacementNonPartiallyPlaceServicePolicy, + ); + + case "PreferredPrimaryDomain": + return servicePlacementPreferPrimaryDomainPolicyDeserializer( + item as ServicePlacementPreferPrimaryDomainPolicy, + ); + + case "RequiredDomainDistribution": + return servicePlacementRequireDomainDistributionPolicyDeserializer( + item as ServicePlacementRequireDomainDistributionPolicy, + ); + + case "RequiredDomain": + return servicePlacementRequiredDomainPolicyDeserializer( + item as ServicePlacementRequiredDomainPolicy, + ); + + default: + return servicePlacementPolicyDeserializer(item); + } +} + +/** The type of placement policy for a service fabric service. Following are the possible values. */ +export type ServicePlacementPolicyType = + | "InvalidDomain" + | "RequiredDomain" + | "PreferredPrimaryDomain" + | "RequiredDomainDistribution" + | "NonPartiallyPlaceService"; + +/** Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service. */ +export interface ServicePlacementInvalidDomainPolicy extends ServicePlacementPolicy { + /** The name of the domain that should not be used for placement. */ + domainName: string; + /** The type of placement policy for a service fabric service. Following are the possible values. */ + type: "InvalidDomain"; +} + +export function servicePlacementInvalidDomainPolicySerializer( + item: ServicePlacementInvalidDomainPolicy, +): any { + return { type: item["type"], domainName: item["domainName"] }; +} + +export function servicePlacementInvalidDomainPolicyDeserializer( + item: any, +): ServicePlacementInvalidDomainPolicy { + return { + type: item["type"], + domainName: item["domainName"], + }; +} + +/** The type of placement policy for a service fabric service. Following are the possible values. */ +export interface ServicePlacementNonPartiallyPlaceServicePolicy extends ServicePlacementPolicy { + type: "NonPartiallyPlaceService"; +} + +export function servicePlacementNonPartiallyPlaceServicePolicySerializer( + item: ServicePlacementNonPartiallyPlaceServicePolicy, +): any { + return { type: item["type"] }; +} + +export function servicePlacementNonPartiallyPlaceServicePolicyDeserializer( + item: any, +): ServicePlacementNonPartiallyPlaceServicePolicy { + return { + type: item["type"], + }; +} + +/** + * Describes the policy to be used for placement of a Service Fabric service where the service's + * Primary replicas should optimally be placed in a particular domain. + * + * This placement policy is usually used with fault domains in scenarios where the Service Fabric + * cluster is geographically distributed in order to indicate that a service's primary replica should + * be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional + * or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica + * may not end up located in this domain due to failures, capacity limits, or other constraints. + */ +export interface ServicePlacementPreferPrimaryDomainPolicy extends ServicePlacementPolicy { + /** The name of the domain that should used for placement as per this policy. */ + domainName: string; + /** The type of placement policy for a service fabric service. Following are the possible values. */ + type: "PreferredPrimaryDomain"; +} + +export function servicePlacementPreferPrimaryDomainPolicySerializer( + item: ServicePlacementPreferPrimaryDomainPolicy, +): any { + return { type: item["type"], domainName: item["domainName"] }; +} + +export function servicePlacementPreferPrimaryDomainPolicyDeserializer( + item: any, +): ServicePlacementPreferPrimaryDomainPolicy { + return { + type: item["type"], + domainName: item["domainName"], + }; +} + +/** + * Describes the policy to be used for placement of a Service Fabric service where two replicas + * from the same partition should never be placed in the same fault or upgrade domain. + * + * While this is not common it can expose the service to an increased risk of concurrent failures + * due to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider + * a case where replicas are deployed across different data center, with one replica per location. + * In the event that one of the datacenters goes offline, normally the replica that was placed in that + * datacenter will be packed into one of the remaining datacenters. If this is not desirable then this + * policy should be set. + */ +export interface ServicePlacementRequireDomainDistributionPolicy extends ServicePlacementPolicy { + /** The name of the domain that should used for placement as per this policy. */ + domainName: string; + /** The type of placement policy for a service fabric service. Following are the possible values. */ + type: "RequiredDomainDistribution"; +} + +export function servicePlacementRequireDomainDistributionPolicySerializer( + item: ServicePlacementRequireDomainDistributionPolicy, +): any { + return { type: item["type"], domainName: item["domainName"] }; +} + +export function servicePlacementRequireDomainDistributionPolicyDeserializer( + item: any, +): ServicePlacementRequireDomainDistributionPolicy { + return { + type: item["type"], + domainName: item["domainName"], + }; +} + +/** Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain. */ +export interface ServicePlacementRequiredDomainPolicy extends ServicePlacementPolicy { + /** The name of the domain that should used for placement as per this policy. */ + domainName: string; + /** The type of placement policy for a service fabric service. Following are the possible values. */ + type: "RequiredDomain"; +} + +export function servicePlacementRequiredDomainPolicySerializer( + item: ServicePlacementRequiredDomainPolicy, +): any { + return { type: item["type"], domainName: item["domainName"] }; +} + +export function servicePlacementRequiredDomainPolicyDeserializer( + item: any, +): ServicePlacementRequiredDomainPolicy { + return { + type: item["type"], + domainName: item["domainName"], + }; +} + +/** Specifies the move cost for the service. */ +export type MoveCost = "Zero" | "Low" | "Medium" | "High"; + +export function scalingPolicyArraySerializer(result: Array): any[] { + return result.map((item) => { + return scalingPolicySerializer(item); + }); +} + +export function scalingPolicyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return scalingPolicyDeserializer(item); + }); +} + +/** Specifies a metric to load balance a service during runtime. */ +export interface ScalingPolicy { + /** Specifies the mechanism associated with this scaling policy */ + scalingMechanism: ScalingMechanismUnion; + /** Specifies the trigger associated with this scaling policy. */ + scalingTrigger: ScalingTriggerUnion; +} + +export function scalingPolicySerializer(item: ScalingPolicy): any { + return { + scalingMechanism: scalingMechanismUnionSerializer(item["scalingMechanism"]), + scalingTrigger: scalingTriggerUnionSerializer(item["scalingTrigger"]), + }; +} + +export function scalingPolicyDeserializer(item: any): ScalingPolicy { + return { + scalingMechanism: scalingMechanismUnionDeserializer(item["scalingMechanism"]), + scalingTrigger: scalingTriggerUnionDeserializer(item["scalingTrigger"]), + }; +} + +/** Describes the mechanism for performing a scaling operation. */ +export interface ScalingMechanism { + kind: ServiceScalingMechanismKind; +} + +export function scalingMechanismSerializer(item: ScalingMechanism): any { + return { kind: item["kind"] }; +} + +export function scalingMechanismDeserializer(item: any): ScalingMechanism { + return { + kind: item["kind"], + }; +} + +/** Alias for ScalingMechanismUnion */ +export type ScalingMechanismUnion = + | AddRemoveIncrementalNamedPartitionScalingMechanism + | PartitionInstanceCountScaleMechanism + | ScalingMechanism; + +export function scalingMechanismUnionSerializer(item: ScalingMechanismUnion): any { + switch (item.kind) { + case "AddRemoveIncrementalNamedPartition": + return addRemoveIncrementalNamedPartitionScalingMechanismSerializer( + item as AddRemoveIncrementalNamedPartitionScalingMechanism, + ); + + case "ScalePartitionInstanceCount": + return partitionInstanceCountScaleMechanismSerializer( + item as PartitionInstanceCountScaleMechanism, + ); + + default: + return scalingMechanismSerializer(item); + } +} + +export function scalingMechanismUnionDeserializer(item: any): ScalingMechanismUnion { + switch (item.kind) { + case "AddRemoveIncrementalNamedPartition": + return addRemoveIncrementalNamedPartitionScalingMechanismDeserializer( + item as AddRemoveIncrementalNamedPartitionScalingMechanism, + ); + + case "ScalePartitionInstanceCount": + return partitionInstanceCountScaleMechanismDeserializer( + item as PartitionInstanceCountScaleMechanism, + ); + + default: + return scalingMechanismDeserializer(item); + } +} + +/** Enumerates the ways that a service can be partitioned. */ +export type ServiceScalingMechanismKind = + | "ScalePartitionInstanceCount" + | "AddRemoveIncrementalNamedPartition"; + +/** Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1'...'N-1'. */ +export interface AddRemoveIncrementalNamedPartitionScalingMechanism extends ScalingMechanism { + /** Minimum number of named partitions of the service. */ + minPartitionCount: number; + /** Maximum number of named partitions of the service. */ + maxPartitionCount: number; + /** The number of instances to add or remove during a scaling operation. */ + scaleIncrement: number; + /** Specifies the mechanism associated with this scaling policy. */ + kind: "AddRemoveIncrementalNamedPartition"; +} + +export function addRemoveIncrementalNamedPartitionScalingMechanismSerializer( + item: AddRemoveIncrementalNamedPartitionScalingMechanism, +): any { + return { + kind: item["kind"], + minPartitionCount: item["minPartitionCount"], + maxPartitionCount: item["maxPartitionCount"], + scaleIncrement: item["scaleIncrement"], + }; +} + +export function addRemoveIncrementalNamedPartitionScalingMechanismDeserializer( + item: any, +): AddRemoveIncrementalNamedPartitionScalingMechanism { + return { + kind: item["kind"], + minPartitionCount: item["minPartitionCount"], + maxPartitionCount: item["maxPartitionCount"], + scaleIncrement: item["scaleIncrement"], + }; +} + +/** Represents a scaling mechanism for adding or removing instances of stateless service partition. */ +export interface PartitionInstanceCountScaleMechanism extends ScalingMechanism { + /** Minimum number of instances of the partition. */ + minInstanceCount: number; + /** Maximum number of instances of the partition. */ + maxInstanceCount: number; + /** The number of instances to add or remove during a scaling operation. */ + scaleIncrement: number; + /** Specifies the mechanism associated with this scaling policy. */ + kind: "ScalePartitionInstanceCount"; +} + +export function partitionInstanceCountScaleMechanismSerializer( + item: PartitionInstanceCountScaleMechanism, +): any { + return { + kind: item["kind"], + minInstanceCount: item["minInstanceCount"], + maxInstanceCount: item["maxInstanceCount"], + scaleIncrement: item["scaleIncrement"], + }; +} + +export function partitionInstanceCountScaleMechanismDeserializer( + item: any, +): PartitionInstanceCountScaleMechanism { + return { + kind: item["kind"], + minInstanceCount: item["minInstanceCount"], + maxInstanceCount: item["maxInstanceCount"], + scaleIncrement: item["scaleIncrement"], + }; +} + +/** Describes the trigger for performing a scaling operation. */ +export interface ScalingTrigger { + kind: ServiceScalingTriggerKind; +} + +export function scalingTriggerSerializer(item: ScalingTrigger): any { + return { kind: item["kind"] }; +} + +export function scalingTriggerDeserializer(item: any): ScalingTrigger { + return { + kind: item["kind"], + }; +} + +/** Alias for ScalingTriggerUnion */ +export type ScalingTriggerUnion = + | AveragePartitionLoadScalingTrigger + | AverageServiceLoadScalingTrigger + | ScalingTrigger; + +export function scalingTriggerUnionSerializer(item: ScalingTriggerUnion): any { + switch (item.kind) { + case "AveragePartitionLoadTrigger": + return averagePartitionLoadScalingTriggerSerializer( + item as AveragePartitionLoadScalingTrigger, + ); + + case "AverageServiceLoadTrigger": + return averageServiceLoadScalingTriggerSerializer(item as AverageServiceLoadScalingTrigger); + + default: + return scalingTriggerSerializer(item); + } +} + +export function scalingTriggerUnionDeserializer(item: any): ScalingTriggerUnion { + switch (item.kind) { + case "AveragePartitionLoadTrigger": + return averagePartitionLoadScalingTriggerDeserializer( + item as AveragePartitionLoadScalingTrigger, + ); + + case "AverageServiceLoadTrigger": + return averageServiceLoadScalingTriggerDeserializer(item as AverageServiceLoadScalingTrigger); + + default: + return scalingTriggerDeserializer(item); + } +} + +/** Enumerates the ways that a service can be partitioned. */ +export type ServiceScalingTriggerKind = "AveragePartitionLoadTrigger" | "AverageServiceLoadTrigger"; + +/** Represents a scaling trigger related to an average load of a metric/resource of a partition. */ +export interface AveragePartitionLoadScalingTrigger extends ScalingTrigger { + /** The name of the metric for which usage should be tracked. */ + metricName: string; + /** The lower limit of the load below which a scale in operation should be performed. */ + lowerLoadThreshold: number; + /** The upper limit of the load beyond which a scale out operation should be performed. */ + upperLoadThreshold: number; + /** The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". */ + scaleInterval: string; + /** Specifies the trigger associated with this scaling policy. */ + kind: "AveragePartitionLoadTrigger"; +} + +export function averagePartitionLoadScalingTriggerSerializer( + item: AveragePartitionLoadScalingTrigger, +): any { + return { + kind: item["kind"], + metricName: item["metricName"], + lowerLoadThreshold: item["lowerLoadThreshold"], + upperLoadThreshold: item["upperLoadThreshold"], + scaleInterval: item["scaleInterval"], + }; +} + +export function averagePartitionLoadScalingTriggerDeserializer( + item: any, +): AveragePartitionLoadScalingTrigger { + return { + kind: item["kind"], + metricName: item["metricName"], + lowerLoadThreshold: item["lowerLoadThreshold"], + upperLoadThreshold: item["upperLoadThreshold"], + scaleInterval: item["scaleInterval"], + }; +} + +/** Represents a scaling policy related to an average load of a metric/resource of a service. */ +export interface AverageServiceLoadScalingTrigger extends ScalingTrigger { + /** The name of the metric for which usage should be tracked. */ + metricName: string; + /** The lower limit of the load below which a scale in operation should be performed. */ + lowerLoadThreshold: number; + /** The upper limit of the load beyond which a scale out operation should be performed. */ + upperLoadThreshold: number; + /** The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". */ + scaleInterval: string; + /** Flag determines whether only the load of primary replica should be considered for scaling. If set to true, then trigger will only consider the load of primary replicas of stateful service. If set to false, trigger will consider load of all replicas. This parameter cannot be set to true for stateless service. */ + useOnlyPrimaryLoad: boolean; + /** Specifies the trigger associated with this scaling policy. */ + kind: "AverageServiceLoadTrigger"; +} + +export function averageServiceLoadScalingTriggerSerializer( + item: AverageServiceLoadScalingTrigger, +): any { + return { + kind: item["kind"], + metricName: item["metricName"], + lowerLoadThreshold: item["lowerLoadThreshold"], + upperLoadThreshold: item["upperLoadThreshold"], + scaleInterval: item["scaleInterval"], + useOnlyPrimaryLoad: item["useOnlyPrimaryLoad"], + }; +} + +export function averageServiceLoadScalingTriggerDeserializer( + item: any, +): AverageServiceLoadScalingTrigger { + return { + kind: item["kind"], + metricName: item["metricName"], + lowerLoadThreshold: item["lowerLoadThreshold"], + upperLoadThreshold: item["upperLoadThreshold"], + scaleInterval: item["scaleInterval"], + useOnlyPrimaryLoad: item["useOnlyPrimaryLoad"], + }; +} + +/** Service update request */ +export interface ServiceUpdateParameters { + /** Service update parameters */ + tags?: Record; +} + +export function serviceUpdateParametersSerializer(item: ServiceUpdateParameters): any { + return { tags: item["tags"] }; +} + +/** The list of service resources. */ +export interface _ServiceResourceList { + /** The ServiceResource items on this page */ + value: ServiceResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _serviceResourceListDeserializer(item: any): _ServiceResourceList { + return { + value: serviceResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function serviceResourceArraySerializer(result: Array): any[] { + return result.map((item) => { + return serviceResourceSerializer(item); + }); +} + +export function serviceResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return serviceResourceDeserializer(item); + }); +} + +/** An application type version resource for the specified application type name resource. */ +export interface ApplicationTypeVersionResource extends ProxyResource { + /** The properties of the application type version resource. */ + properties?: ApplicationTypeVersionResourceProperties; + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location?: string; +} + +export function applicationTypeVersionResourceSerializer( + item: ApplicationTypeVersionResource, +): any { + return { + properties: !item["properties"] + ? item["properties"] + : applicationTypeVersionResourcePropertiesSerializer(item["properties"]), + tags: item["tags"], + location: item["location"], + }; +} + +export function applicationTypeVersionResourceDeserializer( + item: any, +): ApplicationTypeVersionResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : applicationTypeVersionResourcePropertiesDeserializer(item["properties"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** The properties of the application type version resource. */ +export interface ApplicationTypeVersionResourceProperties { + /** The current deployment or provisioning state, which only appears in the response */ + readonly provisioningState?: string; + /** The URL to the application package */ + appPackageUrl: string; +} + +export function applicationTypeVersionResourcePropertiesSerializer( + item: ApplicationTypeVersionResourceProperties, +): any { + return { appPackageUrl: item["appPackageUrl"] }; +} + +export function applicationTypeVersionResourcePropertiesDeserializer( + item: any, +): ApplicationTypeVersionResourceProperties { + return { + provisioningState: item["provisioningState"], + appPackageUrl: item["appPackageUrl"], + }; +} + +/** Application type version update request */ +export interface ApplicationTypeVersionUpdateParameters { + /** Application type version update parameters */ + tags?: Record; +} + +export function applicationTypeVersionUpdateParametersSerializer( + item: ApplicationTypeVersionUpdateParameters, +): any { + return { tags: item["tags"] }; +} + +/** The list of application type version resources for the specified application type name resource. */ +export interface _ApplicationTypeVersionResourceList { + /** The ApplicationTypeVersionResource items on this page */ + value: ApplicationTypeVersionResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationTypeVersionResourceListDeserializer( + item: any, +): _ApplicationTypeVersionResourceList { + return { + value: applicationTypeVersionResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function applicationTypeVersionResourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationTypeVersionResourceSerializer(item); + }); +} + +export function applicationTypeVersionResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationTypeVersionResourceDeserializer(item); + }); +} + +/** The application type name resource */ +export interface ApplicationTypeResource extends ProxyResource { + /** The application type name properties */ + properties?: ApplicationTypeResourceProperties; + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location?: string; +} + +export function applicationTypeResourceSerializer(item: ApplicationTypeResource): any { + return { + properties: !item["properties"] + ? item["properties"] + : applicationTypeResourcePropertiesSerializer(item["properties"]), + tags: item["tags"], + location: item["location"], + }; +} + +export function applicationTypeResourceDeserializer(item: any): ApplicationTypeResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : applicationTypeResourcePropertiesDeserializer(item["properties"]), + tags: item["tags"], + location: item["location"], + }; +} + +/** The application type name properties */ +export interface ApplicationTypeResourceProperties { + /** The current deployment or provisioning state, which only appears in the response. */ + readonly provisioningState?: string; +} + +export function applicationTypeResourcePropertiesSerializer( + item: ApplicationTypeResourceProperties, +): any { + return item; +} + +export function applicationTypeResourcePropertiesDeserializer( + item: any, +): ApplicationTypeResourceProperties { + return { + provisioningState: item["provisioningState"], + }; +} + +/** Application type update request */ +export interface ApplicationTypeUpdateParameters { + /** Application type update parameters */ + tags?: Record; +} + +export function applicationTypeUpdateParametersSerializer( + item: ApplicationTypeUpdateParameters, +): any { + return { tags: item["tags"] }; +} + +/** The list of application type names. */ +export interface _ApplicationTypeResourceList { + /** The ApplicationTypeResource items on this page */ + value: ApplicationTypeResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationTypeResourceListDeserializer(item: any): _ApplicationTypeResourceList { + return { + value: applicationTypeResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function applicationTypeResourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationTypeResourceSerializer(item); + }); +} + +export function applicationTypeResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationTypeResourceDeserializer(item); + }); +} + +/** The application resource. */ +export interface ApplicationResource extends ProxyResource { + /** The application resource properties. */ + properties?: ApplicationResourceProperties; + /** Resource tags. */ + tags?: Record; + /** Describes the managed identities for an Azure resource. */ + identity?: ManagedIdentity; + /** The geo-location where the resource lives */ + location?: string; +} + +export function applicationResourceSerializer(item: ApplicationResource): any { + return { + properties: !item["properties"] + ? item["properties"] + : applicationResourcePropertiesSerializer(item["properties"]), + tags: item["tags"], + identity: !item["identity"] ? item["identity"] : managedIdentitySerializer(item["identity"]), + location: item["location"], + }; +} + +export function applicationResourceDeserializer(item: any): ApplicationResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : applicationResourcePropertiesDeserializer(item["properties"]), + tags: item["tags"], + identity: !item["identity"] ? item["identity"] : managedIdentityDeserializer(item["identity"]), + location: item["location"], + }; +} + +/** The application resource properties. */ +export interface ApplicationResourceProperties { + /** The current deployment or provisioning state, which only appears in the response */ + readonly provisioningState?: string; + /** + * The version of the application type as defined in the application manifest. + * This name must be the full Arm Resource ID for the referenced application type version. + */ + version?: string; + /** List of application parameters with overridden values from their default values specified in the application manifest. */ + parameters?: Record; + /** Describes the policy for a monitored application upgrade. */ + upgradePolicy?: ApplicationUpgradePolicy; + /** List of user assigned identities for the application, each mapped to a friendly name. */ + managedIdentities?: ApplicationUserAssignedIdentity[]; +} + +export function applicationResourcePropertiesSerializer(item: ApplicationResourceProperties): any { + return { + version: item["version"], + parameters: item["parameters"], + upgradePolicy: !item["upgradePolicy"] + ? item["upgradePolicy"] + : applicationUpgradePolicySerializer(item["upgradePolicy"]), + managedIdentities: !item["managedIdentities"] + ? item["managedIdentities"] + : applicationUserAssignedIdentityArraySerializer(item["managedIdentities"]), + }; +} + +export function applicationResourcePropertiesDeserializer( + item: any, +): ApplicationResourceProperties { + return { + provisioningState: item["provisioningState"], + version: item["version"], + parameters: item["parameters"], + upgradePolicy: !item["upgradePolicy"] + ? item["upgradePolicy"] + : applicationUpgradePolicyDeserializer(item["upgradePolicy"]), + managedIdentities: !item["managedIdentities"] + ? item["managedIdentities"] + : applicationUserAssignedIdentityArrayDeserializer(item["managedIdentities"]), + }; +} + +/** Describes the policy for a monitored application upgrade. */ +export interface ApplicationUpgradePolicy { + /** Defines a health policy used to evaluate the health of an application or one of its children entities. */ + applicationHealthPolicy?: ApplicationHealthPolicy; + /** If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). */ + forceRestart?: boolean; + /** The policy used for monitoring the application upgrade */ + rollingUpgradeMonitoringPolicy?: RollingUpgradeMonitoringPolicy; + /** Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description. */ + instanceCloseDelayDuration?: number; + /** The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. */ + upgradeMode?: RollingUpgradeMode; + /** The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). */ + upgradeReplicaSetCheckTimeout?: number; + /** Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. */ + recreateApplication?: boolean; +} + +export function applicationUpgradePolicySerializer(item: ApplicationUpgradePolicy): any { + return { + applicationHealthPolicy: !item["applicationHealthPolicy"] + ? item["applicationHealthPolicy"] + : applicationHealthPolicySerializer(item["applicationHealthPolicy"]), + forceRestart: item["forceRestart"], + rollingUpgradeMonitoringPolicy: !item["rollingUpgradeMonitoringPolicy"] + ? item["rollingUpgradeMonitoringPolicy"] + : rollingUpgradeMonitoringPolicySerializer(item["rollingUpgradeMonitoringPolicy"]), + instanceCloseDelayDuration: item["instanceCloseDelayDuration"], + upgradeMode: item["upgradeMode"], + upgradeReplicaSetCheckTimeout: item["upgradeReplicaSetCheckTimeout"], + recreateApplication: item["recreateApplication"], + }; +} + +export function applicationUpgradePolicyDeserializer(item: any): ApplicationUpgradePolicy { + return { + applicationHealthPolicy: !item["applicationHealthPolicy"] + ? item["applicationHealthPolicy"] + : applicationHealthPolicyDeserializer(item["applicationHealthPolicy"]), + forceRestart: item["forceRestart"], + rollingUpgradeMonitoringPolicy: !item["rollingUpgradeMonitoringPolicy"] + ? item["rollingUpgradeMonitoringPolicy"] + : rollingUpgradeMonitoringPolicyDeserializer(item["rollingUpgradeMonitoringPolicy"]), + instanceCloseDelayDuration: item["instanceCloseDelayDuration"], + upgradeMode: item["upgradeMode"], + upgradeReplicaSetCheckTimeout: item["upgradeReplicaSetCheckTimeout"], + recreateApplication: item["recreateApplication"], + }; +} + +/** Defines a health policy used to evaluate the health of an application or one of its children entities. */ +export interface ApplicationHealthPolicy { + /** Indicates whether warnings are treated with the same severity as errors. */ + considerWarningAsError: boolean; + /** + * The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + */ + maxPercentUnhealthyDeployedApplications: number; + /** The health policy used by default to evaluate the health of a service type. */ + defaultServiceTypeHealthPolicy?: ServiceTypeHealthPolicy; + /** The map with service type health policy per service type name. The map is empty by default. */ + serviceTypeHealthPolicyMap?: Record; +} + +export function applicationHealthPolicySerializer(item: ApplicationHealthPolicy): any { + return { + considerWarningAsError: item["considerWarningAsError"], + maxPercentUnhealthyDeployedApplications: item["maxPercentUnhealthyDeployedApplications"], + defaultServiceTypeHealthPolicy: !item["defaultServiceTypeHealthPolicy"] + ? item["defaultServiceTypeHealthPolicy"] + : serviceTypeHealthPolicySerializer(item["defaultServiceTypeHealthPolicy"]), + serviceTypeHealthPolicyMap: !item["serviceTypeHealthPolicyMap"] + ? item["serviceTypeHealthPolicyMap"] + : serviceTypeHealthPolicyRecordSerializer(item["serviceTypeHealthPolicyMap"]), + }; +} + +export function applicationHealthPolicyDeserializer(item: any): ApplicationHealthPolicy { + return { + considerWarningAsError: item["considerWarningAsError"], + maxPercentUnhealthyDeployedApplications: item["maxPercentUnhealthyDeployedApplications"], + defaultServiceTypeHealthPolicy: !item["defaultServiceTypeHealthPolicy"] + ? item["defaultServiceTypeHealthPolicy"] + : serviceTypeHealthPolicyDeserializer(item["defaultServiceTypeHealthPolicy"]), + serviceTypeHealthPolicyMap: !item["serviceTypeHealthPolicyMap"] + ? item["serviceTypeHealthPolicyMap"] + : serviceTypeHealthPolicyRecordDeserializer(item["serviceTypeHealthPolicyMap"]), + }; +} + +/** Represents the health policy used to evaluate the health of services belonging to a service type. */ +export interface ServiceTypeHealthPolicy { + /** + * The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + */ + maxPercentUnhealthyServices: number; + /** + * The maximum allowed percentage of unhealthy partitions per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + */ + maxPercentUnhealthyPartitionsPerService: number; + /** + * The maximum allowed percentage of unhealthy replicas per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + */ + maxPercentUnhealthyReplicasPerPartition: number; +} + +export function serviceTypeHealthPolicySerializer(item: ServiceTypeHealthPolicy): any { + return { + maxPercentUnhealthyServices: item["maxPercentUnhealthyServices"], + maxPercentUnhealthyPartitionsPerService: item["maxPercentUnhealthyPartitionsPerService"], + maxPercentUnhealthyReplicasPerPartition: item["maxPercentUnhealthyReplicasPerPartition"], + }; +} + +export function serviceTypeHealthPolicyDeserializer(item: any): ServiceTypeHealthPolicy { + return { + maxPercentUnhealthyServices: item["maxPercentUnhealthyServices"], + maxPercentUnhealthyPartitionsPerService: item["maxPercentUnhealthyPartitionsPerService"], + maxPercentUnhealthyReplicasPerPartition: item["maxPercentUnhealthyReplicasPerPartition"], + }; +} + +export function serviceTypeHealthPolicyRecordSerializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : serviceTypeHealthPolicySerializer(item[key]); + }); + return result; +} + +export function serviceTypeHealthPolicyRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : serviceTypeHealthPolicyDeserializer(item[key]); + }); + return result; +} + +/** The policy used for monitoring the application upgrade */ +export interface RollingUpgradeMonitoringPolicy { + /** The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. */ + failureAction: FailureAction; + /** The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ + healthCheckWaitDuration: string; + /** The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ + healthCheckStableDuration: string; + /** The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ + healthCheckRetryTimeout: string; + /** The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ + upgradeTimeout: string; + /** The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". */ + upgradeDomainTimeout: string; +} + +export function rollingUpgradeMonitoringPolicySerializer( + item: RollingUpgradeMonitoringPolicy, +): any { + return { + failureAction: item["failureAction"], + healthCheckWaitDuration: item["healthCheckWaitDuration"], + healthCheckStableDuration: item["healthCheckStableDuration"], + healthCheckRetryTimeout: item["healthCheckRetryTimeout"], + upgradeTimeout: item["upgradeTimeout"], + upgradeDomainTimeout: item["upgradeDomainTimeout"], + }; +} + +export function rollingUpgradeMonitoringPolicyDeserializer( + item: any, +): RollingUpgradeMonitoringPolicy { + return { + failureAction: item["failureAction"], + healthCheckWaitDuration: item["healthCheckWaitDuration"], + healthCheckStableDuration: item["healthCheckStableDuration"], + healthCheckRetryTimeout: item["healthCheckRetryTimeout"], + upgradeTimeout: item["upgradeTimeout"], + upgradeDomainTimeout: item["upgradeDomainTimeout"], + }; +} + +/** The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. */ +export type FailureAction = "Rollback" | "Manual"; +/** The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. */ +export type RollingUpgradeMode = "Monitored" | "UnmonitoredAuto"; + +export function applicationUserAssignedIdentityArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationUserAssignedIdentitySerializer(item); + }); +} + +export function applicationUserAssignedIdentityArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return applicationUserAssignedIdentityDeserializer(item); + }); +} + +/** User assigned identity for the application. */ +export interface ApplicationUserAssignedIdentity { + /** The friendly name of user assigned identity. */ + name: string; + /** The principal id of user assigned identity. */ + principalId: string; +} + +export function applicationUserAssignedIdentitySerializer( + item: ApplicationUserAssignedIdentity, +): any { + return { name: item["name"], principalId: item["principalId"] }; +} + +export function applicationUserAssignedIdentityDeserializer( + item: any, +): ApplicationUserAssignedIdentity { + return { + name: item["name"], + principalId: item["principalId"], + }; +} + +/** Describes the managed identities for an Azure resource. */ +export interface ManagedIdentity { + /** The principal id of the managed identity. This property will only be provided for a system assigned identity. */ + readonly principalId?: string; + /** The tenant id of the managed identity. This property will only be provided for a system assigned identity. */ + readonly tenantId?: string; + /** The type of managed identity for the resource. */ + type?: ManagedIdentityType; + /** + * The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: Record; +} + +export function managedIdentitySerializer(item: ManagedIdentity): any { + return { + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : userAssignedIdentityRecordSerializer(item["userAssignedIdentities"]), + }; +} + +export function managedIdentityDeserializer(item: any): ManagedIdentity { + return { + principalId: item["principalId"], + tenantId: item["tenantId"], + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : userAssignedIdentityRecordDeserializer(item["userAssignedIdentities"]), + }; +} + +/** The type of managed identity for the resource. */ +export type ManagedIdentityType = + | "None" + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned, UserAssigned"; + +export function userAssignedIdentityRecordSerializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : userAssignedIdentitySerializer(item[key]); + }); + return result; +} + +export function userAssignedIdentityRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : userAssignedIdentityDeserializer(item[key]); + }); + return result; +} + +/** User assigned identity. */ +export interface UserAssignedIdentity { + /** The principal id of user assigned identity. */ + readonly principalId?: string; + /** The client id of user assigned identity. */ + readonly clientId?: string; +} + +export function userAssignedIdentitySerializer(item: UserAssignedIdentity): any { + return item; +} + +export function userAssignedIdentityDeserializer(item: any): UserAssignedIdentity { + return { + principalId: item["principalId"], + clientId: item["clientId"], + }; +} + +/** Application update request. */ +export interface ApplicationUpdateParameters { + /** Application update parameters */ + tags?: Record; +} + +export function applicationUpdateParametersSerializer(item: ApplicationUpdateParameters): any { + return { tags: item["tags"] }; +} + +/** The list of application resources. */ +export interface _ApplicationResourceList { + /** The ApplicationResource items on this page */ + value: ApplicationResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _applicationResourceListDeserializer(item: any): _ApplicationResourceList { + return { + value: applicationResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function applicationResourceArraySerializer(result: Array): any[] { + return result.map((item) => { + return applicationResourceSerializer(item); + }); +} + +export function applicationResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return applicationResourceDeserializer(item); + }); +} + +/** Parameters for Resume Upgrade action. The upgrade domain name must be specified. */ +export interface RuntimeResumeApplicationUpgradeParameters { + /** The upgrade domain name. Expected to be the next upgrade domain if the application is upgrading. */ + upgradeDomainName?: string; +} + +export function runtimeResumeApplicationUpgradeParametersSerializer( + item: RuntimeResumeApplicationUpgradeParameters, +): any { + return { upgradeDomainName: item["upgradeDomainName"] }; +} + +/** 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 { + /** The Operation items on this page */ + value: Operation[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** 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" */ + readonly name?: string; + /** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ + 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" */ + readonly origin?: Origin; + /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ + readonly actionType?: ActionType; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + isDataAction: item["isDataAction"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + actionType: item["actionType"], + }; +} + +/** Localized display information for and operation. */ +export interface OperationDisplay { + /** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ + readonly provider?: string; + /** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ + readonly resource?: string; + /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ + readonly operation?: string; + /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ + readonly description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + resource: item["resource"], + operation: item["operation"], + description: item["description"], + }; +} + +/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */ +export type Origin = "user" | "system" | "user,system"; +/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +export type ActionType = "Internal"; +/** The operating system of the cluster. The default means all. */ +export type Environment = "Windows" | "Linux"; + +/** The available API versions. */ +export enum KnownVersions { + /** The 2024-11-01-preview API version. */ + v2024_11_01_preview = "2024-11-01-preview", +} + +export function managedClusterCodeVersionResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return managedClusterCodeVersionResultDeserializer(item); + }); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts deleted file mode 100644 index 2194b2d777b4..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/parameters.ts +++ /dev/null @@ -1,302 +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 { - ApplicationTypeResource as ApplicationTypeResourceMapper, - ApplicationTypeUpdateParameters as ApplicationTypeUpdateParametersMapper, - ApplicationTypeVersionResource as ApplicationTypeVersionResourceMapper, - ApplicationTypeVersionUpdateParameters as ApplicationTypeVersionUpdateParametersMapper, - RuntimeResumeApplicationUpgradeParameters as RuntimeResumeApplicationUpgradeParametersMapper, - ApplicationResource as ApplicationResourceMapper, - ApplicationUpdateParameters as ApplicationUpdateParametersMapper, - ServiceResource as ServiceResourceMapper, - ServiceUpdateParameters as ServiceUpdateParametersMapper, - ManagedCluster as ManagedClusterMapper, - ManagedClusterUpdateParameters as ManagedClusterUpdateParametersMapper, - NodeTypeActionParameters as NodeTypeActionParametersMapper, - NodeType as NodeTypeMapper, - NodeTypeUpdateParameters as NodeTypeUpdateParametersMapper, -} 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: "String", - }, - }, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", - mapper: { - serializedName: "clusterName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const applicationTypeName: OperationURLParameter = { - parameterPath: "applicationTypeName", - mapper: { - serializedName: "applicationTypeName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2024-09-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationTypeResourceMapper, -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationTypeUpdateParametersMapper, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const version: OperationURLParameter = { - parameterPath: "version", - mapper: { - serializedName: "version", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationTypeVersionResourceMapper, -}; - -export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationTypeVersionUpdateParametersMapper, -}; - -export const applicationName: OperationURLParameter = { - parameterPath: "applicationName", - mapper: { - serializedName: "applicationName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: RuntimeResumeApplicationUpgradeParametersMapper, -}; - -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationResourceMapper, -}; - -export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: ApplicationUpdateParametersMapper, -}; - -export const serviceName: OperationURLParameter = { - parameterPath: "serviceName", - mapper: { - serializedName: "serviceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ServiceResourceMapper, -}; - -export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: ServiceUpdateParametersMapper, -}; - -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: ManagedClusterMapper, -}; - -export const parameters10: OperationParameter = { - parameterPath: "parameters", - mapper: ManagedClusterUpdateParametersMapper, -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, -}; - -export const clusterVersion: OperationURLParameter = { - parameterPath: "clusterVersion", - mapper: { - serializedName: "clusterVersion", - required: true, - type: { - name: "String", - }, - }, -}; - -export const environment: OperationURLParameter = { - parameterPath: "environment", - mapper: { - serializedName: "environment", - required: true, - type: { - name: "String", - }, - }, -}; - -export const vmSize: OperationURLParameter = { - parameterPath: "vmSize", - mapper: { - serializedName: "vmSize", - required: true, - type: { - name: "String", - }, - }, -}; - -export const operationId: OperationURLParameter = { - parameterPath: "operationId", - mapper: { - serializedName: "operationId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters11: OperationParameter = { - parameterPath: "parameters", - mapper: NodeTypeActionParametersMapper, -}; - -export const nodeTypeName: OperationURLParameter = { - parameterPath: "nodeTypeName", - mapper: { - serializedName: "nodeTypeName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const parameters12: OperationParameter = { - parameterPath: "parameters", - mapper: NodeTypeMapper, -}; - -export const parameters13: OperationParameter = { - parameterPath: "parameters", - mapper: NodeTypeUpdateParametersMapper, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypeVersions.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypeVersions.ts deleted file mode 100644 index 745c91e10dab..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypeVersions.ts +++ /dev/null @@ -1,606 +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 { ApplicationTypeVersions } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApplicationTypeVersionResource, - ApplicationTypeVersionsListByApplicationTypesNextOptionalParams, - ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ApplicationTypeVersionsListByApplicationTypesResponse, - ApplicationTypeVersionsGetOptionalParams, - ApplicationTypeVersionsGetResponse, - ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ApplicationTypeVersionsCreateOrUpdateResponse, - ApplicationTypeVersionUpdateParameters, - ApplicationTypeVersionsUpdateOptionalParams, - ApplicationTypeVersionsUpdateResponse, - ApplicationTypeVersionsDeleteOptionalParams, - ApplicationTypeVersionsListByApplicationTypesNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationTypeVersions operations. */ -export class ApplicationTypeVersionsImpl implements ApplicationTypeVersions { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ApplicationTypeVersions class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets all application type version resources created or in the process of being created in the - * Service Fabric managed application type name resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - public listByApplicationTypes( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApplicationTypesPagingAll( - resourceGroupName, - clusterName, - applicationTypeName, - 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.listByApplicationTypesPagingPage( - resourceGroupName, - clusterName, - applicationTypeName, - options, - settings, - ); - }, - }; - } - - private async *listByApplicationTypesPagingPage( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationTypeVersionsListByApplicationTypesResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApplicationTypes( - resourceGroupName, - clusterName, - applicationTypeName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApplicationTypesNext( - resourceGroupName, - clusterName, - applicationTypeName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApplicationTypesPagingAll( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApplicationTypesPagingPage( - resourceGroupName, - clusterName, - applicationTypeName, - options, - )) { - yield* page; - } - } - - /** - * Get a Service Fabric managed application type version resource created or in the process of being - * created in the Service Fabric managed application type name resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - options?: ApplicationTypeVersionsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationTypeName, version, options }, - getOperationSpec, - ); - } - - /** - * Create or update a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param parameters The application type version resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - parameters: ApplicationTypeVersionResource, - options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationTypeVersionsCreateOrUpdateResponse - > - > { - 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, - clusterName, - applicationTypeName, - version, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationTypeVersionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param parameters The application type version resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - parameters: ApplicationTypeVersionResource, - options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the tags of an application type version resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param parameters The application type version resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - parameters: ApplicationTypeVersionUpdateParameters, - options?: ApplicationTypeVersionsUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - applicationTypeName, - version, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Delete a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - options?: ApplicationTypeVersionsDeleteOptionalParams, - ): 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, - clusterName, - applicationTypeName, - version, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - options?: ApplicationTypeVersionsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - applicationTypeName, - version, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all application type version resources created or in the process of being created in the - * Service Fabric managed application type name resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - private _listByApplicationTypes( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationTypeName, options }, - listByApplicationTypesOperationSpec, - ); - } - - /** - * ListByApplicationTypesNext - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param nextLink The nextLink from the previous successful call to the ListByApplicationTypes method. - * @param options The options parameters. - */ - private _listByApplicationTypesNext( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - nextLink: string, - options?: ApplicationTypeVersionsListByApplicationTypesNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - applicationTypeName, - nextLink, - options, - }, - listByApplicationTypesNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeVersionResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - Parameters.version, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeVersionResource, - }, - 201: { - bodyMapper: Mappers.ApplicationTypeVersionResource, - }, - 202: { - bodyMapper: Mappers.ApplicationTypeVersionResource, - }, - 204: { - bodyMapper: Mappers.ApplicationTypeVersionResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - Parameters.version, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeVersionResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - Parameters.version, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - Parameters.version, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApplicationTypesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeVersionResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApplicationTypesNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeVersionResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypes.ts deleted file mode 100644 index 9b0106b29a2f..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applicationTypes.ts +++ /dev/null @@ -1,463 +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 { ApplicationTypes } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApplicationTypeResource, - ApplicationTypesListNextOptionalParams, - ApplicationTypesListOptionalParams, - ApplicationTypesListResponse, - ApplicationTypesGetOptionalParams, - ApplicationTypesGetResponse, - ApplicationTypesCreateOrUpdateOptionalParams, - ApplicationTypesCreateOrUpdateResponse, - ApplicationTypeUpdateParameters, - ApplicationTypesUpdateOptionalParams, - ApplicationTypesUpdateResponse, - ApplicationTypesDeleteOptionalParams, - ApplicationTypesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApplicationTypes operations. */ -export class ApplicationTypesImpl implements ApplicationTypes { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ApplicationTypes class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets all application type name resources created or in the process of being created in the Service - * Fabric managed cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterName: string, - options?: ApplicationTypesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, 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, - clusterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterName: string, - options?: ApplicationTypesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationTypesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, clusterName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterName: string, - options?: ApplicationTypesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Get a Service Fabric application type name resource created or in the process of being created in - * the Service Fabric managed cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationTypeName, options }, - getOperationSpec, - ); - } - - /** - * Create or update a Service Fabric managed application type name resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param parameters The application type name resource. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - parameters: ApplicationTypeResource, - options?: ApplicationTypesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the tags of an application type resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param parameters The application type resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - parameters: ApplicationTypeUpdateParameters, - options?: ApplicationTypesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - applicationTypeName, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Delete a Service Fabric managed application type name resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypesDeleteOptionalParams, - ): 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, clusterName, applicationTypeName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Service Fabric managed application type name resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - applicationTypeName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all application type name resources created or in the process of being created in the Service - * Fabric managed cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterName: string, - options?: ApplicationTypesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: ApplicationTypesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationTypeResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applications.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applications.ts deleted file mode 100644 index 6567fc470ee7..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/applications.ts +++ /dev/null @@ -1,949 +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 { Applications } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApplicationResource, - ApplicationsListNextOptionalParams, - ApplicationsListOptionalParams, - ApplicationsListResponse, - ApplicationsReadUpgradeOptionalParams, - ApplicationsReadUpgradeResponse, - ApplicationsStartRollbackOptionalParams, - ApplicationsStartRollbackResponse, - RuntimeResumeApplicationUpgradeParameters, - ApplicationsResumeUpgradeOptionalParams, - ApplicationsResumeUpgradeResponse, - ApplicationsGetOptionalParams, - ApplicationsGetResponse, - ApplicationsCreateOrUpdateOptionalParams, - ApplicationsCreateOrUpdateResponse, - ApplicationUpdateParameters, - ApplicationsUpdateOptionalParams, - ApplicationsUpdateResponse, - ApplicationsDeleteOptionalParams, - ApplicationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Applications operations. */ -export class ApplicationsImpl implements Applications { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class Applications class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets all managed application resources created or in the process of being created in the Service - * Fabric cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterName: string, - options?: ApplicationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, 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, - clusterName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterName: string, - options?: ApplicationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApplicationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, clusterName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterName: string, - options?: ApplicationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Get the status of the latest application upgrade. It will query the cluster to find the status of - * the latest application upgrade. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - async beginReadUpgrade( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsReadUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsReadUpgradeResponse - > - > { - 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, clusterName, applicationName, options }, - spec: readUpgradeOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationsReadUpgradeResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Get the status of the latest application upgrade. It will query the cluster to find the status of - * the latest application upgrade. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - async beginReadUpgradeAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsReadUpgradeOptionalParams, - ): Promise { - const poller = await this.beginReadUpgrade( - resourceGroupName, - clusterName, - applicationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Send a request to start a rollback of the current application upgrade. This will start rolling back - * the application to the previous version. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - async beginStartRollback( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsStartRollbackOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsStartRollbackResponse - > - > { - 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, clusterName, applicationName, options }, - spec: startRollbackOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationsStartRollbackResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Send a request to start a rollback of the current application upgrade. This will start rolling back - * the application to the previous version. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - async beginStartRollbackAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsStartRollbackOptionalParams, - ): Promise { - const poller = await this.beginStartRollback( - resourceGroupName, - clusterName, - applicationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Send a request to resume the current application upgrade. This will resume the application upgrade - * from where it was paused. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @param options The options parameters. - */ - async beginResumeUpgrade( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: RuntimeResumeApplicationUpgradeParameters, - options?: ApplicationsResumeUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsResumeUpgradeResponse - > - > { - 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, - clusterName, - applicationName, - parameters, - options, - }, - spec: resumeUpgradeOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationsResumeUpgradeResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Send a request to resume the current application upgrade. This will resume the application upgrade - * from where it was paused. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @param options The options parameters. - */ - async beginResumeUpgradeAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: RuntimeResumeApplicationUpgradeParameters, - options?: ApplicationsResumeUpgradeOptionalParams, - ): Promise { - const poller = await this.beginResumeUpgrade( - resourceGroupName, - clusterName, - applicationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get a Service Fabric managed application resource created or in the process of being created in the - * Service Fabric cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationName, options }, - getOperationSpec, - ); - } - - /** - * Create or update a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: ApplicationResource, - options?: ApplicationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsCreateOrUpdateResponse - > - > { - 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, - clusterName, - applicationName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApplicationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: ApplicationResource, - options?: ApplicationsCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - applicationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the tags of an application resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: ApplicationUpdateParameters, - options?: ApplicationsUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationName, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Delete a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsDeleteOptionalParams, - ): 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, clusterName, applicationName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - applicationName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all managed application resources created or in the process of being created in the Service - * Fabric cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterName: string, - options?: ApplicationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: ApplicationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const readUpgradeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ApplicationsReadUpgradeHeaders, - }, - 201: { - headersMapper: Mappers.ApplicationsReadUpgradeHeaders, - }, - 202: { - headersMapper: Mappers.ApplicationsReadUpgradeHeaders, - }, - 204: { - headersMapper: Mappers.ApplicationsReadUpgradeHeaders, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startRollbackOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ApplicationsStartRollbackHeaders, - }, - 201: { - headersMapper: Mappers.ApplicationsStartRollbackHeaders, - }, - 202: { - headersMapper: Mappers.ApplicationsStartRollbackHeaders, - }, - 204: { - headersMapper: Mappers.ApplicationsStartRollbackHeaders, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const resumeUpgradeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.ApplicationsResumeUpgradeHeaders, - }, - 201: { - headersMapper: Mappers.ApplicationsResumeUpgradeHeaders, - }, - 202: { - headersMapper: Mappers.ApplicationsResumeUpgradeHeaders, - }, - 204: { - headersMapper: Mappers.ApplicationsResumeUpgradeHeaders, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApplicationResource, - }, - 201: { - bodyMapper: Mappers.ApplicationResource, - }, - 202: { - bodyMapper: Mappers.ApplicationResource, - }, - 204: { - bodyMapper: Mappers.ApplicationResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApplicationResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApplicationResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/index.ts deleted file mode 100644 index 0f9eb8707471..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/index.ts +++ /dev/null @@ -1,23 +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 "./applicationTypes.js"; -export * from "./applicationTypeVersions.js"; -export * from "./applications.js"; -export * from "./services.js"; -export * from "./managedClusters.js"; -export * from "./managedAzResiliencyStatusOperations.js"; -export * from "./managedMaintenanceWindowStatusOperations.js"; -export * from "./managedApplyMaintenanceWindow.js"; -export * from "./managedClusterVersion.js"; -export * from "./managedUnsupportedVMSizes.js"; -export * from "./operationStatus.js"; -export * from "./operationResults.js"; -export * from "./operations.js"; -export * from "./nodeTypes.js"; -export * from "./nodeTypeSkus.js"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedApplyMaintenanceWindow.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedApplyMaintenanceWindow.ts deleted file mode 100644 index 8c5ae9570ab6..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedApplyMaintenanceWindow.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 { ManagedApplyMaintenanceWindow } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { ManagedApplyMaintenanceWindowPostOptionalParams } from "../models/index.js"; - -/** Class containing ManagedApplyMaintenanceWindow operations. */ -export class ManagedApplyMaintenanceWindowImpl - implements ManagedApplyMaintenanceWindow -{ - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ManagedApplyMaintenanceWindow class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending - * update will be applied. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - clusterName: string, - options?: ManagedApplyMaintenanceWindowPostOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - postOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const postOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applyMaintenanceWindow", - httpMethod: "POST", - responses: { - 200: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedAzResiliencyStatusOperations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedAzResiliencyStatusOperations.ts deleted file mode 100644 index f9beeb63bc1d..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedAzResiliencyStatusOperations.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 { ManagedAzResiliencyStatusOperations } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - ManagedAzResiliencyStatusGetOptionalParams, - ManagedAzResiliencyStatusGetResponse, -} from "../models/index.js"; - -/** Class containing ManagedAzResiliencyStatusOperations operations. */ -export class ManagedAzResiliencyStatusOperationsImpl - implements ManagedAzResiliencyStatusOperations -{ - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ManagedAzResiliencyStatusOperations class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed - * Clusters. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ManagedAzResiliencyStatusGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ManagedAzResiliencyStatus, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusterVersion.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusterVersion.ts deleted file mode 100644 index 0f791cb0ffa3..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusterVersion.ts +++ /dev/null @@ -1,212 +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 { ManagedClusterVersion } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - ManagedClusterVersionGetOptionalParams, - ManagedClusterVersionGetResponse, - ManagedClusterVersionEnvironment, - ManagedClusterVersionGetByEnvironmentOptionalParams, - ManagedClusterVersionGetByEnvironmentResponse, - ManagedClusterVersionListOptionalParams, - ManagedClusterVersionListResponse, - ManagedClusterVersionListByEnvironmentOptionalParams, - ManagedClusterVersionListByEnvironmentResponse, -} from "../models/index.js"; - -/** Class containing ManagedClusterVersion operations. */ -export class ManagedClusterVersionImpl implements ManagedClusterVersion { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ManagedClusterVersion class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets information about an available Service Fabric managed cluster code version. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param clusterVersion The cluster code version. - * @param options The options parameters. - */ - get( - location: string, - clusterVersion: string, - options?: ManagedClusterVersionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, clusterVersion, options }, - getOperationSpec, - ); - } - - /** - * Gets information about an available Service Fabric cluster code version by environment. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. - * @param options The options parameters. - */ - getByEnvironment( - location: string, - environment: ManagedClusterVersionEnvironment, - clusterVersion: string, - options?: ManagedClusterVersionGetByEnvironmentOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, environment, clusterVersion, options }, - getByEnvironmentOperationSpec, - ); - } - - /** - * Gets all available code versions for Service Fabric cluster resources by location. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param options The options parameters. - */ - list( - location: string, - options?: ManagedClusterVersionListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - listOperationSpec, - ); - } - - /** - * Gets all available code versions for Service Fabric cluster resources by environment. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param options The options parameters. - */ - listByEnvironment( - location: string, - environment: ManagedClusterVersionEnvironment, - options?: ManagedClusterVersionListByEnvironmentOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, environment, options }, - listByEnvironmentOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterCodeVersionResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.clusterVersion, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getByEnvironmentOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterCodeVersionResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.clusterVersion, - Parameters.environment, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedClusterCodeVersionResult", - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByEnvironmentOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedClusterCodeVersionResult", - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.environment, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusters.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusters.ts deleted file mode 100644 index 38fffdb3a292..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedClusters.ts +++ /dev/null @@ -1,631 +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 { ManagedClusters } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ManagedCluster, - ManagedClustersListByResourceGroupNextOptionalParams, - ManagedClustersListByResourceGroupOptionalParams, - ManagedClustersListByResourceGroupResponse, - ManagedClustersListBySubscriptionNextOptionalParams, - ManagedClustersListBySubscriptionOptionalParams, - ManagedClustersListBySubscriptionResponse, - ManagedClustersGetOptionalParams, - ManagedClustersGetResponse, - ManagedClustersCreateOrUpdateOptionalParams, - ManagedClustersCreateOrUpdateResponse, - ManagedClusterUpdateParameters, - ManagedClustersUpdateOptionalParams, - ManagedClustersUpdateResponse, - ManagedClustersDeleteOptionalParams, - ManagedClustersListByResourceGroupNextResponse, - ManagedClustersListBySubscriptionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ManagedClusters operations. */ -export class ManagedClustersImpl implements ManagedClusters { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ManagedClusters class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource - * group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ManagedClustersListByResourceGroupOptionalParams, - ): 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?: ManagedClustersListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ManagedClustersListByResourceGroupResponse; - 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?: ManagedClustersListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * Gets all Service Fabric cluster resources created or in the process of being created in the - * subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: ManagedClustersListBySubscriptionOptionalParams, - ): 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?: ManagedClustersListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ManagedClustersListBySubscriptionResponse; - 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?: ManagedClustersListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource - * group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ManagedClustersListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all Service Fabric cluster resources created or in the process of being created in the - * subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ManagedClustersListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * Get a Service Fabric managed cluster resource created or in the process of being created in the - * specified resource group. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ManagedClustersGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - getOperationSpec, - ); - } - - /** - * Create or update a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - parameters: ManagedCluster, - options?: ManagedClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ManagedClustersCreateOrUpdateResponse - > - > { - 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, clusterName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ManagedClustersCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - parameters: ManagedCluster, - options?: ManagedClustersCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update the tags of of a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - parameters: ManagedClusterUpdateParameters, - options?: ManagedClustersUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Delete a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ManagedClustersDeleteOptionalParams, - ): 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, clusterName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ManagedClustersDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ManagedClustersListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ManagedClustersListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedCluster, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ManagedCluster, - }, - 201: { - bodyMapper: Mappers.ManagedCluster, - }, - 202: { - bodyMapper: Mappers.ManagedCluster, - }, - 204: { - bodyMapper: Mappers.ManagedCluster, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ManagedCluster, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedMaintenanceWindowStatusOperations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedMaintenanceWindowStatusOperations.ts deleted file mode 100644 index fdb916ae6e8a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedMaintenanceWindowStatusOperations.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 { ManagedMaintenanceWindowStatusOperations } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - ManagedMaintenanceWindowStatusGetOptionalParams, - ManagedMaintenanceWindowStatusGetResponse, -} from "../models/index.js"; - -/** Class containing ManagedMaintenanceWindowStatusOperations operations. */ -export class ManagedMaintenanceWindowStatusOperationsImpl - implements ManagedMaintenanceWindowStatusOperations -{ - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ManagedMaintenanceWindowStatusOperations class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ManagedMaintenanceWindowStatusGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ManagedMaintenanceWindowStatus, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedUnsupportedVMSizes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedUnsupportedVMSizes.ts deleted file mode 100644 index 3d470c643485..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/managedUnsupportedVMSizes.ts +++ /dev/null @@ -1,211 +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 { ManagedUnsupportedVMSizes } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - ManagedVMSize, - ManagedUnsupportedVMSizesListNextOptionalParams, - ManagedUnsupportedVMSizesListOptionalParams, - ManagedUnsupportedVMSizesListResponse, - ManagedUnsupportedVMSizesGetOptionalParams, - ManagedUnsupportedVMSizesGetResponse, - ManagedUnsupportedVMSizesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ManagedUnsupportedVMSizes operations. */ -export class ManagedUnsupportedVMSizesImpl - implements ManagedUnsupportedVMSizes -{ - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class ManagedUnsupportedVMSizes class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param options The options parameters. - */ - public list( - location: string, - options?: ManagedUnsupportedVMSizesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(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.listPagingPage(location, options, settings); - }, - }; - } - - private async *listPagingPage( - location: string, - options?: ManagedUnsupportedVMSizesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ManagedUnsupportedVMSizesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(location, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(location, continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - location: string, - options?: ManagedUnsupportedVMSizesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param options The options parameters. - */ - private _list( - location: string, - options?: ManagedUnsupportedVMSizesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - listOperationSpec, - ); - } - - /** - * Get unsupported vm size for Service Fabric Managed Clusters. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. - * @param options The options parameters. - */ - get( - location: string, - vmSize: string, - options?: ManagedUnsupportedVMSizesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, vmSize, options }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param location The location for the cluster code versions. This is different from cluster location. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - location: string, - nextLink: string, - options?: ManagedUnsupportedVMSizesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedVMSizesResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedVMSize, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.vmSize, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedVMSizesResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypeSkus.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypeSkus.ts deleted file mode 100644 index 1effa0acffd0..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypeSkus.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 { NodeTypeSkus } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - NodeTypeAvailableSku, - NodeTypeSkusListNextOptionalParams, - NodeTypeSkusListOptionalParams, - NodeTypeSkusListResponse, - NodeTypeSkusListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NodeTypeSkus operations. */ -export class NodeTypeSkusImpl implements NodeTypeSkus { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class NodeTypeSkus class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Get a Service Fabric node type supported SKUs. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypeSkusListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - clusterName, - nodeTypeName, - 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, - clusterName, - nodeTypeName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypeSkusListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NodeTypeSkusListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - clusterName, - nodeTypeName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterName, - nodeTypeName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypeSkusListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterName, - nodeTypeName, - options, - )) { - yield* page; - } - } - - /** - * Get a Service Fabric node type supported SKUs. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypeSkusListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nodeTypeName, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - nextLink: string, - options?: NodeTypeSkusListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nodeTypeName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NodeTypeListSkuResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NodeTypeListSkuResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nextLink, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts deleted file mode 100644 index fab14fc9cfd3..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/nodeTypes.ts +++ /dev/null @@ -1,1023 +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 { NodeTypes } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - NodeType, - NodeTypesListByManagedClustersNextOptionalParams, - NodeTypesListByManagedClustersOptionalParams, - NodeTypesListByManagedClustersResponse, - NodeTypeActionParameters, - NodeTypesRestartOptionalParams, - NodeTypesReimageOptionalParams, - NodeTypesDeleteNodeOptionalParams, - NodeTypesGetOptionalParams, - NodeTypesGetResponse, - NodeTypesCreateOrUpdateOptionalParams, - NodeTypesCreateOrUpdateResponse, - NodeTypeUpdateParameters, - NodeTypesUpdateOptionalParams, - NodeTypesUpdateResponse, - NodeTypesDeleteOptionalParams, - NodeTypesListByManagedClustersNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NodeTypes operations. */ -export class NodeTypesImpl implements NodeTypes { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class NodeTypes class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets all Node types of the specified managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - public listByManagedClusters( - resourceGroupName: string, - clusterName: string, - options?: NodeTypesListByManagedClustersOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByManagedClustersPagingAll( - resourceGroupName, - 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.listByManagedClustersPagingPage( - resourceGroupName, - clusterName, - options, - settings, - ); - }, - }; - } - - private async *listByManagedClustersPagingPage( - resourceGroupName: string, - clusterName: string, - options?: NodeTypesListByManagedClustersOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NodeTypesListByManagedClustersResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByManagedClusters( - resourceGroupName, - clusterName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByManagedClustersNext( - resourceGroupName, - clusterName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByManagedClustersPagingAll( - resourceGroupName: string, - clusterName: string, - options?: NodeTypesListByManagedClustersOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByManagedClustersPagingPage( - resourceGroupName, - clusterName, - options, - )) { - yield* page; - } - } - - /** - * Gets all Node types of the specified managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - private _listByManagedClusters( - resourceGroupName: string, - clusterName: string, - options?: NodeTypesListByManagedClustersOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - listByManagedClustersOperationSpec, - ); - } - - /** - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. - * @param options The options parameters. - */ - async beginRestart( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesRestartOptionalParams, - ): 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, - clusterName, - nodeTypeName, - parameters, - options, - }, - spec: restartOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. - * @param options The options parameters. - */ - async beginRestartAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesRestartOptionalParams, - ): Promise { - const poller = await this.beginRestart( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. - * @param options The options parameters. - */ - async beginReimage( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesReimageOptionalParams, - ): 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, - clusterName, - nodeTypeName, - parameters, - options, - }, - spec: reimageOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. - * @param options The options parameters. - */ - async beginReimageAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesReimageOptionalParams, - ): Promise { - const poller = await this.beginReimage( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on - * the VMs and removes the state from the cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. - * @param options The options parameters. - */ - async beginDeleteNode( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesDeleteNodeOptionalParams, - ): 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, - clusterName, - nodeTypeName, - parameters, - options, - }, - spec: deleteNodeOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on - * the VMs and removes the state from the cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. - * @param options The options parameters. - */ - async beginDeleteNodeAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesDeleteNodeOptionalParams, - ): Promise { - const poller = await this.beginDeleteNode( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Get a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nodeTypeName, options }, - getOperationSpec, - ); - } - - /** - * Create or update a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeType, - options?: NodeTypesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NodeTypesCreateOrUpdateResponse - > - > { - 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, - clusterName, - nodeTypeName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NodeTypesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeType, - options?: NodeTypesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Update the configuration of a node type of a given managed cluster, only updating tags. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeUpdateParameters, - options?: NodeTypesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NodeTypesUpdateResponse - > - > { - 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, - clusterName, - nodeTypeName, - parameters, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - NodeTypesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Update the configuration of a node type of a given managed cluster, only updating tags. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeUpdateParameters, - options?: NodeTypesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterName, - nodeTypeName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Delete a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypesDeleteOptionalParams, - ): 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, clusterName, nodeTypeName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - nodeTypeName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByManagedClustersNext - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nextLink The nextLink from the previous successful call to the ListByManagedClusters method. - * @param options The options parameters. - */ - private _listByManagedClustersNext( - resourceGroupName: string, - clusterName: string, - nextLink: string, - options?: NodeTypesListByManagedClustersNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, nextLink, options }, - listByManagedClustersNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByManagedClustersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NodeTypeListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const restartOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const reimageOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteNodeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NodeType, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NodeType, - }, - 201: { - bodyMapper: Mappers.NodeType, - }, - 202: { - bodyMapper: Mappers.NodeType, - }, - 204: { - bodyMapper: Mappers.NodeType, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NodeType, - }, - 201: { - bodyMapper: Mappers.NodeType, - }, - 202: { - bodyMapper: Mappers.NodeType, - }, - 204: { - bodyMapper: Mappers.NodeType, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters13, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nodeTypeName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByManagedClustersNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NodeTypeListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationResults.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationResults.ts deleted file mode 100644 index cd0d95a3f502..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationResults.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 { OperationResults } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - OperationResultsGetOptionalParams, - OperationResultsGetResponse, -} from "../models/index.js"; - -/** Class containing OperationResults operations. */ -export class OperationResultsImpl implements OperationResults { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class OperationResults class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Get long running operation result. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param operationId operation identifier. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationResultsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, operationId, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}", - httpMethod: "GET", - responses: { - 200: {}, - 202: { - headersMapper: Mappers.OperationResultsGetHeaders, - }, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationStatus.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationStatus.ts deleted file mode 100644 index a41223bf087b..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operationStatus.ts +++ /dev/null @@ -1,71 +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 { OperationStatus } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - OperationStatusGetOptionalParams, - OperationStatusGetResponse, -} from "../models/index.js"; - -/** Class containing OperationStatus operations. */ -export class OperationStatusImpl implements OperationStatus { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class OperationStatus class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Get long running operation status. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param operationId operation identifier. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationStatusGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, operationId, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LongRunningOperationResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/operations.ts deleted file mode 100644 index a191f28056c3..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - OperationResult, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Get the list of available Service Fabric resource provider API 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; - } - } - - /** - * Get the list of available Service Fabric resource provider API 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.ServiceFabric/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - 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.ErrorModel, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/services.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/services.ts deleted file mode 100644 index 4957a7a02483..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operations/services.ts +++ /dev/null @@ -1,606 +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 { Services } 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 { ServiceFabricManagedClustersManagementClient } from "../serviceFabricManagedClustersManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ServiceResource, - ServicesListByApplicationsNextOptionalParams, - ServicesListByApplicationsOptionalParams, - ServicesListByApplicationsResponse, - ServicesGetOptionalParams, - ServicesGetResponse, - ServicesCreateOrUpdateOptionalParams, - ServicesCreateOrUpdateResponse, - ServiceUpdateParameters, - ServicesUpdateOptionalParams, - ServicesUpdateResponse, - ServicesDeleteOptionalParams, - ServicesListByApplicationsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Services operations. */ -export class ServicesImpl implements Services { - private readonly client: ServiceFabricManagedClustersManagementClient; - - /** - * Initialize a new instance of the class Services class. - * @param client Reference to the service client - */ - constructor(client: ServiceFabricManagedClustersManagementClient) { - this.client = client; - } - - /** - * Gets all service resources created or in the process of being created in the Service Fabric managed - * application resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - public listByApplications( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ServicesListByApplicationsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApplicationsPagingAll( - resourceGroupName, - clusterName, - applicationName, - 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.listByApplicationsPagingPage( - resourceGroupName, - clusterName, - applicationName, - options, - settings, - ); - }, - }; - } - - private async *listByApplicationsPagingPage( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ServicesListByApplicationsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ServicesListByApplicationsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApplications( - resourceGroupName, - clusterName, - applicationName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApplicationsNext( - resourceGroupName, - clusterName, - applicationName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApplicationsPagingAll( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ServicesListByApplicationsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApplicationsPagingPage( - resourceGroupName, - clusterName, - applicationName, - options, - )) { - yield* page; - } - } - - /** - * Get a Service Fabric service resource created or in the process of being created in the Service - * Fabric managed application resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - options?: ServicesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationName, serviceName, options }, - getOperationSpec, - ); - } - - /** - * Create or update a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param parameters The service resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - parameters: ServiceResource, - options?: ServicesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServicesCreateOrUpdateResponse - > - > { - 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, - clusterName, - applicationName, - serviceName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ServicesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Create or update a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param parameters The service resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - parameters: ServiceResource, - options?: ServicesCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the tags of a service resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param parameters The service resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - parameters: ServiceUpdateParameters, - options?: ServicesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - applicationName, - serviceName, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Delete a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - options?: ServicesDeleteOptionalParams, - ): 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, - clusterName, - applicationName, - serviceName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Delete a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - options?: ServicesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - applicationName, - serviceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all service resources created or in the process of being created in the Service Fabric managed - * application resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - private _listByApplications( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ServicesListByApplicationsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationName, options }, - listByApplicationsOperationSpec, - ); - } - - /** - * ListByApplicationsNext - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param nextLink The nextLink from the previous successful call to the ListByApplications method. - * @param options The options parameters. - */ - private _listByApplicationsNext( - resourceGroupName: string, - clusterName: string, - applicationName: string, - nextLink: string, - options?: ServicesListByApplicationsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, applicationName, nextLink, options }, - listByApplicationsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ServiceResource, - }, - 201: { - bodyMapper: Mappers.ServiceResource, - }, - 202: { - bodyMapper: Mappers.ServiceResource, - }, - 204: { - bodyMapper: Mappers.ServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApplicationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApplicationsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceResourceList, - }, - default: { - bodyMapper: Mappers.ErrorModel, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName, - Parameters.nextLink, - Parameters.applicationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypeVersions.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypeVersions.ts deleted file mode 100644 index 8e4a1201552a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypeVersions.ts +++ /dev/null @@ -1,143 +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 { - ApplicationTypeVersionResource, - ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ApplicationTypeVersionsGetOptionalParams, - ApplicationTypeVersionsGetResponse, - ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ApplicationTypeVersionsCreateOrUpdateResponse, - ApplicationTypeVersionUpdateParameters, - ApplicationTypeVersionsUpdateOptionalParams, - ApplicationTypeVersionsUpdateResponse, - ApplicationTypeVersionsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationTypeVersions. */ -export interface ApplicationTypeVersions { - /** - * Gets all application type version resources created or in the process of being created in the - * Service Fabric managed application type name resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - listByApplicationTypes( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Service Fabric managed application type version resource created or in the process of being - * created in the Service Fabric managed application type name resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - options?: ApplicationTypeVersionsGetOptionalParams, - ): Promise; - /** - * Create or update a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param parameters The application type version resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - parameters: ApplicationTypeVersionResource, - options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationTypeVersionsCreateOrUpdateResponse - > - >; - /** - * Create or update a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param parameters The application type version resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - parameters: ApplicationTypeVersionResource, - options?: ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the tags of an application type version resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param parameters The application type version resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - parameters: ApplicationTypeVersionUpdateParameters, - options?: ApplicationTypeVersionsUpdateOptionalParams, - ): Promise; - /** - * Delete a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - options?: ApplicationTypeVersionsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Service Fabric managed application type version resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param version The application type version. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - version: string, - options?: ApplicationTypeVersionsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypes.ts deleted file mode 100644 index 09fb93b09cc1..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applicationTypes.ts +++ /dev/null @@ -1,109 +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 { - ApplicationTypeResource, - ApplicationTypesListOptionalParams, - ApplicationTypesGetOptionalParams, - ApplicationTypesGetResponse, - ApplicationTypesCreateOrUpdateOptionalParams, - ApplicationTypesCreateOrUpdateResponse, - ApplicationTypeUpdateParameters, - ApplicationTypesUpdateOptionalParams, - ApplicationTypesUpdateResponse, - ApplicationTypesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApplicationTypes. */ -export interface ApplicationTypes { - /** - * Gets all application type name resources created or in the process of being created in the Service - * Fabric managed cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterName: string, - options?: ApplicationTypesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Service Fabric application type name resource created or in the process of being created in - * the Service Fabric managed cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypesGetOptionalParams, - ): Promise; - /** - * Create or update a Service Fabric managed application type name resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param parameters The application type name resource. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - parameters: ApplicationTypeResource, - options?: ApplicationTypesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the tags of an application type resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param parameters The application type resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - parameters: ApplicationTypeUpdateParameters, - options?: ApplicationTypesUpdateOptionalParams, - ): Promise; - /** - * Delete a Service Fabric managed application type name resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypesDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Service Fabric managed application type name resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationTypeName The name of the application type name resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationTypeName: string, - options?: ApplicationTypesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applications.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applications.ts deleted file mode 100644 index 13f329ea5062..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/applications.ts +++ /dev/null @@ -1,239 +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 { - ApplicationResource, - ApplicationsListOptionalParams, - ApplicationsReadUpgradeOptionalParams, - ApplicationsReadUpgradeResponse, - ApplicationsStartRollbackOptionalParams, - ApplicationsStartRollbackResponse, - RuntimeResumeApplicationUpgradeParameters, - ApplicationsResumeUpgradeOptionalParams, - ApplicationsResumeUpgradeResponse, - ApplicationsGetOptionalParams, - ApplicationsGetResponse, - ApplicationsCreateOrUpdateOptionalParams, - ApplicationsCreateOrUpdateResponse, - ApplicationUpdateParameters, - ApplicationsUpdateOptionalParams, - ApplicationsUpdateResponse, - ApplicationsDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Applications. */ -export interface Applications { - /** - * Gets all managed application resources created or in the process of being created in the Service - * Fabric cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterName: string, - options?: ApplicationsListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the status of the latest application upgrade. It will query the cluster to find the status of - * the latest application upgrade. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - beginReadUpgrade( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsReadUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsReadUpgradeResponse - > - >; - /** - * Get the status of the latest application upgrade. It will query the cluster to find the status of - * the latest application upgrade. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - beginReadUpgradeAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsReadUpgradeOptionalParams, - ): Promise; - /** - * Send a request to start a rollback of the current application upgrade. This will start rolling back - * the application to the previous version. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - beginStartRollback( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsStartRollbackOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsStartRollbackResponse - > - >; - /** - * Send a request to start a rollback of the current application upgrade. This will start rolling back - * the application to the previous version. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - beginStartRollbackAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsStartRollbackOptionalParams, - ): Promise; - /** - * Send a request to resume the current application upgrade. This will resume the application upgrade - * from where it was paused. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @param options The options parameters. - */ - beginResumeUpgrade( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: RuntimeResumeApplicationUpgradeParameters, - options?: ApplicationsResumeUpgradeOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsResumeUpgradeResponse - > - >; - /** - * Send a request to resume the current application upgrade. This will resume the application upgrade - * from where it was paused. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @param options The options parameters. - */ - beginResumeUpgradeAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: RuntimeResumeApplicationUpgradeParameters, - options?: ApplicationsResumeUpgradeOptionalParams, - ): Promise; - /** - * Get a Service Fabric managed application resource created or in the process of being created in the - * Service Fabric cluster resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsGetOptionalParams, - ): Promise; - /** - * Create or update a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: ApplicationResource, - options?: ApplicationsCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApplicationsCreateOrUpdateResponse - > - >; - /** - * Create or update a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: ApplicationResource, - options?: ApplicationsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the tags of an application resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationName: string, - parameters: ApplicationUpdateParameters, - options?: ApplicationsUpdateOptionalParams, - ): Promise; - /** - * Delete a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Service Fabric managed application resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ApplicationsDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/index.ts deleted file mode 100644 index 0f9eb8707471..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,23 +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 "./applicationTypes.js"; -export * from "./applicationTypeVersions.js"; -export * from "./applications.js"; -export * from "./services.js"; -export * from "./managedClusters.js"; -export * from "./managedAzResiliencyStatusOperations.js"; -export * from "./managedMaintenanceWindowStatusOperations.js"; -export * from "./managedApplyMaintenanceWindow.js"; -export * from "./managedClusterVersion.js"; -export * from "./managedUnsupportedVMSizes.js"; -export * from "./operationStatus.js"; -export * from "./operationResults.js"; -export * from "./operations.js"; -export * from "./nodeTypes.js"; -export * from "./nodeTypeSkus.js"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedApplyMaintenanceWindow.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedApplyMaintenanceWindow.ts deleted file mode 100644 index de0fd74e91e5..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedApplyMaintenanceWindow.ts +++ /dev/null @@ -1,25 +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 { ManagedApplyMaintenanceWindowPostOptionalParams } from "../models/index.js"; - -/** Interface representing a ManagedApplyMaintenanceWindow. */ -export interface ManagedApplyMaintenanceWindow { - /** - * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending - * update will be applied. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - clusterName: string, - options?: ManagedApplyMaintenanceWindowPostOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedAzResiliencyStatusOperations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedAzResiliencyStatusOperations.ts deleted file mode 100644 index 290980a0970a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedAzResiliencyStatusOperations.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 { - ManagedAzResiliencyStatusGetOptionalParams, - ManagedAzResiliencyStatusGetResponse, -} from "../models/index.js"; - -/** Interface representing a ManagedAzResiliencyStatusOperations. */ -export interface ManagedAzResiliencyStatusOperations { - /** - * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed - * Clusters. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ManagedAzResiliencyStatusGetOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusterVersion.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusterVersion.ts deleted file mode 100644 index e6068a397990..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusterVersion.ts +++ /dev/null @@ -1,67 +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 { - ManagedClusterVersionGetOptionalParams, - ManagedClusterVersionGetResponse, - ManagedClusterVersionEnvironment, - ManagedClusterVersionGetByEnvironmentOptionalParams, - ManagedClusterVersionGetByEnvironmentResponse, - ManagedClusterVersionListOptionalParams, - ManagedClusterVersionListResponse, - ManagedClusterVersionListByEnvironmentOptionalParams, - ManagedClusterVersionListByEnvironmentResponse, -} from "../models/index.js"; - -/** Interface representing a ManagedClusterVersion. */ -export interface ManagedClusterVersion { - /** - * Gets information about an available Service Fabric managed cluster code version. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param clusterVersion The cluster code version. - * @param options The options parameters. - */ - get( - location: string, - clusterVersion: string, - options?: ManagedClusterVersionGetOptionalParams, - ): Promise; - /** - * Gets information about an available Service Fabric cluster code version by environment. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. - * @param options The options parameters. - */ - getByEnvironment( - location: string, - environment: ManagedClusterVersionEnvironment, - clusterVersion: string, - options?: ManagedClusterVersionGetByEnvironmentOptionalParams, - ): Promise; - /** - * Gets all available code versions for Service Fabric cluster resources by location. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param options The options parameters. - */ - list( - location: string, - options?: ManagedClusterVersionListOptionalParams, - ): Promise; - /** - * Gets all available code versions for Service Fabric cluster resources by environment. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param options The options parameters. - */ - listByEnvironment( - location: string, - environment: ManagedClusterVersionEnvironment, - options?: ManagedClusterVersionListByEnvironmentOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusters.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusters.ts deleted file mode 100644 index 8fa344b16a02..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedClusters.ts +++ /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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ManagedCluster, - ManagedClustersListByResourceGroupOptionalParams, - ManagedClustersListBySubscriptionOptionalParams, - ManagedClustersGetOptionalParams, - ManagedClustersGetResponse, - ManagedClustersCreateOrUpdateOptionalParams, - ManagedClustersCreateOrUpdateResponse, - ManagedClusterUpdateParameters, - ManagedClustersUpdateOptionalParams, - ManagedClustersUpdateResponse, - ManagedClustersDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ManagedClusters. */ -export interface ManagedClusters { - /** - * Gets all Service Fabric cluster resources created or in the process of being created in the resource - * group. - * @param resourceGroupName The name of the resource group. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ManagedClustersListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all Service Fabric cluster resources created or in the process of being created in the - * subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ManagedClustersListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Service Fabric managed cluster resource created or in the process of being created in the - * specified resource group. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ManagedClustersGetOptionalParams, - ): Promise; - /** - * Create or update a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - parameters: ManagedCluster, - options?: ManagedClustersCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ManagedClustersCreateOrUpdateResponse - > - >; - /** - * Create or update a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - parameters: ManagedCluster, - options?: ManagedClustersCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update the tags of of a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - parameters: ManagedClusterUpdateParameters, - options?: ManagedClustersUpdateOptionalParams, - ): Promise; - /** - * Delete a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ManagedClustersDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Service Fabric managed cluster resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ManagedClustersDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedMaintenanceWindowStatusOperations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedMaintenanceWindowStatusOperations.ts deleted file mode 100644 index e29065049f87..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedMaintenanceWindowStatusOperations.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 { - ManagedMaintenanceWindowStatusGetOptionalParams, - ManagedMaintenanceWindowStatusGetResponse, -} from "../models/index.js"; - -/** Interface representing a ManagedMaintenanceWindowStatusOperations. */ -export interface ManagedMaintenanceWindowStatusOperations { - /** - * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ManagedMaintenanceWindowStatusGetOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedUnsupportedVMSizes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedUnsupportedVMSizes.ts deleted file mode 100644 index 2ba85f680d9d..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/managedUnsupportedVMSizes.ts +++ /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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ManagedVMSize, - ManagedUnsupportedVMSizesListOptionalParams, - ManagedUnsupportedVMSizesGetOptionalParams, - ManagedUnsupportedVMSizesGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ManagedUnsupportedVMSizes. */ -export interface ManagedUnsupportedVMSizes { - /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param options The options parameters. - */ - list( - location: string, - options?: ManagedUnsupportedVMSizesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get unsupported vm size for Service Fabric Managed Clusters. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. - * @param options The options parameters. - */ - get( - location: string, - vmSize: string, - options?: ManagedUnsupportedVMSizesGetOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypeSkus.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypeSkus.ts deleted file mode 100644 index 79de24062d36..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypeSkus.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 { - NodeTypeAvailableSku, - NodeTypeSkusListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NodeTypeSkus. */ -export interface NodeTypeSkus { - /** - * Get a Service Fabric node type supported SKUs. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypeSkusListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts deleted file mode 100644 index fa173a24c7be..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/nodeTypes.ts +++ /dev/null @@ -1,247 +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 { - NodeType, - NodeTypesListByManagedClustersOptionalParams, - NodeTypeActionParameters, - NodeTypesRestartOptionalParams, - NodeTypesReimageOptionalParams, - NodeTypesDeleteNodeOptionalParams, - NodeTypesGetOptionalParams, - NodeTypesGetResponse, - NodeTypesCreateOrUpdateOptionalParams, - NodeTypesCreateOrUpdateResponse, - NodeTypeUpdateParameters, - NodeTypesUpdateOptionalParams, - NodeTypesUpdateResponse, - NodeTypesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a NodeTypes. */ -export interface NodeTypes { - /** - * Gets all Node types of the specified managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param options The options parameters. - */ - listByManagedClusters( - resourceGroupName: string, - clusterName: string, - options?: NodeTypesListByManagedClustersOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. - * @param options The options parameters. - */ - beginRestart( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesRestartOptionalParams, - ): Promise, void>>; - /** - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. - * @param options The options parameters. - */ - beginRestartAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesRestartOptionalParams, - ): Promise; - /** - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. - * @param options The options parameters. - */ - beginReimage( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesReimageOptionalParams, - ): Promise, void>>; - /** - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on - * the VMs and activate the nodes back again. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. - * @param options The options parameters. - */ - beginReimageAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesReimageOptionalParams, - ): Promise; - /** - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on - * the VMs and removes the state from the cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. - * @param options The options parameters. - */ - beginDeleteNode( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesDeleteNodeOptionalParams, - ): Promise, void>>; - /** - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on - * the VMs and removes the state from the cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. - * @param options The options parameters. - */ - beginDeleteNodeAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeActionParameters, - options?: NodeTypesDeleteNodeOptionalParams, - ): Promise; - /** - * Get a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypesGetOptionalParams, - ): Promise; - /** - * Create or update a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeType, - options?: NodeTypesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NodeTypesCreateOrUpdateResponse - > - >; - /** - * Create or update a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeType, - options?: NodeTypesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update the configuration of a node type of a given managed cluster, only updating tags. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeUpdateParameters, - options?: NodeTypesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NodeTypesUpdateResponse - > - >; - /** - * Update the configuration of a node type of a given managed cluster, only updating tags. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - parameters: NodeTypeUpdateParameters, - options?: NodeTypesUpdateOptionalParams, - ): Promise; - /** - * Delete a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypesDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Service Fabric node type of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - nodeTypeName: string, - options?: NodeTypesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationResults.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationResults.ts deleted file mode 100644 index 71c430f9a611..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationResults.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 { - OperationResultsGetOptionalParams, - OperationResultsGetResponse, -} from "../models/index.js"; - -/** Interface representing a OperationResults. */ -export interface OperationResults { - /** - * Get long running operation result. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param operationId operation identifier. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationResultsGetOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationStatus.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationStatus.ts deleted file mode 100644 index a0a8cb3523d5..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operationStatus.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 { - OperationStatusGetOptionalParams, - OperationStatusGetResponse, -} from "../models/index.js"; - -/** Interface representing a OperationStatus. */ -export interface OperationStatus { - /** - * Get long running operation status. - * @param location The location for the cluster code versions. This is different from cluster location. - * @param operationId operation identifier. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationStatusGetOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/operations.ts deleted file mode 100644 index e65bd38a2188..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/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 { OperationResult, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * Get the list of available Service Fabric resource provider API operations. - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/services.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/services.ts deleted file mode 100644 index a9c0e1174c04..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/operationsInterfaces/services.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 } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ServiceResource, - ServicesListByApplicationsOptionalParams, - ServicesGetOptionalParams, - ServicesGetResponse, - ServicesCreateOrUpdateOptionalParams, - ServicesCreateOrUpdateResponse, - ServiceUpdateParameters, - ServicesUpdateOptionalParams, - ServicesUpdateResponse, - ServicesDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Services. */ -export interface Services { - /** - * Gets all service resources created or in the process of being created in the Service Fabric managed - * application resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param options The options parameters. - */ - listByApplications( - resourceGroupName: string, - clusterName: string, - applicationName: string, - options?: ServicesListByApplicationsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get a Service Fabric service resource created or in the process of being created in the Service - * Fabric managed application resource. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - options?: ServicesGetOptionalParams, - ): Promise; - /** - * Create or update a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param parameters The service resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - parameters: ServiceResource, - options?: ServicesCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ServicesCreateOrUpdateResponse - > - >; - /** - * Create or update a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param parameters The service resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - parameters: ServiceResource, - options?: ServicesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the tags of a service resource of a given managed cluster. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param parameters The service resource updated tags. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - parameters: ServiceUpdateParameters, - options?: ServicesUpdateOptionalParams, - ): Promise; - /** - * Delete a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - options?: ServicesDeleteOptionalParams, - ): Promise, void>>; - /** - * Delete a Service Fabric managed service resource with the specified name. - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param serviceName The name of the service resource in the format of - * {applicationName}~{serviceName}. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - applicationName: string, - serviceName: string, - options?: ServicesDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/pagingHelper.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/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/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..9b7a085e59d9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricClient } from "./serviceFabricClient.js"; +import { _getDeserialize } from "./api/operationResults/index.js"; +import { + _stopFaultSimulationDeserialize, + _startFaultSimulationDeserialize, + _startDeserialize, + _restartDeserialize, + _reimageDeserialize, + _redeployDeserialize, + _deleteNodeDeserialize, + _deallocateDeserialize, + _$deleteDeserialize, + _updateDeserialize, + _createOrUpdateDeserialize, +} from "./api/nodeTypes/index.js"; +import { + _stopFaultSimulationDeserialize as _stopFaultSimulationDeserializeManagedClusters, + _startFaultSimulationDeserialize as _startFaultSimulationDeserializeManagedClusters, + _$deleteDeserialize as _$deleteDeserializeManagedClusters, + _createOrUpdateDeserialize as _createOrUpdateDeserializeManagedClusters, +} from "./api/managedClusters/index.js"; +import { + _$deleteDeserialize as _$deleteDeserializeServices, + _createOrUpdateDeserialize as _createOrUpdateDeserializeServices, +} from "./api/services/index.js"; +import { + _$deleteDeserialize as _$deleteDeserializeApplicationTypeVersions, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApplicationTypeVersions, +} from "./api/applicationTypeVersions/index.js"; +import { _$deleteDeserialize as _$deleteDeserializeApplicationTypes } from "./api/applicationTypes/index.js"; +import { + _startRollbackDeserialize, + _resumeUpgradeDeserialize, + _readUpgradeDeserialize, + _$deleteDeserialize as _$deleteDeserializeApplications, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApplications, +} from "./api/applications/index.js"; +import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; +import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; +import { + PollerLike, + OperationState, + deserializeState, + ResourceLocationConfig, +} from "@azure/core-lro"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: ServiceFabricClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + }, + ); +} + +interface DeserializationHelper { + deserializer: Function; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "GET /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}": + { deserializer: _getDeserialize, expectedStatuses: ["200", "202", "204"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation": + { + deserializer: _stopFaultSimulationDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation": + { + deserializer: _startFaultSimulationDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start": + { deserializer: _startDeserialize, expectedStatuses: ["202", "200"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart": + { deserializer: _restartDeserialize, expectedStatuses: ["202", "200"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage": + { deserializer: _reimageDeserialize, expectedStatuses: ["202", "200"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy": + { deserializer: _redeployDeserialize, expectedStatuses: ["202", "200"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode": + { deserializer: _deleteNodeDeserialize, expectedStatuses: ["202", "200"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate": + { deserializer: _deallocateDeserialize, expectedStatuses: ["202", "200"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}": + { + deserializer: _$deleteDeserialize, + expectedStatuses: ["202", "204", "200"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}": + { deserializer: _updateDeserialize, expectedStatuses: ["200", "202"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}": + { + deserializer: _createOrUpdateDeserialize, + expectedStatuses: ["200", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation": + { + deserializer: _stopFaultSimulationDeserializeManagedClusters, + expectedStatuses: ["202", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation": + { + deserializer: _startFaultSimulationDeserializeManagedClusters, + expectedStatuses: ["202", "200"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}": + { + deserializer: _$deleteDeserializeManagedClusters, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}": + { + deserializer: _createOrUpdateDeserializeManagedClusters, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}": + { + deserializer: _$deleteDeserializeServices, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}": + { + deserializer: _createOrUpdateDeserializeServices, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}": + { + deserializer: _$deleteDeserializeApplicationTypeVersions, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}": + { + deserializer: _createOrUpdateDeserializeApplicationTypeVersions, + expectedStatuses: ["200", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}": + { + deserializer: _$deleteDeserializeApplicationTypes, + expectedStatuses: ["202", "204", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback": + { + deserializer: _startRollbackDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade": + { + deserializer: _resumeUpgradeDeserialize, + expectedStatuses: ["202", "200"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus": + { deserializer: _readUpgradeDeserialize, expectedStatuses: ["202", "200"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}": + { + deserializer: _$deleteDeserializeApplications, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}": + { + deserializer: _createOrUpdateDeserializeApplications, + expectedStatuses: ["200", "202"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricClient.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricClient.ts new file mode 100644 index 000000000000..4216624344d8 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricClient.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + _getOperationStatusOperations, + OperationStatusOperations, +} from "./classic/operationStatus/index.js"; +import { + _getOperationResultsOperations, + OperationResultsOperations, +} from "./classic/operationResults/index.js"; +import { _getNodeTypesOperations, NodeTypesOperations } from "./classic/nodeTypes/index.js"; +import { + _getManagedClustersOperations, + ManagedClustersOperations, +} from "./classic/managedClusters/index.js"; +import { + _getManagedVMSizesOperations, + ManagedVMSizesOperations, +} from "./classic/managedVMSizes/index.js"; +import { + _getManagedClusterVersionOperations, + ManagedClusterVersionOperations, +} from "./classic/managedClusterVersion/index.js"; +import { _getServicesOperations, ServicesOperations } from "./classic/services/index.js"; +import { + _getApplicationTypeVersionsOperations, + ApplicationTypeVersionsOperations, +} from "./classic/applicationTypeVersions/index.js"; +import { + _getApplicationTypesOperations, + ApplicationTypesOperations, +} from "./classic/applicationTypes/index.js"; +import { + _getApplicationsOperations, + ApplicationsOperations, +} from "./classic/applications/index.js"; +import { _getOperationsOperations, OperationsOperations } from "./classic/operations/index.js"; +import { + createServiceFabric, + ServiceFabricContext, + ServiceFabricClientOptionalParams, +} from "./api/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; +import { TokenCredential } from "@azure/core-auth"; + +export { ServiceFabricClientOptionalParams } from "./api/serviceFabricContext.js"; + +export class ServiceFabricClient { + private _client: ServiceFabricContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + /** Service Fabric Managed Clusters Management Client */ + constructor( + credential: TokenCredential, + subscriptionId: string, + options: ServiceFabricClientOptionalParams = {}, + ) { + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createServiceFabric(credential, subscriptionId, { + ...options, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.operationStatus = _getOperationStatusOperations(this._client); + this.operationResults = _getOperationResultsOperations(this._client); + this.nodeTypes = _getNodeTypesOperations(this._client); + this.managedClusters = _getManagedClustersOperations(this._client); + this.managedVMSizes = _getManagedVMSizesOperations(this._client); + this.managedClusterVersion = _getManagedClusterVersionOperations(this._client); + this.services = _getServicesOperations(this._client); + this.applicationTypeVersions = _getApplicationTypeVersionsOperations(this._client); + this.applicationTypes = _getApplicationTypesOperations(this._client); + this.applications = _getApplicationsOperations(this._client); + this.operations = _getOperationsOperations(this._client); + } + + /** The operation groups for operationStatus */ + public readonly operationStatus: OperationStatusOperations; + /** The operation groups for operationResults */ + public readonly operationResults: OperationResultsOperations; + /** The operation groups for nodeTypes */ + public readonly nodeTypes: NodeTypesOperations; + /** The operation groups for managedClusters */ + public readonly managedClusters: ManagedClustersOperations; + /** The operation groups for managedVMSizes */ + public readonly managedVMSizes: ManagedVMSizesOperations; + /** The operation groups for managedClusterVersion */ + public readonly managedClusterVersion: ManagedClusterVersionOperations; + /** The operation groups for services */ + public readonly services: ServicesOperations; + /** The operation groups for applicationTypeVersions */ + public readonly applicationTypeVersions: ApplicationTypeVersionsOperations; + /** The operation groups for applicationTypes */ + public readonly applicationTypes: ApplicationTypesOperations; + /** The operation groups for applications */ + public readonly applications: ApplicationsOperations; + /** The operation groups for operations */ + public readonly operations: OperationsOperations; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts deleted file mode 100644 index 0c07911fb4e9..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts +++ /dev/null @@ -1,206 +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 { - ApplicationTypesImpl, - ApplicationTypeVersionsImpl, - ApplicationsImpl, - ServicesImpl, - ManagedClustersImpl, - ManagedAzResiliencyStatusOperationsImpl, - ManagedMaintenanceWindowStatusOperationsImpl, - ManagedApplyMaintenanceWindowImpl, - ManagedClusterVersionImpl, - ManagedUnsupportedVMSizesImpl, - OperationStatusImpl, - OperationResultsImpl, - OperationsImpl, - NodeTypesImpl, - NodeTypeSkusImpl, -} from "./operations/index.js"; -import { - ApplicationTypes, - ApplicationTypeVersions, - Applications, - Services, - ManagedClusters, - ManagedAzResiliencyStatusOperations, - ManagedMaintenanceWindowStatusOperations, - ManagedApplyMaintenanceWindow, - ManagedClusterVersion, - ManagedUnsupportedVMSizes, - OperationStatus, - OperationResults, - Operations, - NodeTypes, - NodeTypeSkus, -} from "./operationsInterfaces/index.js"; -import { ServiceFabricManagedClustersManagementClientOptionalParams } from "./models/index.js"; - -export class ServiceFabricManagedClustersManagementClient extends coreClient.ServiceClient { - $host: string; - subscriptionId: string; - apiVersion: string; - - /** - * Initializes a new instance of the ServiceFabricManagedClustersManagementClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The customer subscription identifier. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: ServiceFabricManagedClustersManagementClientOptionalParams, - ) { - 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: ServiceFabricManagedClustersManagementClientOptionalParams = - { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-servicefabricmanagedclusters/1.0.0-beta.3`; - 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-09-01-preview"; - this.applicationTypes = new ApplicationTypesImpl(this); - this.applicationTypeVersions = new ApplicationTypeVersionsImpl(this); - this.applications = new ApplicationsImpl(this); - this.services = new ServicesImpl(this); - this.managedClusters = new ManagedClustersImpl(this); - this.managedAzResiliencyStatusOperations = - new ManagedAzResiliencyStatusOperationsImpl(this); - this.managedMaintenanceWindowStatusOperations = - new ManagedMaintenanceWindowStatusOperationsImpl(this); - this.managedApplyMaintenanceWindow = new ManagedApplyMaintenanceWindowImpl( - this, - ); - this.managedClusterVersion = new ManagedClusterVersionImpl(this); - this.managedUnsupportedVMSizes = new ManagedUnsupportedVMSizesImpl(this); - this.operationStatus = new OperationStatusImpl(this); - this.operationResults = new OperationResultsImpl(this); - this.operations = new OperationsImpl(this); - this.nodeTypes = new NodeTypesImpl(this); - this.nodeTypeSkus = new NodeTypeSkusImpl(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); - } - - applicationTypes: ApplicationTypes; - applicationTypeVersions: ApplicationTypeVersions; - applications: Applications; - services: Services; - managedClusters: ManagedClusters; - managedAzResiliencyStatusOperations: ManagedAzResiliencyStatusOperations; - managedMaintenanceWindowStatusOperations: ManagedMaintenanceWindowStatusOperations; - managedApplyMaintenanceWindow: ManagedApplyMaintenanceWindow; - managedClusterVersion: ManagedClusterVersion; - managedUnsupportedVMSizes: ManagedUnsupportedVMSizes; - operationStatus: OperationStatus; - operationResults: OperationResults; - operations: Operations; - nodeTypes: NodeTypes; - nodeTypeSkus: NodeTypeSkus; -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..ce33af5f4178 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + const result = + pageLink === undefined + ? await getInitialResponse() + : await client.pathUnchecked(pageLink).get(); + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..f01c41bab69d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + response = await client.pathUnchecked(path).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/sampleTest.spec.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..e4591bbad342 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..14dcd9fa397c --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: VitestTestContext): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/servicefabricmanagedclusters_operations_test.spec.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/servicefabricmanagedclusters_operations_test.spec.ts deleted file mode 100644 index 05d50bbe2e6a..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/servicefabricmanagedclusters_operations_test.spec.ts +++ /dev/null @@ -1,62 +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 { - env, - Recorder, - RecorderStartOptions, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { ServiceFabricManagedClustersManagementClient } from "../src/serviceFabricManagedClustersManagementClient.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("servicefabricmanagedclusters test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ServiceFabricManagedClustersManagementClient; - - 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 ServiceFabricManagedClustersManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("operations list test", async () => { - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); - -}) diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/snippets.spec.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/snippets.spec.ts deleted file mode 100644 index a274b64a58a5..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/snippets.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ServiceFabricManagedClustersManagementClient } 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 ServiceFabricManagedClustersManagementClient(new DefaultAzureCredential(), subscriptionId); - }); - - it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", - }); - const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); - }); - - it("SetLogLevel", async () => { - setLogLevel("info"); - }); -}); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.browser.config.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.browser.config.json index 0c8bafa97126..75871518e3a0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.browser.config.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.browser.config.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.test.json", - "../../../tsconfig.browser.base.json" - ] + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json index 19ceb382b521..71858ab903e4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json @@ -1,13 +1,16 @@ { - "references": [ - { - "path": "./tsconfig.src.json" - }, - { - "path": "./tsconfig.samples.json" - }, - { - "path": "./tsconfig.test.json" - } + "extends": "../../../tsconfig", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": ".", + "skipLibCheck": true + }, + "include": [ + "src/**/*.ts", + "src/**/*.mts", + "src/**/*.cts", + "test/**/*.ts", + "test/**/*.ts" ] -} +} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.samples.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.samples.json index 8112a67464df..4d6fa639c44e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.samples.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.samples.json @@ -2,9 +2,7 @@ "extends": "../../../tsconfig.samples.base.json", "compilerOptions": { "paths": { - "@azure/arm-servicefabricmanagedclusters": [ - "./dist/esm" - ] + "@azure/arm-servicefabricmanagedclusters": ["./dist/esm"] } } } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json index 3c2b783a8c1b..290ca214aebc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.src.json", - "../../../tsconfig.test.base.json" - ] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml new file mode 100644 index 000000000000..a658a32a74b3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: 339777cdd4bca0366404be5abfcbdd6c0649f4aa +repo: /mnt/vss/_work/1/s/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicefabricmanagedclusters/ci.yml b/sdk/servicefabricmanagedclusters/ci.yml new file mode 100644 index 000000000000..bb7fa7edbeb4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/ci.yml @@ -0,0 +1,39 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/servicefabricmanagedclusters/ + exclude: + - sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters + - sdk/servicefabricmanagedclusters/ci.mgmt.yml +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/servicefabricmanagedclusters/ + exclude: + - sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters + - sdk/servicefabricmanagedclusters/ci.mgmt.yml +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: servicefabricmanagedclusters + Artifacts: + - name: azure-arm-servicefabricmanagedclusters + safeName: azurearmservicefabricmanagedclusters