From 9bdf012e056e77a089f3b55cded9d37651b79c61 Mon Sep 17 00:00:00 2001
From: colawwj <70128817+colawwj@users.noreply.github.com>
Date: Thu, 20 Jan 2022 10:04:09 +0800
Subject: [PATCH] oep-security-commitmentplans-iotcentral-track2 (#19905)
* oep-security-commitmentplans-iotcentral-track2
* update
* update
* update
* update meta.json
* update
---
.github/CODEOWNERS | 6 +
common/config/rush/pnpm-lock.yaml | 109 +-
eng/ignore-links.txt | 2 +
rush.json | 20 +
sdk/commerce/arm-commerce/_meta.json | 4 +-
sdk/databoxedge/arm-databoxedge/_meta.json | 4 +-
sdk/datadog/arm-datadog/_meta.json | 4 +-
.../arm-datamigration/_meta.json | 4 +-
.../arm-deploymentmanager/_meta.json | 4 +-
sdk/digitaltwins/arm-digitaltwins/_meta.json | 4 +-
sdk/dns/arm-dns/_meta.json | 4 +-
.../arm-domainservices/_meta.json | 4 +-
sdk/hanaonazure/arm-hanaonazure/_meta.json | 4 +-
.../arm-healthcareapis/_meta.json | 4 +-
.../arm-hybridkubernetes/_meta.json | 4 +-
sdk/iotcentral/arm-iotcentral/CHANGELOG.md | 11 +
sdk/iotcentral/arm-iotcentral/LICENSE | 21 +
sdk/iotcentral/arm-iotcentral/README.md | 142 +-
sdk/iotcentral/arm-iotcentral/_meta.json | 7 +
.../arm-iotcentral/api-extractor.json | 18 +
sdk/iotcentral/arm-iotcentral/package.json | 107 +-
.../node/my_test/recording_sample_test.js | 5 +
.../review/arm-iotcentral.api.md | 323 +
.../arm-iotcentral/rollup.config.js | 211 +-
sdk/iotcentral/arm-iotcentral/sample.env | 4 +
.../samples-dev/appsCheckNameAvailability.ts | 32 +
.../samples-dev/appsCreateOrUpdate.ts | 42 +
.../arm-iotcentral/samples-dev/appsDelete.ts | 33 +
.../arm-iotcentral/samples-dev/appsGet.ts | 30 +
.../samples-dev/appsListByResourceGroup.ts | 32 +
.../samples-dev/appsListBySubscription.ts | 31 +
.../samples-dev/appsListTemplates.ts | 31 +
.../samples-dev/appsSubdomainAvailability.ts | 32 +
.../arm-iotcentral/samples-dev/appsUpdate.ts | 38 +
.../samples-dev/operationsList.ts | 31 +
.../samples/v6/javascript/README.md | 68 +
.../javascript/appsCheckNameAvailability.js | 32 +
.../v6/javascript/appsCreateOrUpdate.js | 38 +
.../samples/v6/javascript/appsDelete.js | 30 +
.../samples/v6/javascript/appsGet.js | 30 +
.../v6/javascript/appsListByResourceGroup.js | 32 +
.../v6/javascript/appsListBySubscription.js | 31 +
.../v6/javascript/appsListTemplates.js | 31 +
.../javascript/appsSubdomainAvailability.js | 32 +
.../samples/v6/javascript/appsUpdate.js | 34 +
.../samples/v6/javascript/operationsList.js | 31 +
.../samples/v6/javascript/package.json | 32 +
.../samples/v6/javascript/sample.env | 4 +
.../samples/v6/typescript/README.md | 81 +
.../samples/v6/typescript/package.json | 41 +
.../samples/v6/typescript/sample.env | 4 +
.../src/appsCheckNameAvailability.ts | 32 +
.../v6/typescript/src/appsCreateOrUpdate.ts | 42 +
.../samples/v6/typescript/src/appsDelete.ts | 33 +
.../samples/v6/typescript/src/appsGet.ts | 30 +
.../typescript/src/appsListByResourceGroup.ts | 32 +
.../typescript/src/appsListBySubscription.ts | 31 +
.../v6/typescript/src/appsListTemplates.ts | 31 +
.../src/appsSubdomainAvailability.ts | 32 +
.../samples/v6/typescript/src/appsUpdate.ts | 38 +
.../v6/typescript/src/operationsList.ts | 31 +
.../samples/v6/typescript/tsconfig.json | 17 +
.../src/{models/appsMappers.ts => index.ts} | 18 +-
.../arm-iotcentral/src/iotCentralClient.ts | 90 +-
.../src/iotCentralClientContext.ts | 61 -
sdk/iotcentral/arm-iotcentral/src/lroImpl.ts | 34 +
.../arm-iotcentral/src/models/index.ts | 777 +-
.../arm-iotcentral/src/models/mappers.ts | 450 +-
.../arm-iotcentral/src/models/parameters.ts | 98 +-
.../arm-iotcentral/src/operations/apps.ts | 1183 +-
.../arm-iotcentral/src/operations/index.ts | 3 +-
.../src/operations/operations.ts | 162 +-
.../src/operationsInterfaces/apps.ts | 174 +
.../index.ts} | 8 +-
.../src/operationsInterfaces/operations.ts | 22 +
.../arm-iotcentral/test/sampleTest.ts | 48 +
sdk/iotcentral/arm-iotcentral/tsconfig.json | 9 +-
sdk/iotcentral/ci.yml | 30 +
.../arm-commitmentplans/CHANGELOG.md | 11 +
.../arm-commitmentplans/LICENSE | 21 +
.../arm-commitmentplans/README.md | 145 +-
.../arm-commitmentplans/_meta.json | 7 +
.../arm-commitmentplans/api-extractor.json | 18 +
.../arm-commitmentplans/package.json | 106 +-
.../node/my_test/recording_sample_test.js | 5 +
.../review/arm-commitmentplans.api.md | 405 +
.../arm-commitmentplans/rollup.config.js | 211 +-
.../azureMLCommitmentPlansManagementClient.ts | 117 +-
...LCommitmentPlansManagementClientContext.ts | 62 -
.../arm-commitmentplans/src/index.ts | 12 +
.../models/commitmentAssociationsMappers.ts | 24 -
.../src/models/commitmentPlansMappers.ts | 24 -
.../arm-commitmentplans/src/models/index.ts | 1133 +-
.../arm-commitmentplans/src/models/mappers.ts | 690 +-
.../src/models/parameters.ts | 122 +-
.../src/models/skusMappers.ts | 20 -
.../src/models/usageHistoryMappers.ts | 16 -
.../src/operations/commitmentAssociations.ts | 357 +-
.../src/operations/commitmentPlans.ts | 617 +-
.../src/operations/index.ts | 9 +-
.../src/operations/operations.ts | 95 +
.../src/operations/skus.ts | 113 +-
.../src/operations/usageHistory.ts | 224 +-
.../commitmentAssociations.ts | 62 +
.../operationsInterfaces/commitmentPlans.ts | 92 +
.../src/operationsInterfaces/index.ts | 13 +
.../src/operationsInterfaces/operations.ts | 22 +
.../src/operationsInterfaces/skus.ts | 22 +
.../src/operationsInterfaces/usageHistory.ts | 26 +
.../arm-commitmentplans/test/sampleTest.ts | 48 +
.../arm-commitmentplans/tsconfig.json | 11 +-
sdk/machinelearning/ci.yml | 30 +
.../arm-machinelearningcompute/_meta.json | 4 +-
sdk/oep/arm-oep/CHANGELOG.md | 5 +
sdk/oep/arm-oep/LICENSE | 21 +
sdk/oep/arm-oep/README.md | 98 +
sdk/oep/arm-oep/_meta.json | 7 +
sdk/oep/arm-oep/api-extractor.json | 18 +
sdk/oep/arm-oep/package.json | 106 +
.../node/my_test/recording_sample_test.js | 5 +
sdk/oep/arm-oep/review/arm-oep.api.md | 316 +
sdk/oep/arm-oep/rollup.config.js | 188 +
sdk/oep/arm-oep/sample.env | 4 +
.../locationsCheckNameAvailability.ts | 38 +
.../arm-oep/samples-dev/oepResourceCreate.ts | 36 +
.../arm-oep/samples-dev/oepResourceDelete.ts | 36 +
sdk/oep/arm-oep/samples-dev/oepResourceGet.ts | 36 +
.../oepResourceListByResourceGroup.ts | 37 +
.../oepResourceListBySubscriptionId.ts | 34 +
.../arm-oep/samples-dev/oepResourceUpdate.ts | 36 +
sdk/oep/arm-oep/samples-dev/operationsList.ts | 31 +
.../samples/v1-beta/javascript/README.md | 64 +
.../locationsCheckNameAvailability.js | 32 +
.../v1-beta/javascript/oepResourceCreate.js | 30 +
.../v1-beta/javascript/oepResourceDelete.js | 30 +
.../v1-beta/javascript/oepResourceGet.js | 30 +
.../oepResourceListByResourceGroup.js | 32 +
.../oepResourceListBySubscriptionId.js | 31 +
.../v1-beta/javascript/oepResourceUpdate.js | 30 +
.../v1-beta/javascript/operationsList.js | 28 +
.../samples/v1-beta/javascript/package.json | 32 +
.../samples/v1-beta/javascript/sample.env | 4 +
.../samples/v1-beta/typescript/README.md | 77 +
.../samples/v1-beta/typescript/package.json | 41 +
.../samples/v1-beta/typescript/sample.env | 4 +
.../src/locationsCheckNameAvailability.ts | 38 +
.../typescript/src/oepResourceCreate.ts | 36 +
.../typescript/src/oepResourceDelete.ts | 36 +
.../v1-beta/typescript/src/oepResourceGet.ts | 36 +
.../src/oepResourceListByResourceGroup.ts | 37 +
.../src/oepResourceListBySubscriptionId.ts | 34 +
.../typescript/src/oepResourceUpdate.ts | 36 +
.../v1-beta/typescript/src/operationsList.ts | 31 +
.../samples/v1-beta/typescript/tsconfig.json | 17 +
sdk/oep/arm-oep/src/index.ts | 12 +
sdk/oep/arm-oep/src/lroImpl.ts | 34 +
sdk/oep/arm-oep/src/models/index.ts | 403 +
sdk/oep/arm-oep/src/models/mappers.ts | 475 +
sdk/oep/arm-oep/src/models/parameters.ts | 133 +
...openEnergyPlatformManagementServiceAPIs.ts | 83 +
.../arm-oep/src/operations/energyServices.ts | 564 +
sdk/oep/arm-oep/src/operations/index.ts | 11 +
sdk/oep/arm-oep/src/operations/locations.ts | 67 +
sdk/oep/arm-oep/src/operations/operations.ts | 59 +
.../operationsInterfaces/energyServices.ts | 113 +
.../arm-oep/src/operationsInterfaces/index.ts | 11 +
.../src/operationsInterfaces/locations.ts | 26 +
.../src/operationsInterfaces/operations.ts | 21 +
sdk/oep/arm-oep/test/sampleTest.ts | 48 +
sdk/oep/arm-oep/tsconfig.json | 20 +
sdk/oep/ci.yml | 30 +
.../arm-securityinsight/CHANGELOG.md | 5 +
.../arm-securityinsight/LICENSE | 21 +
.../arm-securityinsight/README.md | 98 +
.../arm-securityinsight/_meta.json | 7 +
.../arm-securityinsight/api-extractor.json | 18 +
.../arm-securityinsight/package.json | 95 +
.../node/my_test/recording_sample_test.js | 5 +
.../review/arm-securityinsight.api.md | 5007 ++++++
.../arm-securityinsight/rollup.config.js | 188 +
.../arm-securityinsight/sample.env | 4 +
...ppendTagsToAThreatIntelligenceIndicator.ts | 42 +
.../samples-dev/checkRequirementsForAad.ts | 41 +
.../checkRequirementsForAadNoAuthorization.ts | 41 +
.../checkRequirementsForAadNoLicense.ts | 41 +
.../samples-dev/checkRequirementsForAsc.ts | 41 +
.../checkRequirementsForDynamics365.ts | 41 +
.../samples-dev/checkRequirementsForMcas.ts | 41 +
.../samples-dev/checkRequirementsForMdatp.ts | 41 +
...uirementsForMicrosoftThreatIntelligence.ts | 41 +
...equirementsForMicrosoftThreatProtection.ts | 41 +
.../checkRequirementsForOfficeAtp.ts | 41 +
.../checkRequirementsForOfficeIrm.ts | 41 +
.../samples-dev/checkRequirementsForTi.ts | 41 +
.../checkRequirementsForTiTaxii.ts | 41 +
.../connectAnApiPollingDataConnector.ts | 51 +
.../createANewThreatIntelligence.ts | 57 +
.../samples-dev/createOrUpdateFullMetadata.ts | 92 +
.../createOrUpdateMinimalMetadata.ts | 42 +
.../createSentinelOnboardingState.ts | 45 +
.../samples-dev/createsASourceControl.ts | 52 +
.../samples-dev/createsIncidentTeamsGroup.ts | 40 +
...reatesOrUpdatesAApiPollingDataConnector.ts | 135 +
.../samples-dev/createsOrUpdatesABookmark.ts | 49 +
.../createsOrUpdatesABookmarkRelation.ts | 42 +
...eatesOrUpdatesADynamics365DataConnector.ts | 45 +
.../createsOrUpdatesAFusionAlertRule.ts | 42 +
...createsOrUpdatesAGenericUiDataConnector.ts | 173 +
...sAMicrosoftSecurityIncidentCreationRule.ts | 46 +
.../createsOrUpdatesANrtAlertRule.ts | 59 +
.../createsOrUpdatesAScheduledAlertRule.ts | 86 +
...esAThreatIntelligenceTaxiiDataConnector.ts | 53 +
.../samples-dev/createsOrUpdatesAWatchlist.ts | 44 +
...sAWatchlistAndBulkCreatesWatchlistItems.ts | 47 +
.../createsOrUpdatesAWatchlistItem.ts | 49 +
.../createsOrUpdatesAnActionOfAlertRule.ts | 45 +
.../createsOrUpdatesAnActivityEntityQuery.ts | 61 +
.../createsOrUpdatesAnAutomationRule.ts | 75 +
.../samples-dev/createsOrUpdatesAnIncident.ts | 49 +
.../createsOrUpdatesAnIncidentComment.ts | 39 +
.../createsOrUpdatesAnIncidentRelation.ts | 42 +
...reatesOrUpdatesAnOffice365DataConnector.ts | 49 +
...ThreatIntelligencePlatformDataConnector.ts | 44 +
.../deleteAApiPollingDataConnector.ts | 35 +
.../samples-dev/deleteABookmark.ts | 35 +
.../deleteAGenericUiDataConnector.ts | 35 +
.../samples-dev/deleteASourceControl.ts | 35 +
.../deleteAThreatIntelligenceIndicator.ts | 35 +
.../samples-dev/deleteAWatchlist.ts | 35 +
.../samples-dev/deleteAWatchlistItem.ts | 37 +
.../samples-dev/deleteAnActionOfAlertRule.ts | 37 +
.../samples-dev/deleteAnAlertRule.ts | 35 +
.../samples-dev/deleteAnAutomationRule.ts | 35 +
.../samples-dev/deleteAnEntityQuery.ts | 35 +
.../samples-dev/deleteAnIncident.ts | 35 +
.../deleteAnOffice365DataConnector.ts | 35 +
.../samples-dev/deleteAnOfficeConsent.ts | 35 +
.../samples-dev/deleteEyesOnSettings.ts | 35 +
.../samples-dev/deleteMetadata.ts | 35 +
.../deleteSentinelOnboardingState.ts | 35 +
.../samples-dev/deleteTheBookmarkRelation.ts | 37 +
.../samples-dev/deleteTheIncidentComment.ts | 37 +
.../samples-dev/deleteTheIncidentRelation.ts | 37 +
.../disconnectAnApiPollingDataConnector.ts | 35 +
.../samples-dev/entityInsight.ts | 45 +
.../samples-dev/entityTimeline.ts | 44 +
.../samples-dev/expandAnBookmark.ts | 44 +
.../samples-dev/expandAnEntity.ts | 44 +
.../getAApiPollingDataConnector.ts | 35 +
.../samples-dev/getAAscDataConnector.ts | 35 +
.../samples-dev/getABookmark.ts | 35 +
.../samples-dev/getABookmarkRelation.ts | 37 +
.../samples-dev/getACloudApplicationEntity.ts | 35 +
.../samples-dev/getADnsEntity.ts | 35 +
.../getADynamics365DataConnector.ts | 35 +
.../samples-dev/getAFileEntity.ts | 35 +
.../samples-dev/getAFileHashEntity.ts | 35 +
.../samples-dev/getAFusionAlertRule.ts | 35 +
.../samples-dev/getAGenericUiDataConnector.ts | 35 +
.../samples-dev/getAHostEntity.ts | 35 +
.../samples-dev/getAMailClusterEntity.ts | 35 +
.../samples-dev/getAMailMessageEntity.ts | 35 +
.../samples-dev/getAMailboxEntity.ts | 35 +
.../samples-dev/getAMalwareEntity.ts | 35 +
.../samples-dev/getAMcasDataConnector.ts | 35 +
.../samples-dev/getAMdatpDataConnector.ts | 35 +
...tAMicrosoftSecurityIncidentCreationRule.ts | 35 +
...icrosoftThreatIntelligenceDataConnector.ts | 35 +
...AMicrosoftThreatProtectionDataConnector.ts | 35 +
.../samples-dev/getAOfficeAtpDataConnector.ts | 35 +
.../samples-dev/getAOfficeIrmDataConnector.ts | 35 +
.../samples-dev/getAProcessEntity.ts | 35 +
.../samples-dev/getARegistryKeyEntity.ts | 35 +
.../samples-dev/getARegistryValueEntity.ts | 35 +
.../samples-dev/getAScheduledAlertRule.ts | 35 +
.../samples-dev/getASecurityAlertEntity.ts | 35 +
.../samples-dev/getASecurityGroupEntity.ts | 35 +
.../samples-dev/getASourceControl.ts | 35 +
.../samples-dev/getASubmissionMailEntity.ts | 35 +
.../samples-dev/getATiDataConnector.ts | 35 +
.../samples-dev/getATiTaxiiDataConnector.ts | 35 +
.../samples-dev/getAUrlEntity.ts | 35 +
.../samples-dev/getAWatchlist.ts | 35 +
.../samples-dev/getAWatchlistItem.ts | 37 +
.../samples-dev/getAlertRuleTemplateById.ts | 35 +
.../samples-dev/getAllActionsOfAlertRule.ts | 38 +
.../samples-dev/getAllAlertRuleTemplates.ts | 36 +
.../samples-dev/getAllAlertRules.ts | 36 +
.../samples-dev/getAllAutomationRules.ts | 36 +
.../samples-dev/getAllBookmarkRelations.ts | 38 +
.../samples-dev/getAllBookmarks.ts | 36 +
.../samples-dev/getAllDataConnectors.ts | 36 +
.../samples-dev/getAllEntities.ts | 36 +
.../samples-dev/getAllEntityQueries.ts | 39 +
.../samples-dev/getAllEntityQueryTemplates.ts | 36 +
.../samples-dev/getAllIncidentAlerts.ts | 35 +
.../samples-dev/getAllIncidentBookmarks.ts | 35 +
.../samples-dev/getAllIncidentComments.ts | 38 +
.../samples-dev/getAllIncidentRelations.ts | 38 +
.../samples-dev/getAllIncidents.ts | 40 +
.../samples-dev/getAllMetadata.ts | 36 +
...dataWithODataFilterOrOrderbyOrSkipOrTop.ts | 36 +
.../samples-dev/getAllOfficeConsents.ts | 36 +
.../samples-dev/getAllRelationsOfAnEntity.ts | 38 +
.../getAllSentinelOnboardingStates.ts | 33 +
.../samples-dev/getAllSettings.ts | 33 +
.../samples-dev/getAllSourceControls.ts | 36 +
.../getAllThreatIntelligenceIndicators.ts | 36 +
.../samples-dev/getAllWatchlistItems.ts | 38 +
.../samples-dev/getAllWatchlists.ts | 36 +
.../samples-dev/getAnAadDataConnector.ts | 35 +
.../samples-dev/getAnAatpDataConnector.ts | 35 +
.../samples-dev/getAnAccountEntity.ts | 35 +
.../samples-dev/getAnActionOfAlertRule.ts | 37 +
.../samples-dev/getAnActivityEntityQuery.ts | 35 +
.../getAnActivityEntityQueryTemplate.ts | 35 +
.../samples-dev/getAnAutomationRule.ts | 35 +
.../getAnAwsCloudTrailDataConnector.ts | 35 +
.../samples-dev/getAnAwsS3DataConnector.ts | 35 +
.../samples-dev/getAnAzureResourceEntity.ts | 35 +
.../samples-dev/getAnEntityRelation.ts | 37 +
.../samples-dev/getAnExpansionEntityQuery.ts | 35 +
.../samples-dev/getAnIPEntity.ts | 35 +
.../samples-dev/getAnIncident.ts | 35 +
.../samples-dev/getAnIncidentComment.ts | 37 +
.../samples-dev/getAnIncidentRelation.ts | 37 +
.../samples-dev/getAnIoTDeviceEntity.ts | 35 +
.../samples-dev/getAnNrtAlertRule.ts | 35 +
.../getAnOffice365DataConnector.ts | 35 +
.../samples-dev/getAnOfficeConsent.ts | 35 +
.../samples-dev/getEntityQuery.ts | 37 +
.../samples-dev/getEyesOnSettings.ts | 35 +
.../getGeodataForASingleIPAddress.ts | 30 +
.../samples-dev/getRepositoryList.ts | 38 +
.../samples-dev/getSentinelOnboardingState.ts | 35 +
.../samples-dev/getSingleMetadataByName.ts | 35 +
.../getThreatIntelligenceIndicatorsMetrics.ts | 33 +
...getWhoisInformationForASingleDomainName.ts | 30 +
.../getsAllIncidentRelatedEntities.ts | 35 +
...ligenceIndicatorsAsPerFilteringCriteria.ts | 49 +
.../replaceTagsToAThreatIntelligence.ts | 44 +
.../updateAThreatIntelligenceIndicator.ts | 59 +
.../samples-dev/updateEyesOnSettings.ts | 40 +
.../samples-dev/updateMetadata.ts | 39 +
.../viewAThreatIntelligenceIndicatorByName.ts | 35 +
.../arm-securityinsight/src/index.ts | 12 +
.../arm-securityinsight/src/models/index.ts | 8349 +++++++++
.../arm-securityinsight/src/models/mappers.ts | 14311 ++++++++++++++++
.../src/models/parameters.ts | 616 +
.../src/operations/actions.ts | 351 +
.../src/operations/alertRuleTemplates.ts | 221 +
.../src/operations/alertRules.ts | 314 +
.../src/operations/automationRules.ts | 320 +
.../src/operations/bookmarkOperations.ts | 80 +
.../src/operations/bookmarkRelations.ts | 369 +
.../src/operations/bookmarks.ts | 314 +
.../src/operations/dataConnectors.ts | 413 +
...taConnectorsCheckRequirementsOperations.ts | 83 +
.../src/operations/domainWhois.ts | 71 +
.../src/operations/entities.ts | 366 +
.../src/operations/entitiesGetTimeline.ts | 80 +
.../src/operations/entitiesRelations.ts | 216 +
.../src/operations/entityQueries.ts | 315 +
.../src/operations/entityQueryTemplates.ts | 221 +
.../src/operations/entityRelations.ts | 78 +
.../src/operations/iPGeodata.ts | 68 +
.../src/operations/incidentComments.ts | 381 +
.../src/operations/incidentRelations.ts | 369 +
.../src/operations/incidents.ts | 508 +
.../src/operations/index.ts | 40 +
.../src/operations/metadata.ts | 381 +
.../src/operations/officeConsents.ts | 263 +
.../src/operations/operations.ts | 137 +
.../src/operations/productSettings.ts | 207 +
.../operations/sentinelOnboardingStates.ts | 222 +
.../src/operations/sourceControlOperations.ts | 206 +
.../src/operations/sourceControls.ts | 320 +
.../operations/threatIntelligenceIndicator.ts | 526 +
.../threatIntelligenceIndicatorMetrics.ts | 73 +
.../threatIntelligenceIndicators.ts | 190 +
.../src/operations/watchlistItems.ts | 369 +
.../src/operations/watchlists.ts | 316 +
.../src/operationsInterfaces/actions.ts | 84 +
.../alertRuleTemplates.ts | 44 +
.../src/operationsInterfaces/alertRules.ts | 75 +
.../operationsInterfaces/automationRules.ts | 75 +
.../bookmarkOperations.ts | 32 +
.../operationsInterfaces/bookmarkRelations.ts | 83 +
.../src/operationsInterfaces/bookmarks.ts | 75 +
.../operationsInterfaces/dataConnectors.ts | 106 +
...taConnectorsCheckRequirementsOperations.ts | 30 +
.../src/operationsInterfaces/domainWhois.ts | 27 +
.../src/operationsInterfaces/entities.ts | 98 +
.../entitiesGetTimeline.ts | 32 +
.../operationsInterfaces/entitiesRelations.ts | 28 +
.../src/operationsInterfaces/entityQueries.ts | 76 +
.../entityQueryTemplates.ts | 44 +
.../operationsInterfaces/entityRelations.ts | 31 +
.../src/operationsInterfaces/iPGeodata.ts | 24 +
.../operationsInterfaces/incidentComments.ts | 83 +
.../operationsInterfaces/incidentRelations.ts | 83 +
.../src/operationsInterfaces/incidents.ts | 139 +
.../src/operationsInterfaces/index.ts | 40 +
.../src/operationsInterfaces/metadata.ts | 93 +
.../operationsInterfaces/officeConsents.ts | 58 +
.../src/operationsInterfaces/operations.ts | 22 +
.../operationsInterfaces/productSettings.ts | 74 +
.../sentinelOnboardingStates.ts | 71 +
.../sourceControlOperations.ts | 32 +
.../operationsInterfaces/sourceControls.ts | 75 +
.../threatIntelligenceIndicator.ts | 131 +
.../threatIntelligenceIndicatorMetrics.ts | 27 +
.../threatIntelligenceIndicators.ts | 29 +
.../operationsInterfaces/watchlistItems.ts | 83 +
.../src/operationsInterfaces/watchlists.ts | 77 +
.../src/securityInsights.ts | 211 +
.../arm-securityinsight/test/sampleTest.ts | 48 +
.../arm-securityinsight/tsconfig.json | 19 +
sdk/securityinsight/ci.yml | 30 +
419 files changed, 56767 insertions(+), 3639 deletions(-)
create mode 100644 sdk/iotcentral/arm-iotcentral/CHANGELOG.md
create mode 100644 sdk/iotcentral/arm-iotcentral/LICENSE
create mode 100644 sdk/iotcentral/arm-iotcentral/_meta.json
create mode 100644 sdk/iotcentral/arm-iotcentral/api-extractor.json
create mode 100644 sdk/iotcentral/arm-iotcentral/recordings/node/my_test/recording_sample_test.js
create mode 100644 sdk/iotcentral/arm-iotcentral/review/arm-iotcentral.api.md
create mode 100644 sdk/iotcentral/arm-iotcentral/sample.env
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsCheckNameAvailability.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsCreateOrUpdate.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsDelete.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsGet.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsListByResourceGroup.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsListBySubscription.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsListTemplates.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsSubdomainAvailability.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/appsUpdate.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples-dev/operationsList.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/README.md
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCheckNameAvailability.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCreateOrUpdate.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsDelete.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsGet.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListByResourceGroup.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListBySubscription.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListTemplates.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsSubdomainAvailability.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsUpdate.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/operationsList.js
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/package.json
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/javascript/sample.env
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/README.md
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/package.json
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/sample.env
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCheckNameAvailability.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCreateOrUpdate.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsDelete.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsGet.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListByResourceGroup.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListBySubscription.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListTemplates.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsSubdomainAvailability.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsUpdate.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/operationsList.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/samples/v6/typescript/tsconfig.json
rename sdk/iotcentral/arm-iotcentral/src/{models/appsMappers.ts => index.ts} (50%)
delete mode 100644 sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/src/lroImpl.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/apps.ts
rename sdk/iotcentral/arm-iotcentral/src/{models/operationsMappers.ts => operationsInterfaces/index.ts} (68%)
create mode 100644 sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/operations.ts
create mode 100644 sdk/iotcentral/arm-iotcentral/test/sampleTest.ts
create mode 100644 sdk/iotcentral/ci.yml
create mode 100644 sdk/machinelearning/arm-commitmentplans/CHANGELOG.md
create mode 100644 sdk/machinelearning/arm-commitmentplans/LICENSE
create mode 100644 sdk/machinelearning/arm-commitmentplans/_meta.json
create mode 100644 sdk/machinelearning/arm-commitmentplans/api-extractor.json
create mode 100644 sdk/machinelearning/arm-commitmentplans/recordings/node/my_test/recording_sample_test.js
create mode 100644 sdk/machinelearning/arm-commitmentplans/review/arm-commitmentplans.api.md
delete mode 100644 sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/index.ts
delete mode 100644 sdk/machinelearning/arm-commitmentplans/src/models/commitmentAssociationsMappers.ts
delete mode 100644 sdk/machinelearning/arm-commitmentplans/src/models/commitmentPlansMappers.ts
delete mode 100644 sdk/machinelearning/arm-commitmentplans/src/models/skusMappers.ts
delete mode 100644 sdk/machinelearning/arm-commitmentplans/src/models/usageHistoryMappers.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operations/operations.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operationsInterfaces/commitmentAssociations.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operationsInterfaces/commitmentPlans.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operationsInterfaces/index.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operationsInterfaces/operations.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operationsInterfaces/skus.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/src/operationsInterfaces/usageHistory.ts
create mode 100644 sdk/machinelearning/arm-commitmentplans/test/sampleTest.ts
create mode 100644 sdk/machinelearning/ci.yml
create mode 100644 sdk/oep/arm-oep/CHANGELOG.md
create mode 100644 sdk/oep/arm-oep/LICENSE
create mode 100644 sdk/oep/arm-oep/README.md
create mode 100644 sdk/oep/arm-oep/_meta.json
create mode 100644 sdk/oep/arm-oep/api-extractor.json
create mode 100644 sdk/oep/arm-oep/package.json
create mode 100644 sdk/oep/arm-oep/recordings/node/my_test/recording_sample_test.js
create mode 100644 sdk/oep/arm-oep/review/arm-oep.api.md
create mode 100644 sdk/oep/arm-oep/rollup.config.js
create mode 100644 sdk/oep/arm-oep/sample.env
create mode 100644 sdk/oep/arm-oep/samples-dev/locationsCheckNameAvailability.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/oepResourceCreate.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/oepResourceDelete.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/oepResourceGet.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/oepResourceListByResourceGroup.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/oepResourceListBySubscriptionId.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/oepResourceUpdate.ts
create mode 100644 sdk/oep/arm-oep/samples-dev/operationsList.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/README.md
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/locationsCheckNameAvailability.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/oepResourceCreate.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/oepResourceDelete.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/oepResourceGet.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/oepResourceListByResourceGroup.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/oepResourceListBySubscriptionId.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/oepResourceUpdate.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/operationsList.js
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/package.json
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/javascript/sample.env
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/README.md
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/package.json
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/sample.env
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/locationsCheckNameAvailability.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/oepResourceCreate.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/oepResourceDelete.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/oepResourceGet.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/oepResourceListByResourceGroup.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/oepResourceListBySubscriptionId.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/oepResourceUpdate.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/src/operationsList.ts
create mode 100644 sdk/oep/arm-oep/samples/v1-beta/typescript/tsconfig.json
create mode 100644 sdk/oep/arm-oep/src/index.ts
create mode 100644 sdk/oep/arm-oep/src/lroImpl.ts
create mode 100644 sdk/oep/arm-oep/src/models/index.ts
create mode 100644 sdk/oep/arm-oep/src/models/mappers.ts
create mode 100644 sdk/oep/arm-oep/src/models/parameters.ts
create mode 100644 sdk/oep/arm-oep/src/openEnergyPlatformManagementServiceAPIs.ts
create mode 100644 sdk/oep/arm-oep/src/operations/energyServices.ts
create mode 100644 sdk/oep/arm-oep/src/operations/index.ts
create mode 100644 sdk/oep/arm-oep/src/operations/locations.ts
create mode 100644 sdk/oep/arm-oep/src/operations/operations.ts
create mode 100644 sdk/oep/arm-oep/src/operationsInterfaces/energyServices.ts
create mode 100644 sdk/oep/arm-oep/src/operationsInterfaces/index.ts
create mode 100644 sdk/oep/arm-oep/src/operationsInterfaces/locations.ts
create mode 100644 sdk/oep/arm-oep/src/operationsInterfaces/operations.ts
create mode 100644 sdk/oep/arm-oep/test/sampleTest.ts
create mode 100644 sdk/oep/arm-oep/tsconfig.json
create mode 100644 sdk/oep/ci.yml
create mode 100644 sdk/securityinsight/arm-securityinsight/CHANGELOG.md
create mode 100644 sdk/securityinsight/arm-securityinsight/LICENSE
create mode 100644 sdk/securityinsight/arm-securityinsight/README.md
create mode 100644 sdk/securityinsight/arm-securityinsight/_meta.json
create mode 100644 sdk/securityinsight/arm-securityinsight/api-extractor.json
create mode 100644 sdk/securityinsight/arm-securityinsight/package.json
create mode 100644 sdk/securityinsight/arm-securityinsight/recordings/node/my_test/recording_sample_test.js
create mode 100644 sdk/securityinsight/arm-securityinsight/review/arm-securityinsight.api.md
create mode 100644 sdk/securityinsight/arm-securityinsight/rollup.config.js
create mode 100644 sdk/securityinsight/arm-securityinsight/sample.env
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/appendTagsToAThreatIntelligenceIndicator.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForAad.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForAadNoAuthorization.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForAadNoLicense.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForAsc.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForDynamics365.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForMcas.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForMdatp.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForMicrosoftThreatIntelligence.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForMicrosoftThreatProtection.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForOfficeAtp.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForOfficeIrm.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForTi.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/checkRequirementsForTiTaxii.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/connectAnApiPollingDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createANewThreatIntelligence.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createOrUpdateFullMetadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createOrUpdateMinimalMetadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createSentinelOnboardingState.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsASourceControl.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsIncidentTeamsGroup.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAApiPollingDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesABookmark.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesABookmarkRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesADynamics365DataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAFusionAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAGenericUiDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAMicrosoftSecurityIncidentCreationRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesANrtAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAScheduledAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAThreatIntelligenceTaxiiDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAWatchlist.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAWatchlistItem.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnActionOfAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnActivityEntityQuery.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnAutomationRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnIncident.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnIncidentComment.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnIncidentRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnOffice365DataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/createsOrUpdatesAnThreatIntelligencePlatformDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAApiPollingDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteABookmark.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAGenericUiDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteASourceControl.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAThreatIntelligenceIndicator.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAWatchlist.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAWatchlistItem.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnActionOfAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnAutomationRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnEntityQuery.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnIncident.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnOffice365DataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteAnOfficeConsent.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteEyesOnSettings.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteMetadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteSentinelOnboardingState.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteTheBookmarkRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteTheIncidentComment.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/deleteTheIncidentRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/disconnectAnApiPollingDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/entityInsight.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/entityTimeline.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/expandAnBookmark.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/expandAnEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAApiPollingDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAAscDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getABookmark.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getABookmarkRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getACloudApplicationEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getADnsEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getADynamics365DataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAFileEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAFileHashEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAFusionAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAGenericUiDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAHostEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMailClusterEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMailMessageEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMailboxEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMalwareEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMcasDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMdatpDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMicrosoftSecurityIncidentCreationRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMicrosoftThreatIntelligenceDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAMicrosoftThreatProtectionDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAOfficeAtpDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAOfficeIrmDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAProcessEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getARegistryKeyEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getARegistryValueEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAScheduledAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getASecurityAlertEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getASecurityGroupEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getASourceControl.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getASubmissionMailEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getATiDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getATiTaxiiDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAUrlEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAWatchlist.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAWatchlistItem.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAlertRuleTemplateById.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllActionsOfAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllAlertRuleTemplates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllAlertRules.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllAutomationRules.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllBookmarkRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllBookmarks.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllDataConnectors.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllEntities.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllEntityQueries.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllEntityQueryTemplates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllIncidentAlerts.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllIncidentBookmarks.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllIncidentComments.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllIncidentRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllIncidents.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllMetadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllMetadataWithODataFilterOrOrderbyOrSkipOrTop.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllOfficeConsents.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllRelationsOfAnEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllSentinelOnboardingStates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllSettings.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllSourceControls.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllThreatIntelligenceIndicators.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllWatchlistItems.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAllWatchlists.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAadDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAatpDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAccountEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnActionOfAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnActivityEntityQuery.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnActivityEntityQueryTemplate.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAutomationRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAwsCloudTrailDataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAwsS3DataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnAzureResourceEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnEntityRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnExpansionEntityQuery.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnIPEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnIncident.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnIncidentComment.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnIncidentRelation.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnIoTDeviceEntity.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnNrtAlertRule.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnOffice365DataConnector.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getAnOfficeConsent.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getEntityQuery.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getEyesOnSettings.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getGeodataForASingleIPAddress.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getRepositoryList.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getSentinelOnboardingState.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getSingleMetadataByName.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getThreatIntelligenceIndicatorsMetrics.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getWhoisInformationForASingleDomainName.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/getsAllIncidentRelatedEntities.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/queryThreatIntelligenceIndicatorsAsPerFilteringCriteria.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/replaceTagsToAThreatIntelligence.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/updateAThreatIntelligenceIndicator.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/updateEyesOnSettings.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/updateMetadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/samples-dev/viewAThreatIntelligenceIndicatorByName.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/index.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/models/index.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/models/mappers.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/models/parameters.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/actions.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/alertRuleTemplates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/alertRules.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/automationRules.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/bookmarkOperations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/bookmarkRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/bookmarks.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/dataConnectors.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/dataConnectorsCheckRequirementsOperations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/domainWhois.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/entities.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/entitiesGetTimeline.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/entitiesRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/entityQueries.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/entityQueryTemplates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/entityRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/iPGeodata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/incidentComments.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/incidentRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/incidents.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/index.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/metadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/officeConsents.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/operations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/productSettings.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/sentinelOnboardingStates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/sourceControlOperations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/sourceControls.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/threatIntelligenceIndicator.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/threatIntelligenceIndicatorMetrics.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/threatIntelligenceIndicators.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/watchlistItems.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operations/watchlists.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/actions.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/alertRuleTemplates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/alertRules.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/automationRules.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/bookmarkOperations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/bookmarkRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/bookmarks.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/dataConnectors.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/dataConnectorsCheckRequirementsOperations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/domainWhois.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/entities.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/entitiesGetTimeline.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/entitiesRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/entityQueries.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/entityQueryTemplates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/entityRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/iPGeodata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/incidentComments.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/incidentRelations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/incidents.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/index.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/metadata.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/officeConsents.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/operations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/productSettings.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/sentinelOnboardingStates.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/sourceControlOperations.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/sourceControls.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/threatIntelligenceIndicator.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/threatIntelligenceIndicatorMetrics.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/threatIntelligenceIndicators.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/watchlistItems.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/operationsInterfaces/watchlists.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/src/securityInsights.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/test/sampleTest.ts
create mode 100644 sdk/securityinsight/arm-securityinsight/tsconfig.json
create mode 100644 sdk/securityinsight/ci.yml
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 04419fc2d730..a4922060bc48 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -649,6 +649,12 @@ sdk/purview/arm-purview @qiaozha @dw511214992
# PRLabel: %Mgmt
sdk/imagebuilder/arm-imagebuilder @qiaozha @dw511214992
+# PRLabel: %Mgmt
+sdk/securityinsights/arm-securityinsights @qiaozha @dw511214992
+
+# PRLabel: %Mgmt
+sdk/oep/arm-oep @qiaozha @dw511214992
+
# PRLabel: %Monitor
/sdk/monitor/ @hectorhdzg @applicationinsights-js-owners
/sdk/monitor/monitor-query @KarishmaGhiya @maorleger
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 34bd488cfad3..e0361a32ce57 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -27,6 +27,7 @@ specifiers:
'@rush-temp/arm-changeanalysis': file:./projects/arm-changeanalysis.tgz
'@rush-temp/arm-cognitiveservices': file:./projects/arm-cognitiveservices.tgz
'@rush-temp/arm-commerce': file:./projects/arm-commerce.tgz
+ '@rush-temp/arm-commitmentplans': file:./projects/arm-commitmentplans.tgz
'@rush-temp/arm-communication': file:./projects/arm-communication.tgz
'@rush-temp/arm-compute': file:./projects/arm-compute.tgz
'@rush-temp/arm-confluent': file:./projects/arm-confluent.tgz
@@ -63,6 +64,7 @@ specifiers:
'@rush-temp/arm-hybridcompute': file:./projects/arm-hybridcompute.tgz
'@rush-temp/arm-hybridkubernetes': file:./projects/arm-hybridkubernetes.tgz
'@rush-temp/arm-imagebuilder': file:./projects/arm-imagebuilder.tgz
+ '@rush-temp/arm-iotcentral': file:./projects/arm-iotcentral.tgz
'@rush-temp/arm-iothub': file:./projects/arm-iothub.tgz
'@rush-temp/arm-keyvault': file:./projects/arm-keyvault.tgz
'@rush-temp/arm-kubernetesconfiguration': file:./projects/arm-kubernetesconfiguration.tgz
@@ -81,6 +83,7 @@ specifiers:
'@rush-temp/arm-mysql': file:./projects/arm-mysql.tgz
'@rush-temp/arm-network': file:./projects/arm-network.tgz
'@rush-temp/arm-notificationhubs': file:./projects/arm-notificationhubs.tgz
+ '@rush-temp/arm-oep': file:./projects/arm-oep.tgz
'@rush-temp/arm-operationalinsights': file:./projects/arm-operationalinsights.tgz
'@rush-temp/arm-operations': file:./projects/arm-operations.tgz
'@rush-temp/arm-orbital': file:./projects/arm-orbital.tgz
@@ -97,6 +100,7 @@ specifiers:
'@rush-temp/arm-resources-subscriptions': file:./projects/arm-resources-subscriptions.tgz
'@rush-temp/arm-search': file:./projects/arm-search.tgz
'@rush-temp/arm-security': file:./projects/arm-security.tgz
+ '@rush-temp/arm-securityinsight': file:./projects/arm-securityinsight.tgz
'@rush-temp/arm-servicebus': file:./projects/arm-servicebus.tgz
'@rush-temp/arm-servicefabric': file:./projects/arm-servicefabric.tgz
'@rush-temp/arm-sql': file:./projects/arm-sql.tgz
@@ -237,6 +241,7 @@ dependencies:
'@rush-temp/arm-changeanalysis': file:projects/arm-changeanalysis.tgz
'@rush-temp/arm-cognitiveservices': file:projects/arm-cognitiveservices.tgz
'@rush-temp/arm-commerce': file:projects/arm-commerce.tgz
+ '@rush-temp/arm-commitmentplans': file:projects/arm-commitmentplans.tgz
'@rush-temp/arm-communication': file:projects/arm-communication.tgz
'@rush-temp/arm-compute': file:projects/arm-compute.tgz
'@rush-temp/arm-confluent': file:projects/arm-confluent.tgz
@@ -273,6 +278,7 @@ dependencies:
'@rush-temp/arm-hybridcompute': file:projects/arm-hybridcompute.tgz
'@rush-temp/arm-hybridkubernetes': file:projects/arm-hybridkubernetes.tgz
'@rush-temp/arm-imagebuilder': file:projects/arm-imagebuilder.tgz
+ '@rush-temp/arm-iotcentral': file:projects/arm-iotcentral.tgz
'@rush-temp/arm-iothub': file:projects/arm-iothub.tgz
'@rush-temp/arm-keyvault': file:projects/arm-keyvault.tgz
'@rush-temp/arm-kubernetesconfiguration': file:projects/arm-kubernetesconfiguration.tgz
@@ -291,6 +297,7 @@ dependencies:
'@rush-temp/arm-mysql': file:projects/arm-mysql.tgz
'@rush-temp/arm-network': file:projects/arm-network.tgz
'@rush-temp/arm-notificationhubs': file:projects/arm-notificationhubs.tgz
+ '@rush-temp/arm-oep': file:projects/arm-oep.tgz
'@rush-temp/arm-operationalinsights': file:projects/arm-operationalinsights.tgz
'@rush-temp/arm-operations': file:projects/arm-operations.tgz
'@rush-temp/arm-orbital': file:projects/arm-orbital.tgz
@@ -307,6 +314,7 @@ dependencies:
'@rush-temp/arm-resources-subscriptions': file:projects/arm-resources-subscriptions.tgz
'@rush-temp/arm-search': file:projects/arm-search.tgz
'@rush-temp/arm-security': file:projects/arm-security.tgz
+ '@rush-temp/arm-securityinsight': file:projects/arm-securityinsight.tgz
'@rush-temp/arm-servicebus': file:projects/arm-servicebus.tgz
'@rush-temp/arm-servicefabric': file:projects/arm-servicefabric.tgz
'@rush-temp/arm-sql': file:projects/arm-sql.tgz
@@ -1573,7 +1581,6 @@ packages:
/@opentelemetry/node/0.24.0_@opentelemetry+api@1.0.4:
resolution: {integrity: sha512-Sy8QooZFOeVUcJIKetw5xsq15/1ivZovWg0RnKWtzURMQrcOxmQ3bGrXPORklOJxOtf5snDHgT37Y7dBgr+c+g==}
engines: {node: '>=8.0.0'}
- deprecated: Package renamed to @opentelemetry/sdk-trace-node
peerDependencies:
'@opentelemetry/api': ^1.0.1
dependencies:
@@ -9071,6 +9078,31 @@ packages:
- supports-color
dev: false
+ file:projects/arm-commitmentplans.tgz:
+ resolution: {integrity: sha512-NRV8GqRYFRYNMB1NA4M/CQGqnyTJfj66wOQ+vccGMaSEMAQvNkV3p1A6XolSlZmzWp+jLSHb074m6jIoxdEfSw==, tarball: file:projects/arm-commitmentplans.tgz}
+ name: '@rush-temp/arm-commitmentplans'
+ version: 0.0.0
+ dependencies:
+ '@azure-tools/test-recorder': 1.0.2
+ '@microsoft/api-extractor': 7.19.4
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.5
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ dev: false
+
file:projects/arm-communication.tgz:
resolution: {integrity: sha512-e53reTD+lNsFKL9zM0QfPMad4xvgBQbWNOhhSAeeABFngjM4wfVG5M4GJHfNsTTpQXe13LXYpCXNZjUyE4rJ0w==, tarball: file:projects/arm-communication.tgz}
name: '@rush-temp/arm-communication'
@@ -9971,6 +10003,31 @@ packages:
- supports-color
dev: false
+ file:projects/arm-iotcentral.tgz:
+ resolution: {integrity: sha512-Q6B2jxYWwYaoLBMIJl//Kf/l+9qmLRU0TZgNcCpBK/ynqvFKKIP2kMfUXYktG3hetsJNMaLav7xFvFOc/Snp0A==, tarball: file:projects/arm-iotcentral.tgz}
+ name: '@rush-temp/arm-iotcentral'
+ version: 0.0.0
+ dependencies:
+ '@azure-tools/test-recorder': 1.0.2
+ '@microsoft/api-extractor': 7.19.4
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.5
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ dev: false
+
file:projects/arm-iothub.tgz:
resolution: {integrity: sha512-FNymR7VOSktBIh+IkM4gluBtugclvlGiK+jLBbHLyU24SjOXf/wy6dTgKPavFB8r/rLJ6FSdiwqx0Dzdy8g2NQ==, tarball: file:projects/arm-iothub.tgz}
name: '@rush-temp/arm-iothub'
@@ -10421,6 +10478,31 @@ packages:
- supports-color
dev: false
+ file:projects/arm-oep.tgz:
+ resolution: {integrity: sha512-d2SXpTfnllsvJbUKmjFQyGYzw8gFBsgy3iapepGDx2+Q2J+pEAJ9rFPdsTcRE9T6sVrOXx1yRBTNXS5rggi9Og==, tarball: file:projects/arm-oep.tgz}
+ name: '@rush-temp/arm-oep'
+ version: 0.0.0
+ dependencies:
+ '@azure-tools/test-recorder': 1.0.2
+ '@microsoft/api-extractor': 7.19.4
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.5
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ dev: false
+
file:projects/arm-operationalinsights.tgz:
resolution: {integrity: sha512-Z1LtfjTTB0gUbhF3V/3tMil95KRu75U+qvrFwfrORaV9OKP2IL64INaBLdZlfgP+BLhpuq94wSyM+euxavx/qA==, tarball: file:projects/arm-operationalinsights.tgz}
name: '@rush-temp/arm-operationalinsights'
@@ -10821,6 +10903,31 @@ packages:
- supports-color
dev: false
+ file:projects/arm-securityinsight.tgz:
+ resolution: {integrity: sha512-+lNrTLwSxSagCvWMpZ2amzQEaM2JEL47LMnUwtolKkKw0F/PjY5NG/xSU5Ap9jtNfm2Xedysgyg6LBDYElULiQ==, tarball: file:projects/arm-securityinsight.tgz}
+ name: '@rush-temp/arm-securityinsight'
+ version: 0.0.0
+ dependencies:
+ '@azure-tools/test-recorder': 1.0.2
+ '@microsoft/api-extractor': 7.19.4
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.5
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ dev: false
+
file:projects/arm-servicebus.tgz:
resolution: {integrity: sha512-xUyJSlaPZccUpQ99rOf2TIUziaa7K1Ch4vcz0Jp+Dj/eam95rdQFtidaAoubJTI+Wcom0OsKDHWVqLbUyS8GpA==, tarball: file:projects/arm-servicebus.tgz}
name: '@rush-temp/arm-servicebus'
diff --git a/eng/ignore-links.txt b/eng/ignore-links.txt
index 920c465c7552..03ddf52b662c 100644
--- a/eng/ignore-links.txt
+++ b/eng/ignore-links.txt
@@ -24,3 +24,5 @@ https://docs.microsoft.com/javascript/api/@azure/arm-healthcareapis?view=azure-n
https://docs.microsoft.com/javascript/api/@azure/arm-hybridkubernetes?view=azure-node-preview
https://docs.microsoft.com/javascript/api/@azure/arm-healthcareapis
https://docs.microsoft.com/javascript/api/@azure/arm-hybridkubernetes
+https://docs.microsoft.com/javascript/api/@azure/arm-oep?view=azure-node-preview
+https://docs.microsoft.com/javascript/api/@azure/arm-securityinsight?view=azure-node-preview
diff --git a/rush.json b/rush.json
index c1b04073f433..d175b19a1fcf 100644
--- a/rush.json
+++ b/rush.json
@@ -1360,6 +1360,26 @@
"packageName": "@azure/arm-hybridkubernetes",
"projectFolder": "sdk/hybridkubernetes/arm-hybridkubernetes",
"versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-oep",
+ "projectFolder": "sdk/oep/arm-oep",
+ "versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-securityinsight",
+ "projectFolder": "sdk/securityinsight/arm-securityinsight",
+ "versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-iotcentral",
+ "projectFolder": "sdk/iotcentral/arm-iotcentral",
+ "versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-commitmentplans",
+ "projectFolder": "sdk/machinelearning/arm-commitmentplans",
+ "versionPolicyName": "management"
}
]
}
diff --git a/sdk/commerce/arm-commerce/_meta.json b/sdk/commerce/arm-commerce/_meta.json
index c3f69bcc6e16..80663fe7da65 100644
--- a/sdk/commerce/arm-commerce/_meta.json
+++ b/sdk/commerce/arm-commerce/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d",
- "readme": "specification/hybridcompute/resource-manager/readme.md",
+ "readme": "specification/commerce/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/databoxedge/arm-databoxedge/_meta.json b/sdk/databoxedge/arm-databoxedge/_meta.json
index 1b148038aa78..1a2bdab7f724 100644
--- a/sdk/databoxedge/arm-databoxedge/_meta.json
+++ b/sdk/databoxedge/arm-databoxedge/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247",
- "readme": "specification/deviceprovisioningservices/resource-manager/readme.md",
+ "readme": "specification/databoxedge/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/deviceprovisioningservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/datadog/arm-datadog/_meta.json b/sdk/datadog/arm-datadog/_meta.json
index 1b148038aa78..a72152b43587 100644
--- a/sdk/datadog/arm-datadog/_meta.json
+++ b/sdk/datadog/arm-datadog/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247",
- "readme": "specification/deviceprovisioningservices/resource-manager/readme.md",
+ "readme": "specification/datadog/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/deviceprovisioningservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/datamigration/arm-datamigration/_meta.json b/sdk/datamigration/arm-datamigration/_meta.json
index c3f69bcc6e16..e0620020082d 100644
--- a/sdk/datamigration/arm-datamigration/_meta.json
+++ b/sdk/datamigration/arm-datamigration/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d",
- "readme": "specification/hybridcompute/resource-manager/readme.md",
+ "readme": "specification/datamigration/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/deploymentmanager/arm-deploymentmanager/_meta.json b/sdk/deploymentmanager/arm-deploymentmanager/_meta.json
index 472837b09e4b..815e34ac2909 100644
--- a/sdk/deploymentmanager/arm-deploymentmanager/_meta.json
+++ b/sdk/deploymentmanager/arm-deploymentmanager/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "dc439efcfc15448824877603f66fc1578d1c71c5",
- "readme": "specification/kubernetesconfiguration/resource-manager/readme.md",
+ "readme": "specification/deploymentmanager/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/kubernetesconfiguration/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/digitaltwins/arm-digitaltwins/_meta.json b/sdk/digitaltwins/arm-digitaltwins/_meta.json
index 07a8599e4261..5369742eb463 100644
--- a/sdk/digitaltwins/arm-digitaltwins/_meta.json
+++ b/sdk/digitaltwins/arm-digitaltwins/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a",
- "readme": "specification/devspaces/resource-manager/readme.md",
+ "readme": "specification/digitaltwins/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/devspaces/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/dns/arm-dns/_meta.json b/sdk/dns/arm-dns/_meta.json
index 07a8599e4261..21c2c69629af 100644
--- a/sdk/dns/arm-dns/_meta.json
+++ b/sdk/dns/arm-dns/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a",
- "readme": "specification/devspaces/resource-manager/readme.md",
+ "readme": "specification/dns/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/devspaces/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/domainservices/arm-domainservices/_meta.json b/sdk/domainservices/arm-domainservices/_meta.json
index c5460a12c0c6..00e694d5c26c 100644
--- a/sdk/domainservices/arm-domainservices/_meta.json
+++ b/sdk/domainservices/arm-domainservices/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "1f1d5b0b9ce6cc94605b2fd619dce374fb6e033a",
- "readme": "specification/healthbot/resource-manager/readme.md",
+ "readme": "specification/domainservices/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/healthbot/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/hanaonazure/arm-hanaonazure/_meta.json b/sdk/hanaonazure/arm-hanaonazure/_meta.json
index 472837b09e4b..713a4dc21c9b 100644
--- a/sdk/hanaonazure/arm-hanaonazure/_meta.json
+++ b/sdk/hanaonazure/arm-hanaonazure/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "dc439efcfc15448824877603f66fc1578d1c71c5",
- "readme": "specification/kubernetesconfiguration/resource-manager/readme.md",
+ "readme": "specification/hanaonazure/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/kubernetesconfiguration/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/healthcareapis/arm-healthcareapis/_meta.json b/sdk/healthcareapis/arm-healthcareapis/_meta.json
index c3f69bcc6e16..f3f809f770f8 100644
--- a/sdk/healthcareapis/arm-healthcareapis/_meta.json
+++ b/sdk/healthcareapis/arm-healthcareapis/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d",
- "readme": "specification/hybridcompute/resource-manager/readme.md",
+ "readme": "specification/healthcareapis/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/hybridkubernetes/arm-hybridkubernetes/_meta.json b/sdk/hybridkubernetes/arm-hybridkubernetes/_meta.json
index c3f69bcc6e16..cf7cc18f6619 100644
--- a/sdk/hybridkubernetes/arm-hybridkubernetes/_meta.json
+++ b/sdk/hybridkubernetes/arm-hybridkubernetes/_meta.json
@@ -1,7 +1,7 @@
{
"commit": "d29e6eb4894005c52e67cb4b5ac3faf031113e7d",
- "readme": "specification/hybridcompute/resource-manager/readme.md",
+ "readme": "specification/hybridkubernetes/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/hybridcompute/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
-}
\ No newline at end of file
+}
diff --git a/sdk/iotcentral/arm-iotcentral/CHANGELOG.md b/sdk/iotcentral/arm-iotcentral/CHANGELOG.md
new file mode 100644
index 000000000000..ccde49b897bb
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 6.0.0 (2022-01-19)
+
+The package of @azure/arm-iotcentral is using our next generation design principles since version 6.0.0, which contains breaking changes.
+
+To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
+
+To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
+
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
diff --git a/sdk/iotcentral/arm-iotcentral/LICENSE b/sdk/iotcentral/arm-iotcentral/LICENSE
new file mode 100644
index 000000000000..5d1d36e0af80
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2022 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/sdk/iotcentral/arm-iotcentral/README.md b/sdk/iotcentral/arm-iotcentral/README.md
index 0254dd60cb43..b623d65546e9 100644
--- a/sdk/iotcentral/arm-iotcentral/README.md
+++ b/sdk/iotcentral/arm-iotcentral/README.md
@@ -1,102 +1,98 @@
-## Azure IotCentralClient SDK for JavaScript
+# Azure IotCentral client library for JavaScript
-This package contains an isomorphic SDK for IotCentralClient.
+This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure IotCentral client.
+
+Use this API to manage IoT Central Applications in your Azure subscription.
+
+[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral) |
+[Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotcentral) |
+[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral) |
+[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
+
+## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
-- Latest versions of Safari, Chrome, Edge, and Firefox.
+- Latest versions of Safari, Chrome, Edge and Firefox.
+
+### Prerequisites
+
+- An [Azure subscription][azure_sub].
+
+### Install the `@azure/arm-iotcentral` package
-### How to Install
+Install the Azure IotCentral client library for JavaScript with `npm`:
```bash
npm install @azure/arm-iotcentral
```
-### How to use
+### Create and authenticate a `IotCentralClient`
-#### nodejs - client creation and get apps as an example written in TypeScript.
+To create a client object to access the Azure IotCentral API, you will need the `endpoint` of your Azure IotCentral resource and a `credential`. The Azure IotCentral client can use Azure Active Directory credentials to authenticate.
+You can find the endpoint for your Azure IotCentral resource in the [Azure Portal][azure_portal].
-##### Install @azure/ms-rest-nodeauth
+You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
+
+To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
-- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
-npm install @azure/ms-rest-nodeauth@"^3.0.0"
+npm install @azure/identity
```
-##### Sample code
+You will also need to **register a new AAD application and grant access to Azure IotCentral** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
+Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
+
+For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
-While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
-```typescript
-const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
+```javascript
const { IotCentralClient } = require("@azure/arm-iotcentral");
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-msRestNodeAuth.interactiveLogin().then((creds) => {
- const client = new IotCentralClient(creds, subscriptionId);
- const resourceGroupName = "testresourceGroupName";
- const resourceName = "testresourceName";
- client.apps.get(resourceGroupName, resourceName).then((result) => {
- console.log("The result is:");
- console.log(result);
- });
-}).catch((err) => {
- console.error(err);
-});
+const { DefaultAzureCredential } = require("@azure/identity");
+const subscriptionId = "00000000-0000-0000-0000-000000000000";
+const client = new IotCentralClient(new DefaultAzureCredential(), subscriptionId);
```
-#### browser - Authentication, client creation and get apps as an example written in JavaScript.
-##### Install @azure/ms-rest-browserauth
+### 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).
-```bash
-npm install @azure/ms-rest-browserauth
-```
+## Key concepts
+
+### IotCentralClient
-##### Sample code
-
-See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
-
-- index.html
-```html
-
-
-
- @azure/arm-iotcentral sample
-
-
-
-
-
-
-
-
+`IotCentralClient` is the primary interface for developers using the Azure IotCentral client library. Explore the methods on this client object to understand the different features of the Azure IotCentral service that you can access.
+
+## Troubleshooting
+
+### Logging
+
+Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
+
+```javascript
+const { setLogLevel } = require("@azure/logger");
+setLogLevel("info");
```
+For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
+
+## Next steps
+
+Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
+
+## Contributing
+
+If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
+
## Related projects
-- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fiotcentral%2Farm-iotcentral%2FREADME.png)
-![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/iotcentral/arm-iotcentral/README.png)
+[azure_cli]: https://docs.microsoft.com/cli/azure
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_portal]: https://portal.azure.com
+[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
+[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
diff --git a/sdk/iotcentral/arm-iotcentral/_meta.json b/sdk/iotcentral/arm-iotcentral/_meta.json
new file mode 100644
index 000000000000..d8e031634413
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/_meta.json
@@ -0,0 +1,7 @@
+{
+ "commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
+ "readme": "specification/iotcentral/resource-manager/readme.md",
+ "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/iotspaces/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
+}
diff --git a/sdk/iotcentral/arm-iotcentral/api-extractor.json b/sdk/iotcentral/arm-iotcentral/api-extractor.json
new file mode 100644
index 000000000000..00d44d1929c3
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/api-extractor.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
+ "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "docModel": { "enabled": true },
+ "apiReport": { "enabled": true, "reportFolder": "./review" },
+ "dtsRollup": {
+ "enabled": true,
+ "untrimmedFilePath": "",
+ "publicTrimmedFilePath": "./types/arm-iotcentral.d.ts"
+ },
+ "messages": {
+ "tsdocMessageReporting": { "default": { "logLevel": "none" } },
+ "extractorMessageReporting": {
+ "ae-missing-release-tag": { "logLevel": "none" },
+ "ae-unresolved-link": { "logLevel": "none" }
+ }
+ }
+}
diff --git a/sdk/iotcentral/arm-iotcentral/package.json b/sdk/iotcentral/arm-iotcentral/package.json
index 395353525347..68e3bb34cb08 100644
--- a/sdk/iotcentral/arm-iotcentral/package.json
+++ b/sdk/iotcentral/arm-iotcentral/package.json
@@ -1,58 +1,103 @@
{
"name": "@azure/arm-iotcentral",
+ "sdk-type": "mgmt",
"author": "Microsoft Corporation",
- "description": "IotCentralClient Library with typescript type definitions for node.js and browser.",
- "version": "4.1.0",
+ "description": "A generated SDK for IotCentralClient.",
+ "version": "6.0.0",
+ "engines": { "node": ">=12.0.0" },
"dependencies": {
- "@azure/ms-rest-azure-js": "^2.0.1",
- "@azure/ms-rest-js": "^2.0.4",
- "tslib": "^1.10.0"
+ "@azure/core-lro": "^2.2.0",
+ "@azure/abort-controller": "^1.0.0",
+ "@azure/core-paging": "^1.2.0",
+ "@azure/core-client": "^1.0.0",
+ "@azure/core-auth": "^1.3.0",
+ "@azure/core-rest-pipeline": "^1.1.0",
+ "tslib": "^2.2.0"
},
- "keywords": [
- "node",
- "azure",
- "typescript",
- "browser",
- "isomorphic"
- ],
+ "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
- "main": "./dist/arm-iotcentral.js",
- "module": "./esm/iotCentralClient.js",
- "types": "./esm/iotCentralClient.d.ts",
+ "main": "./dist/index.js",
+ "module": "./dist-esm/src/index.js",
+ "types": "./types/arm-iotcentral.d.ts",
"devDependencies": {
- "typescript": "^3.5.3",
- "rollup": "^1.18.0",
- "rollup-plugin-node-resolve": "^5.2.0",
+ "@microsoft/api-extractor": "^7.18.11",
+ "@rollup/plugin-commonjs": "11.0.2",
+ "@rollup/plugin-json": "^4.0.0",
+ "@rollup/plugin-multi-entry": "^3.0.0",
+ "@rollup/plugin-node-resolve": "^8.0.0",
+ "mkdirp": "^1.0.4",
+ "rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
- "uglify-js": "^3.6.0"
+ "typescript": "~4.2.0",
+ "uglify-js": "^3.4.9",
+ "rimraf": "^3.0.0",
+ "@azure/identity": "^2.0.1",
+ "@azure-tools/test-recorder": "^1.0.0",
+ "mocha": "^7.1.1",
+ "cross-env": "^7.0.2"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
- "bugs": {
- "url": "https://github.com/Azure/azure-sdk-for-js/issues"
- },
+ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
- "esm/**/*.js",
- "esm/**/*.js.map",
- "esm/**/*.d.ts",
- "esm/**/*.d.ts.map",
+ "dist-esm/**/*.js",
+ "dist-esm/**/*.js.map",
+ "dist-esm/**/*.d.ts",
+ "dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"README.md",
+ "LICENSE",
"rollup.config.js",
- "tsconfig.json"
+ "tsconfig.json",
+ "review/*",
+ "CHANGELOG.md",
+ "types/*"
],
"scripts": {
- "build": "tsc && rollup -c rollup.config.js && npm run minify",
- "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-iotcentral.js.map'\" -o ./dist/arm-iotcentral.min.js ./dist/arm-iotcentral.js",
- "prepack": "npm install && npm run build"
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
+ "prepack": "npm run build",
+ "pack": "npm pack 2>&1",
+ "extract-api": "api-extractor run --local",
+ "lint": "echo skipped",
+ "audit": "echo skipped",
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
+ "build:node": "echo skipped",
+ "build:browser": "echo skipped",
+ "build:test": "echo skipped",
+ "build:samples": "echo skipped.",
+ "check-format": "echo skipped",
+ "execute:samples": "echo skipped",
+ "format": "echo skipped",
+ "test": "npm run integration-test",
+ "test:node": "echo skipped",
+ "test:browser": "echo skipped",
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
+ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
+ "unit-test:browser": "echo skipped",
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
+ "integration-test:browser": "echo skipped",
+ "docs": "echo skipped"
},
"sideEffects": false,
- "autoPublish": true
+ "//metadata": {
+ "constantPaths": [
+ { "path": "src/IotCentralClient.ts", "prefix": "packageDetails" }
+ ]
+ },
+ "autoPublish": true,
+ "//sampleConfiguration": {
+ "productName": "",
+ "productSlugs": ["azure"],
+ "disableDocsMs": true,
+ "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview"
+ }
}
diff --git a/sdk/iotcentral/arm-iotcentral/recordings/node/my_test/recording_sample_test.js b/sdk/iotcentral/arm-iotcentral/recordings/node/my_test/recording_sample_test.js
new file mode 100644
index 000000000000..0f6ecb857acf
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/recordings/node/my_test/recording_sample_test.js
@@ -0,0 +1,5 @@
+let nock = require('nock');
+
+module.exports.hash = "7a6be38bb8cb644d64b4094802301751";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
diff --git a/sdk/iotcentral/arm-iotcentral/review/arm-iotcentral.api.md b/sdk/iotcentral/arm-iotcentral/review/arm-iotcentral.api.md
new file mode 100644
index 000000000000..0f392f6299b8
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/review/arm-iotcentral.api.md
@@ -0,0 +1,323 @@
+## API Report File for "@azure/arm-iotcentral"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+import * as coreAuth from '@azure/core-auth';
+import * as coreClient from '@azure/core-client';
+import { PagedAsyncIterableIterator } from '@azure/core-paging';
+import { PollerLike } from '@azure/core-lro';
+import { PollOperationState } from '@azure/core-lro';
+
+// @public
+export type App = Resource & {
+ sku: AppSkuInfo;
+ identity?: SystemAssignedServiceIdentity;
+ readonly applicationId?: string;
+ displayName?: string;
+ subdomain?: string;
+ template?: string;
+ readonly state?: AppState;
+};
+
+// @public
+export interface AppAvailabilityInfo {
+ readonly message?: string;
+ readonly nameAvailable?: boolean;
+ readonly reason?: string;
+}
+
+// @public
+export interface AppListResult {
+ nextLink?: string;
+ value?: App[];
+}
+
+// @public
+export interface AppPatch {
+ readonly applicationId?: string;
+ displayName?: string;
+ identity?: SystemAssignedServiceIdentity;
+ sku?: AppSkuInfo;
+ readonly state?: AppState;
+ subdomain?: string;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ template?: string;
+}
+
+// @public
+export interface Apps {
+ beginCreateOrUpdate(resourceGroupName: string, resourceName: string, app: App, options?: AppsCreateOrUpdateOptionalParams): Promise, AppsCreateOrUpdateResponse>>;
+ beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, app: App, options?: AppsCreateOrUpdateOptionalParams): Promise;
+ beginDelete(resourceGroupName: string, resourceName: string, options?: AppsDeleteOptionalParams): Promise, void>>;
+ beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: AppsDeleteOptionalParams): Promise;
+ beginUpdate(resourceGroupName: string, resourceName: string, appPatch: AppPatch, options?: AppsUpdateOptionalParams): Promise, AppsUpdateResponse>>;
+ beginUpdateAndWait(resourceGroupName: string, resourceName: string, appPatch: AppPatch, options?: AppsUpdateOptionalParams): Promise;
+ checkNameAvailability(operationInputs: OperationInputs, options?: AppsCheckNameAvailabilityOptionalParams): Promise;
+ checkSubdomainAvailability(operationInputs: OperationInputs, options?: AppsCheckSubdomainAvailabilityOptionalParams): Promise;
+ get(resourceGroupName: string, resourceName: string, options?: AppsGetOptionalParams): Promise;
+ listByResourceGroup(resourceGroupName: string, options?: AppsListByResourceGroupOptionalParams): PagedAsyncIterableIterator;
+ listBySubscription(options?: AppsListBySubscriptionOptionalParams): PagedAsyncIterableIterator;
+ listTemplates(options?: AppsListTemplatesOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface AppsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsCheckNameAvailabilityResponse = AppAvailabilityInfo;
+
+// @public
+export interface AppsCheckSubdomainAvailabilityOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo;
+
+// @public
+export interface AppsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+ resumeFrom?: string;
+ updateIntervalInMs?: number;
+}
+
+// @public
+export type AppsCreateOrUpdateResponse = App;
+
+// @public
+export interface AppsDeleteOptionalParams extends coreClient.OperationOptions {
+ resumeFrom?: string;
+ updateIntervalInMs?: number;
+}
+
+// @public
+export interface AppsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsGetResponse = App;
+
+// @public
+export type AppSku = string;
+
+// @public
+export interface AppSkuInfo {
+ name: AppSku;
+}
+
+// @public
+export interface AppsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsListByResourceGroupNextResponse = AppListResult;
+
+// @public
+export interface AppsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsListByResourceGroupResponse = AppListResult;
+
+// @public
+export interface AppsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsListBySubscriptionNextResponse = AppListResult;
+
+// @public
+export interface AppsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsListBySubscriptionResponse = AppListResult;
+
+// @public
+export interface AppsListTemplatesNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsListTemplatesNextResponse = AppTemplatesResult;
+
+// @public
+export interface AppsListTemplatesOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type AppsListTemplatesResponse = AppTemplatesResult;
+
+// @public
+export type AppState = string;
+
+// @public
+export interface AppsUpdateOptionalParams extends coreClient.OperationOptions {
+ resumeFrom?: string;
+ updateIntervalInMs?: number;
+}
+
+// @public
+export type AppsUpdateResponse = App;
+
+// @public
+export interface AppTemplate {
+ readonly description?: string;
+ readonly industry?: string;
+ readonly locations?: AppTemplateLocations[];
+ readonly manifestId?: string;
+ readonly manifestVersion?: string;
+ readonly name?: string;
+ readonly order?: number;
+ readonly title?: string;
+}
+
+// @public
+export interface AppTemplateLocations {
+ readonly displayName?: string;
+ readonly id?: string;
+}
+
+// @public
+export interface AppTemplatesResult {
+ nextLink?: string;
+ readonly value?: AppTemplate[];
+}
+
+// @public
+export interface CloudError {
+ readonly code?: string;
+ details?: CloudErrorBody[];
+ readonly message?: string;
+ readonly target?: string;
+}
+
+// @public
+export interface CloudErrorBody {
+ readonly code?: string;
+ details?: CloudErrorBody[];
+ readonly message?: string;
+ readonly target?: string;
+}
+
+// @public (undocumented)
+export class IotCentralClient extends coreClient.ServiceClient {
+ // (undocumented)
+ $host: string;
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: IotCentralClientOptionalParams);
+ // (undocumented)
+ apiVersion: string;
+ // (undocumented)
+ apps: Apps;
+ // (undocumented)
+ operations: Operations;
+ // (undocumented)
+ subscriptionId: string;
+}
+
+// @public
+export interface IotCentralClientOptionalParams extends coreClient.ServiceClientOptions {
+ $host?: string;
+ apiVersion?: string;
+ endpoint?: string;
+}
+
+// @public
+export enum KnownAppSku {
+ // (undocumented)
+ ST0 = "ST0",
+ // (undocumented)
+ ST1 = "ST1",
+ // (undocumented)
+ ST2 = "ST2"
+}
+
+// @public
+export enum KnownAppState {
+ // (undocumented)
+ Created = "created",
+ // (undocumented)
+ Suspended = "suspended"
+}
+
+// @public
+export enum KnownSystemAssignedServiceIdentityType {
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ SystemAssigned = "SystemAssigned"
+}
+
+// @public
+export interface Operation {
+ display?: OperationDisplay;
+ readonly name?: string;
+ readonly origin?: string;
+ readonly properties?: Record;
+}
+
+// @public
+export interface OperationDisplay {
+ readonly description?: string;
+ readonly operation?: string;
+ readonly provider?: string;
+ readonly resource?: string;
+}
+
+// @public
+export interface OperationInputs {
+ name: string;
+ type?: string;
+}
+
+// @public
+export interface OperationListResult {
+ nextLink?: string;
+ readonly value?: Operation[];
+}
+
+// @public
+export interface Operations {
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListNextResponse = OperationListResult;
+
+// @public
+export interface OperationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListResponse = OperationListResult;
+
+// @public
+export interface Resource {
+ readonly id?: string;
+ location: string;
+ readonly name?: string;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ readonly type?: string;
+}
+
+// @public
+export interface SystemAssignedServiceIdentity {
+ readonly principalId?: string;
+ readonly tenantId?: string;
+ type: SystemAssignedServiceIdentityType;
+}
+
+// @public
+export type SystemAssignedServiceIdentityType = string;
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/sdk/iotcentral/arm-iotcentral/rollup.config.js b/sdk/iotcentral/arm-iotcentral/rollup.config.js
index 3793eb23d9a7..9be1955eb7f1 100644
--- a/sdk/iotcentral/arm-iotcentral/rollup.config.js
+++ b/sdk/iotcentral/arm-iotcentral/rollup.config.js
@@ -1,37 +1,188 @@
-import rollup from "rollup";
-import nodeResolve from "rollup-plugin-node-resolve";
-import sourcemaps from "rollup-plugin-sourcemaps";
-
-/**
- * @type {rollup.RollupFileOptions}
- */
-const config = {
- input: "./esm/iotCentralClient.js",
- external: [
- "@azure/ms-rest-js",
- "@azure/ms-rest-azure-js"
- ],
- output: {
- file: "./dist/arm-iotcentral.js",
- format: "umd",
- name: "Azure.ArmIotcentral",
- sourcemap: true,
- globals: {
- "@azure/ms-rest-js": "msRest",
- "@azure/ms-rest-azure-js": "msRestAzure"
- },
- banner: `/*
+/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
- */`
- },
- plugins: [
- nodeResolve({ mainFields: ['module', 'main'] }),
- sourcemaps()
- ]
+ */
+
+import nodeResolve from "@rollup/plugin-node-resolve";
+import cjs from "@rollup/plugin-commonjs";
+import sourcemaps from "rollup-plugin-sourcemaps";
+import multiEntry from "@rollup/plugin-multi-entry";
+import json from "@rollup/plugin-json";
+
+import nodeBuiltins from "builtin-modules";
+
+/**
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
+ *
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
+ * __exportStar downleveled helper function to declare its exports which confuses
+ * rollup's automatic discovery mechanism.
+ *
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
+ */
+export function openTelemetryCommonJs() {
+ const namedExports = {};
+
+ for (const key of [
+ "@opentelemetry/api",
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
+ ]) {
+ namedExports[key] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "SpanStatusCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
+
+ for (const version of releasedOpenTelemetryVersions) {
+ namedExports[
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
+ ] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "StatusCode",
+ "CanonicalCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ return namedExports;
+}
+
+// #region Warning Handler
+
+/**
+ * A function that can determine whether a rollupwarning should be ignored. If
+ * the function returns `true`, then the warning will not be displayed.
+ */
+
+function ignoreNiseSinonEvalWarnings(warning) {
+ return (
+ warning.code === "EVAL" &&
+ warning.id &&
+ (warning.id.includes("node_modules/nise") ||
+ warning.id.includes("node_modules/sinon")) === true
+ );
+}
+
+function ignoreChaiCircularDependencyWarnings(warning) {
+ return (
+ warning.code === "CIRCULAR_DEPENDENCY" &&
+ warning.importer && warning.importer.includes("node_modules/chai") === true
+ );
+}
+
+const warningInhibitors = [
+ ignoreChaiCircularDependencyWarnings,
+ ignoreNiseSinonEvalWarnings
+];
+
+/**
+ * Construct a warning handler for the shared rollup configuration
+ * that ignores certain warnings that are not relevant to testing.
+ */
+function makeOnWarnForTesting() {
+ return (warning, warn) => {
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
+ warn(warning);
+ }
+ };
+}
+
+// #endregion
+
+function makeBrowserTestConfig() {
+ const config = {
+ input: {
+ include: ["dist-esm/test/**/*.spec.js"],
+ exclude: ["dist-esm/test/**/node/**"]
+ },
+ output: {
+ file: `dist-test/index.browser.js`,
+ format: "umd",
+ sourcemap: true
+ },
+ preserveSymlinks: false,
+ plugins: [
+ multiEntry({ exports: false }),
+ nodeResolve({
+ mainFields: ["module", "browser"]
+ }),
+ cjs({
+ namedExports: {
+ // Chai's strange internal architecture makes it impossible to statically
+ // analyze its exports.
+ chai: [
+ "version",
+ "use",
+ "util",
+ "config",
+ "expect",
+ "should",
+ "assert"
+ ],
+ ...openTelemetryCommonJs()
+ }
+ }),
+ json(),
+ sourcemaps()
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
+ ],
+ onwarn: makeOnWarnForTesting(),
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
+ // rollup started respecting the "sideEffects" field in package.json. Since
+ // our package.json sets "sideEffects=false", this also applies to test
+ // code, which causes all tests to be removed by tree-shaking.
+ treeshake: false
+ };
+
+ return config;
+}
+
+const defaultConfigurationOptions = {
+ disableBrowserBundle: false
};
-export default config;
+export function makeConfig(pkg, options) {
+ options = {
+ ...defaultConfigurationOptions,
+ ...(options || {})
+ };
+
+ const baseConfig = {
+ // Use the package's module field if it has one
+ input: pkg["module"] || "dist-esm/src/index.js",
+ external: [
+ ...nodeBuiltins,
+ ...Object.keys(pkg.dependencies),
+ ...Object.keys(pkg.devDependencies)
+ ],
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
+ preserveSymlinks: false,
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
+ };
+
+ const config = [baseConfig];
+
+ if (!options.disableBrowserBundle) {
+ config.push(makeBrowserTestConfig());
+ }
+
+ return config;
+}
+
+export default makeConfig(require("./package.json"));
diff --git a/sdk/iotcentral/arm-iotcentral/sample.env b/sdk/iotcentral/arm-iotcentral/sample.env
new file mode 100644
index 000000000000..672847a3fea0
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/sample.env
@@ -0,0 +1,4 @@
+# App registration secret for AAD authentication
+AZURE_CLIENT_SECRET=
+AZURE_CLIENT_ID=
+AZURE_TENANT_ID=
\ No newline at end of file
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsCheckNameAvailability.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsCheckNameAvailability.ts
new file mode 100644
index 000000000000..4089819d7da3
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsCheckNameAvailability.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Check if an IoT Central application name is available.
+ *
+ * @summary Check if an IoT Central application name is available.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json
+ */
+import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsCheckNameAvailability() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const operationInputs: OperationInputs = {
+ name: "myiotcentralapp",
+ type: "IoTApps"
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.checkNameAvailability(operationInputs);
+ console.log(result);
+}
+
+appsCheckNameAvailability().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsCreateOrUpdate.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsCreateOrUpdate.ts
new file mode 100644
index 000000000000..0ac4d019a368
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsCreateOrUpdate.ts
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
+ *
+ * @summary Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json
+ */
+import { App, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsCreateOrUpdate() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const app: App = {
+ displayName: "My IoT Central App",
+ identity: { type: "SystemAssigned" },
+ location: "westus",
+ sku: { name: "ST2" },
+ subdomain: "my-iot-central-app",
+ template: "iotc-pnp-preview@1.0.0"
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginCreateOrUpdateAndWait(
+ resourceGroupName,
+ resourceName,
+ app
+ );
+ console.log(result);
+}
+
+appsCreateOrUpdate().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsDelete.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsDelete.ts
new file mode 100644
index 000000000000..1cc21cce84ec
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsDelete.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Delete an IoT Central application.
+ *
+ * @summary Delete an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsDelete() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginDeleteAndWait(
+ resourceGroupName,
+ resourceName
+ );
+ console.log(result);
+}
+
+appsDelete().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsGet.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsGet.ts
new file mode 100644
index 000000000000..8dc4999686f9
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsGet.ts
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Get the metadata of an IoT Central application.
+ *
+ * @summary Get the metadata of an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsGet() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.get(resourceGroupName, resourceName);
+ console.log(result);
+}
+
+appsGet().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsListByResourceGroup.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsListByResourceGroup.ts
new file mode 100644
index 000000000000..1fb9cfc9d5ff
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsListByResourceGroup.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all the IoT Central Applications in a resource group.
+ *
+ * @summary Get all the IoT Central Applications in a resource group.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsListByResourceGroup() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listByResourceGroup(resourceGroupName)) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListByResourceGroup().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsListBySubscription.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsListBySubscription.ts
new file mode 100644
index 000000000000..2cc627339b55
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsListBySubscription.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all IoT Central Applications in a subscription.
+ *
+ * @summary Get all IoT Central Applications in a subscription.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsListBySubscription() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listBySubscription()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListBySubscription().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsListTemplates.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsListTemplates.ts
new file mode 100644
index 000000000000..33ba58ea6dc0
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsListTemplates.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all available application templates.
+ *
+ * @summary Get all available application templates.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsListTemplates() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listTemplates()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListTemplates().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsSubdomainAvailability.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsSubdomainAvailability.ts
new file mode 100644
index 000000000000..299a39086ab7
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsSubdomainAvailability.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Check if an IoT Central application subdomain is available.
+ *
+ * @summary Check if an IoT Central application subdomain is available.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json
+ */
+import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsSubdomainAvailability() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const operationInputs: OperationInputs = {
+ name: "myiotcentralapp",
+ type: "IoTApps"
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.checkSubdomainAvailability(operationInputs);
+ console.log(result);
+}
+
+appsSubdomainAvailability().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/appsUpdate.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/appsUpdate.ts
new file mode 100644
index 000000000000..fe00fc1270cd
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/appsUpdate.ts
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Update the metadata of an IoT Central application.
+ *
+ * @summary Update the metadata of an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json
+ */
+import { AppPatch, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsUpdate() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const appPatch: AppPatch = {
+ displayName: "My IoT Central App 2",
+ identity: { type: "SystemAssigned" }
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginUpdateAndWait(
+ resourceGroupName,
+ resourceName,
+ appPatch
+ );
+ console.log(result);
+}
+
+appsUpdate().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples-dev/operationsList.ts b/sdk/iotcentral/arm-iotcentral/samples-dev/operationsList.ts
new file mode 100644
index 000000000000..2b3d0bcef517
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples-dev/operationsList.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Lists all of the available IoT Central Resource Provider operations.
+ *
+ * @summary Lists all of the available IoT Central Resource Provider operations.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function operationsList() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.operations.list()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+operationsList().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/README.md b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/README.md
new file mode 100644
index 000000000000..d2799afb1ee6
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/README.md
@@ -0,0 +1,68 @@
+# client library samples for JavaScript
+
+These sample programs show how to use the JavaScript client libraries for in some common scenarios.
+
+| **File Name** | **Description** |
+| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [appsCheckNameAvailability.js][appschecknameavailability] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json |
+| [appsCreateOrUpdate.js][appscreateorupdate] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json |
+| [appsDelete.js][appsdelete] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json |
+| [appsGet.js][appsget] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json |
+| [appsListByResourceGroup.js][appslistbyresourcegroup] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json |
+| [appsListBySubscription.js][appslistbysubscription] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json |
+| [appsListTemplates.js][appslisttemplates] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json |
+| [appsSubdomainAvailability.js][appssubdomainavailability] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json |
+| [appsUpdate.js][appsupdate] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json |
+| [operationsList.js][operationslist] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json |
+
+## Prerequisites
+
+The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
+
+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 appsCheckNameAvailability.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 cross-env node appsCheckNameAvailability.js
+```
+
+## Next Steps
+
+Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
+
+[appschecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCheckNameAvailability.js
+[appscreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCreateOrUpdate.js
+[appsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsDelete.js
+[appsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsGet.js
+[appslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListByResourceGroup.js
+[appslistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListBySubscription.js
+[appslisttemplates]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListTemplates.js
+[appssubdomainavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsSubdomainAvailability.js
+[appsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsUpdate.js
+[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/operationsList.js
+[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview
+[freesub]: https://azure.microsoft.com/free/
+[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral/README.md
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCheckNameAvailability.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCheckNameAvailability.js
new file mode 100644
index 000000000000..38985a003245
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCheckNameAvailability.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Check if an IoT Central application name is available.
+ *
+ * @summary Check if an IoT Central application name is available.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsCheckNameAvailability() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const operationInputs = {
+ name: "myiotcentralapp",
+ type: "IoTApps",
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.checkNameAvailability(operationInputs);
+ console.log(result);
+}
+
+appsCheckNameAvailability().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCreateOrUpdate.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCreateOrUpdate.js
new file mode 100644
index 000000000000..a17f33e6a278
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCreateOrUpdate.js
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
+ *
+ * @summary Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsCreateOrUpdate() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const app = {
+ displayName: "My IoT Central App",
+ identity: { type: "SystemAssigned" },
+ location: "westus",
+ sku: { name: "ST2" },
+ subdomain: "my-iot-central-app",
+ template: "iotc-pnp-preview@1.0.0",
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginCreateOrUpdateAndWait(resourceGroupName, resourceName, app);
+ console.log(result);
+}
+
+appsCreateOrUpdate().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsDelete.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsDelete.js
new file mode 100644
index 000000000000..4dfd2b699c0b
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsDelete.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Delete an IoT Central application.
+ *
+ * @summary Delete an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsDelete() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginDeleteAndWait(resourceGroupName, resourceName);
+ console.log(result);
+}
+
+appsDelete().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsGet.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsGet.js
new file mode 100644
index 000000000000..efc30638a7a0
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsGet.js
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Get the metadata of an IoT Central application.
+ *
+ * @summary Get the metadata of an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsGet() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.get(resourceGroupName, resourceName);
+ console.log(result);
+}
+
+appsGet().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListByResourceGroup.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListByResourceGroup.js
new file mode 100644
index 000000000000..4a437831b042
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListByResourceGroup.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all the IoT Central Applications in a resource group.
+ *
+ * @summary Get all the IoT Central Applications in a resource group.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsListByResourceGroup() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listByResourceGroup(resourceGroupName)) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListByResourceGroup().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListBySubscription.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListBySubscription.js
new file mode 100644
index 000000000000..ce26eca1ea76
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListBySubscription.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all IoT Central Applications in a subscription.
+ *
+ * @summary Get all IoT Central Applications in a subscription.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsListBySubscription() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listBySubscription()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListBySubscription().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListTemplates.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListTemplates.js
new file mode 100644
index 000000000000..b45c7616244f
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListTemplates.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all available application templates.
+ *
+ * @summary Get all available application templates.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsListTemplates() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listTemplates()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListTemplates().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsSubdomainAvailability.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsSubdomainAvailability.js
new file mode 100644
index 000000000000..4129b14fd46d
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsSubdomainAvailability.js
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Check if an IoT Central application subdomain is available.
+ *
+ * @summary Check if an IoT Central application subdomain is available.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsSubdomainAvailability() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const operationInputs = {
+ name: "myiotcentralapp",
+ type: "IoTApps",
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.checkSubdomainAvailability(operationInputs);
+ console.log(result);
+}
+
+appsSubdomainAvailability().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsUpdate.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsUpdate.js
new file mode 100644
index 000000000000..640174ebf2ef
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsUpdate.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Update the metadata of an IoT Central application.
+ *
+ * @summary Update the metadata of an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function appsUpdate() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const appPatch = {
+ displayName: "My IoT Central App 2",
+ identity: { type: "SystemAssigned" },
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginUpdateAndWait(resourceGroupName, resourceName, appPatch);
+ console.log(result);
+}
+
+appsUpdate().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/operationsList.js b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/operationsList.js
new file mode 100644
index 000000000000..9a7c963ad780
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/operationsList.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Lists all of the available IoT Central Resource Provider operations.
+ *
+ * @summary Lists all of the available IoT Central Resource Provider operations.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json
+ */
+const { IotCentralClient } = require("@azure/arm-iotcentral");
+const { DefaultAzureCredential } = require("@azure/identity");
+
+async function operationsList() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.operations.list()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+operationsList().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/package.json b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/package.json
new file mode 100644
index 000000000000..9caa29585218
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "azure-arm-iotcentral-samples-js",
+ "private": true,
+ "version": "1.0.0",
+ "description": " client library samples for JavaScript",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Azure/azure-sdk-for-js.git",
+ "directory": "sdk/iotcentral/arm-iotcentral"
+ },
+ "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/iotcentral/arm-iotcentral",
+ "dependencies": {
+ "@azure/arm-iotcentral": "latest",
+ "dotenv": "latest",
+ "@azure/identity": "^2.0.1"
+ }
+}
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/sample.env b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/sample.env
new file mode 100644
index 000000000000..672847a3fea0
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/sample.env
@@ -0,0 +1,4 @@
+# App registration secret for AAD authentication
+AZURE_CLIENT_SECRET=
+AZURE_CLIENT_ID=
+AZURE_TENANT_ID=
\ No newline at end of file
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/README.md b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/README.md
new file mode 100644
index 000000000000..2c68f6dcf7ce
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/README.md
@@ -0,0 +1,81 @@
+# client library samples for TypeScript
+
+These sample programs show how to use the TypeScript client libraries for in some common scenarios.
+
+| **File Name** | **Description** |
+| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [appsCheckNameAvailability.ts][appschecknameavailability] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json |
+| [appsCreateOrUpdate.ts][appscreateorupdate] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json |
+| [appsDelete.ts][appsdelete] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json |
+| [appsGet.ts][appsget] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json |
+| [appsListByResourceGroup.ts][appslistbyresourcegroup] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json |
+| [appsListBySubscription.ts][appslistbysubscription] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json |
+| [appsListTemplates.ts][appslisttemplates] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json |
+| [appsSubdomainAvailability.ts][appssubdomainavailability] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json |
+| [appsUpdate.ts][appsupdate] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json |
+| [operationsList.ts][operationslist] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json |
+
+## Prerequisites
+
+The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
+
+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/appsCheckNameAvailability.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 cross-env node dist/appsCheckNameAvailability.js
+```
+
+## Next Steps
+
+Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
+
+[appschecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCheckNameAvailability.ts
+[appscreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCreateOrUpdate.ts
+[appsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsDelete.ts
+[appsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsGet.ts
+[appslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListByResourceGroup.ts
+[appslistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListBySubscription.ts
+[appslisttemplates]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListTemplates.ts
+[appssubdomainavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsSubdomainAvailability.ts
+[appsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsUpdate.ts
+[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/operationsList.ts
+[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview
+[freesub]: https://azure.microsoft.com/free/
+[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral/README.md
+[typescript]: https://www.typescriptlang.org/docs/home.html
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/package.json b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/package.json
new file mode 100644
index 000000000000..1791ef3d471a
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "azure-arm-iotcentral-samples-ts",
+ "private": true,
+ "version": "1.0.0",
+ "description": " client library samples for TypeScript",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "scripts": {
+ "build": "tsc",
+ "prebuild": "rimraf dist/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Azure/azure-sdk-for-js.git",
+ "directory": "sdk/iotcentral/arm-iotcentral"
+ },
+ "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/iotcentral/arm-iotcentral",
+ "dependencies": {
+ "@azure/arm-iotcentral": "latest",
+ "dotenv": "latest",
+ "@azure/identity": "^2.0.1"
+ },
+ "devDependencies": {
+ "@types/node": "^12.0.0",
+ "typescript": "~4.4.0",
+ "rimraf": "latest"
+ }
+}
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/sample.env b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/sample.env
new file mode 100644
index 000000000000..672847a3fea0
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/sample.env
@@ -0,0 +1,4 @@
+# App registration secret for AAD authentication
+AZURE_CLIENT_SECRET=
+AZURE_CLIENT_ID=
+AZURE_TENANT_ID=
\ No newline at end of file
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCheckNameAvailability.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCheckNameAvailability.ts
new file mode 100644
index 000000000000..4089819d7da3
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCheckNameAvailability.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Check if an IoT Central application name is available.
+ *
+ * @summary Check if an IoT Central application name is available.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json
+ */
+import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsCheckNameAvailability() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const operationInputs: OperationInputs = {
+ name: "myiotcentralapp",
+ type: "IoTApps"
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.checkNameAvailability(operationInputs);
+ console.log(result);
+}
+
+appsCheckNameAvailability().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCreateOrUpdate.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCreateOrUpdate.ts
new file mode 100644
index 000000000000..0ac4d019a368
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCreateOrUpdate.ts
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
+ *
+ * @summary Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json
+ */
+import { App, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsCreateOrUpdate() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const app: App = {
+ displayName: "My IoT Central App",
+ identity: { type: "SystemAssigned" },
+ location: "westus",
+ sku: { name: "ST2" },
+ subdomain: "my-iot-central-app",
+ template: "iotc-pnp-preview@1.0.0"
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginCreateOrUpdateAndWait(
+ resourceGroupName,
+ resourceName,
+ app
+ );
+ console.log(result);
+}
+
+appsCreateOrUpdate().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsDelete.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsDelete.ts
new file mode 100644
index 000000000000..1cc21cce84ec
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsDelete.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Delete an IoT Central application.
+ *
+ * @summary Delete an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsDelete() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginDeleteAndWait(
+ resourceGroupName,
+ resourceName
+ );
+ console.log(result);
+}
+
+appsDelete().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsGet.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsGet.ts
new file mode 100644
index 000000000000..8dc4999686f9
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsGet.ts
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+/**
+ * This sample demonstrates how to Get the metadata of an IoT Central application.
+ *
+ * @summary Get the metadata of an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsGet() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.get(resourceGroupName, resourceName);
+ console.log(result);
+}
+
+appsGet().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListByResourceGroup.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListByResourceGroup.ts
new file mode 100644
index 000000000000..1fb9cfc9d5ff
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListByResourceGroup.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all the IoT Central Applications in a resource group.
+ *
+ * @summary Get all the IoT Central Applications in a resource group.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsListByResourceGroup() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listByResourceGroup(resourceGroupName)) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListByResourceGroup().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListBySubscription.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListBySubscription.ts
new file mode 100644
index 000000000000..2cc627339b55
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListBySubscription.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all IoT Central Applications in a subscription.
+ *
+ * @summary Get all IoT Central Applications in a subscription.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsListBySubscription() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listBySubscription()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListBySubscription().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListTemplates.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListTemplates.ts
new file mode 100644
index 000000000000..33ba58ea6dc0
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListTemplates.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Get all available application templates.
+ *
+ * @summary Get all available application templates.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsListTemplates() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.apps.listTemplates()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+appsListTemplates().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsSubdomainAvailability.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsSubdomainAvailability.ts
new file mode 100644
index 000000000000..299a39086ab7
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsSubdomainAvailability.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Check if an IoT Central application subdomain is available.
+ *
+ * @summary Check if an IoT Central application subdomain is available.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json
+ */
+import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsSubdomainAvailability() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const operationInputs: OperationInputs = {
+ name: "myiotcentralapp",
+ type: "IoTApps"
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.checkSubdomainAvailability(operationInputs);
+ console.log(result);
+}
+
+appsSubdomainAvailability().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsUpdate.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsUpdate.ts
new file mode 100644
index 000000000000..fe00fc1270cd
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsUpdate.ts
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Update the metadata of an IoT Central application.
+ *
+ * @summary Update the metadata of an IoT Central application.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json
+ */
+import { AppPatch, IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function appsUpdate() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const resourceGroupName = "resRg";
+ const resourceName = "myIoTCentralApp";
+ const appPatch: AppPatch = {
+ displayName: "My IoT Central App 2",
+ identity: { type: "SystemAssigned" }
+ };
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const result = await client.apps.beginUpdateAndWait(
+ resourceGroupName,
+ resourceName,
+ appPatch
+ );
+ console.log(result);
+}
+
+appsUpdate().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/operationsList.ts b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/operationsList.ts
new file mode 100644
index 000000000000..2b3d0bcef517
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/operationsList.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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.
+/**
+ * This sample demonstrates how to Lists all of the available IoT Central Resource Provider operations.
+ *
+ * @summary Lists all of the available IoT Central Resource Provider operations.
+ * x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json
+ */
+import { IotCentralClient } from "@azure/arm-iotcentral";
+import { DefaultAzureCredential } from "@azure/identity";
+
+async function operationsList() {
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
+ const credential = new DefaultAzureCredential();
+ const client = new IotCentralClient(credential, subscriptionId);
+ const resArray = new Array();
+ for await (let item of client.operations.list()) {
+ resArray.push(item);
+ }
+ console.log(resArray);
+}
+
+operationsList().catch(console.error);
diff --git a/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/tsconfig.json b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/tsconfig.json
new file mode 100644
index 000000000000..416c2dd82e00
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "target": "ES2018",
+ "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/iotcentral/arm-iotcentral/src/models/appsMappers.ts b/sdk/iotcentral/arm-iotcentral/src/index.ts
similarity index 50%
rename from sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts
rename to sdk/iotcentral/arm-iotcentral/src/index.ts
index f0a1b9f18c7e..4ad459473efe 100644
--- a/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/index.ts
@@ -6,17 +6,7 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export {
- App,
- AppAvailabilityInfo,
- AppListResult,
- AppPatch,
- AppSkuInfo,
- AppTemplate,
- AppTemplateLocations,
- AppTemplatesResult,
- BaseResource,
- CloudError,
- OperationInputs,
- Resource
-} from "../models/mappers";
+///
+export * from "./models";
+export { IotCentralClient } from "./iotCentralClient";
+export * from "./operationsInterfaces";
diff --git a/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts b/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts
index 71f83aaafdb6..6c8e073f7146 100644
--- a/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/iotCentralClient.ts
@@ -3,41 +3,75 @@
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "./models";
-import * as Mappers from "./models/mappers";
-import * as operations from "./operations";
-import { IotCentralClientContext } from "./iotCentralClientContext";
+import * as coreClient from "@azure/core-client";
+import * as coreAuth from "@azure/core-auth";
+import { AppsImpl, OperationsImpl } from "./operations";
+import { Apps, Operations } from "./operationsInterfaces";
+import { IotCentralClientOptionalParams } from "./models";
-
-class IotCentralClient extends IotCentralClientContext {
- // Operation groups
- apps: operations.Apps;
- operations: operations.Operations;
+export class IotCentralClient extends coreClient.ServiceClient {
+ $host: string;
+ apiVersion: string;
+ subscriptionId: string;
/**
* Initializes a new instance of the IotCentralClient class.
- * @param credentials Credentials needed for the client to connect to Azure.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId The subscription identifier.
- * @param [options] The parameter options
+ * @param options The parameter options
*/
- constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IotCentralClientOptions) {
- super(credentials, subscriptionId, options);
- this.apps = new operations.Apps(this);
- this.operations = new operations.Operations(this);
- }
-}
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionId: string,
+ options?: IotCentralClientOptionalParams
+ ) {
+ 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: IotCentralClientOptionalParams = {
+ requestContentType: "application/json; charset=utf-8",
+ credential: credentials
+ };
-// Operation Specifications
+ const packageDetails = `azsdk-js-arm-iotcentral/6.0.0`;
+ const userAgentPrefix =
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
+ : `${packageDetails}`;
-export {
- IotCentralClient,
- IotCentralClientContext,
- Models as IotCentralModels,
- Mappers as IotCentralMappers
-};
-export * from "./operations";
+ if (!options.credentialScopes) {
+ options.credentialScopes = ["https://management.azure.com/.default"];
+ }
+ const optionsWithDefaults = {
+ ...defaults,
+ ...options,
+ userAgentOptions: {
+ userAgentPrefix
+ },
+ baseUri: options.endpoint || "https://management.azure.com"
+ };
+ super(optionsWithDefaults);
+ // Parameter assignments
+ this.subscriptionId = subscriptionId;
+
+ // Assigning values to Constant parameters
+ this.$host = options.$host || "https://management.azure.com";
+ this.apiVersion = options.apiVersion || "2021-06-01";
+ this.apps = new AppsImpl(this);
+ this.operations = new OperationsImpl(this);
+ }
+
+ apps: Apps;
+ operations: Operations;
+}
diff --git a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts
deleted file mode 100644
index f1963b771d2b..000000000000
--- a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation.
- * Licensed under the 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 Models from "./models";
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-
-const packageName = "@azure/arm-iotcentral";
-const packageVersion = "4.1.0";
-
-export class IotCentralClientContext extends msRestAzure.AzureServiceClient {
- credentials: msRest.ServiceClientCredentials;
- subscriptionId: string;
- apiVersion?: string;
-
- /**
- * Initializes a new instance of the IotCentralClient class.
- * @param credentials Credentials needed for the client to connect to Azure.
- * @param subscriptionId The subscription identifier.
- * @param [options] The parameter options
- */
- constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.IotCentralClientOptions) {
- if (credentials == undefined) {
- throw new Error('\'credentials\' cannot be null.');
- }
- if (subscriptionId == undefined) {
- throw new Error('\'subscriptionId\' cannot be null.');
- }
-
- if (!options) {
- options = {};
- }
- if (!options.userAgent) {
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
- }
-
- super(credentials, options);
-
- this.apiVersion = '2018-09-01';
- this.acceptLanguage = 'en-US';
- this.longRunningOperationRetryTimeout = 30;
- this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
- this.requestContentType = "application/json; charset=utf-8";
- this.credentials = credentials;
- this.subscriptionId = subscriptionId;
-
- if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
- this.acceptLanguage = options.acceptLanguage;
- }
- if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
- this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
- }
- }
-}
diff --git a/sdk/iotcentral/arm-iotcentral/src/lroImpl.ts b/sdk/iotcentral/arm-iotcentral/src/lroImpl.ts
new file mode 100644
index 000000000000..518d5f053b4e
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/src/lroImpl.ts
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { LongRunningOperation, LroResponse } from "@azure/core-lro";
+
+export class LroImpl implements LongRunningOperation {
+ constructor(
+ private sendOperationFn: (args: any, spec: any) => Promise>,
+ private args: Record,
+ private spec: {
+ readonly requestBody?: unknown;
+ readonly path?: string;
+ readonly httpMethod: string;
+ } & Record,
+ public requestPath: string = spec.path!,
+ public requestMethod: string = spec.httpMethod
+ ) {}
+ public async sendInitialRequest(): Promise> {
+ return this.sendOperationFn(this.args, this.spec);
+ }
+ public async sendPollRequest(path: string): Promise> {
+ const { requestBody, ...restSpec } = this.spec;
+ return this.sendOperationFn(this.args, {
+ ...restSpec,
+ path,
+ httpMethod: "GET"
+ });
+ }
+}
diff --git a/sdk/iotcentral/arm-iotcentral/src/models/index.ts b/sdk/iotcentral/arm-iotcentral/src/models/index.ts
index 444beeb733b4..5c68d5509be7 100644
--- a/sdk/iotcentral/arm-iotcentral/src/models/index.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/models/index.ts
@@ -6,634 +6,469 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export { BaseResource, CloudError };
-
-/**
- * Information about the SKU of the IoT Central application.
- */
+/** Information about the SKU of the IoT Central application. */
export interface AppSkuInfo {
+ /** The name of the SKU. */
+ name: AppSku;
+}
+
+/** Managed service identity (either system assigned, or none) */
+export interface SystemAssignedServiceIdentity {
/**
- * The name of the SKU. Possible values include: 'F1', 'S1', 'ST0', 'ST1', 'ST2'
+ * The service principal ID of the system assigned 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.
*/
- name: AppSku;
+ readonly principalId?: string;
+ /**
+ * The tenant ID of the system assigned 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;
+ /** Type of managed service identity (either system assigned, or none). */
+ type: SystemAssignedServiceIdentityType;
}
-/**
- * The common properties of an ARM resource.
- */
-export interface Resource extends BaseResource {
+/** The common properties of an ARM resource. */
+export interface Resource {
/**
* The ARM resource identifier.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* The ARM resource name.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* The resource type.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
- /**
- * The resource location.
- */
+ /** The resource location. */
location: string;
- /**
- * The resource tags.
- */
+ /** The resource tags. */
tags?: { [propertyName: string]: string };
}
-/**
- * The IoT Central application.
- */
-export interface App extends Resource {
- /**
- * The ID of the application.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly applicationId?: string;
- /**
- * The display name of the application.
- */
- displayName?: string;
- /**
- * The subdomain of the application.
- */
- subdomain?: string;
- /**
- * The ID of the application template, which is a blueprint that defines the characteristics and
- * behaviors of an application. Optional; if not specified, defaults to a blank blueprint and
- * allows the application to be defined from scratch.
- */
- template?: string;
- /**
- * A valid instance SKU.
- */
- sku: AppSkuInfo;
-}
-
-/**
- * The description of the IoT Central application.
- */
-export interface AppPatch {
+/** Error details. */
+export interface CloudError {
/**
- * Instance tags
- */
- tags?: { [propertyName: string]: string };
- /**
- * A valid instance SKU.
- */
- sku?: AppSkuInfo;
- /**
- * The ID of the application.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly applicationId?: string;
- /**
- * The display name of the application.
+ * The error code.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- displayName?: string;
+ readonly code?: string;
/**
- * The subdomain of the application.
+ * The error message.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- subdomain?: string;
+ readonly message?: string;
/**
- * The ID of the application template, which is a blueprint that defines the characteristics and
- * behaviors of an application. Optional; if not specified, defaults to a blank blueprint and
- * allows the application to be defined from scratch.
+ * The target of the particular error.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- template?: string;
+ readonly target?: string;
+ /** A list of additional details about the error. */
+ details?: CloudErrorBody[];
}
-/**
- * Details of error response.
- */
+/** Details of error response. */
export interface CloudErrorBody {
/**
* The error code.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly code?: string;
/**
* The error message.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message?: string;
/**
* The target of the particular error.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly target?: string;
- /**
- * A list of additional details about the error.
- */
+ /** A list of additional details about the error. */
details?: CloudErrorBody[];
}
-/**
- * The object that represents the operation.
- */
-export interface OperationDisplay {
- /**
- * Service provider: Microsoft IoT Central
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly provider?: string;
+/** The description of the IoT Central application. */
+export interface AppPatch {
+ /** Instance tags */
+ tags?: { [propertyName: string]: string };
+ /** A valid instance SKU. */
+ sku?: AppSkuInfo;
+ /** The managed identities for the IoT Central application. */
+ identity?: SystemAssignedServiceIdentity;
/**
- * Resource Type: IoT Central
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The ID of the application.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly resource?: string;
+ readonly applicationId?: string;
+ /** The display name of the application. */
+ displayName?: string;
+ /** The subdomain of the application. */
+ subdomain?: string;
+ /** The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. */
+ template?: string;
/**
- * Name of the operation
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The current state of the application.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly operation?: string;
- /**
- * Friendly description for the operation,
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly description?: string;
+ readonly state?: AppState;
}
-/**
- * IoT Central REST API operation
- */
-export interface Operation {
- /**
- * Operation name: {provider}/{resource}/{read | write | action | delete}
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly name?: string;
- /**
- * The object that represents the operation.
- */
- display?: OperationDisplay;
- /**
- * The intended executor of the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly origin?: string;
- /**
- * Additional descriptions for the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly properties?: any;
+/** A list of IoT Central Applications with a next link. */
+export interface AppListResult {
+ /** The link used to get the next page of IoT Central Applications. */
+ nextLink?: string;
+ /** A list of IoT Central Applications. */
+ value?: App[];
}
-/**
- * Input values.
- */
+/** Input values. */
export interface OperationInputs {
- /**
- * The name of the IoT Central application instance to check.
- */
+ /** The name of the IoT Central application instance to check. */
name: string;
- /**
- * The type of the IoT Central resource to query. Default value: 'IoTApps'.
- */
+ /** The type of the IoT Central resource to query. */
type?: string;
}
-/**
- * The properties indicating whether a given IoT Central application name or subdomain is
- * available.
- */
+/** The properties indicating whether a given IoT Central application name or subdomain is available. */
export interface AppAvailabilityInfo {
/**
* The value which indicates whether the provided name is available.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly nameAvailable?: boolean;
/**
* The reason for unavailability.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly reason?: string;
/**
* The detailed reason message.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message?: string;
}
-/**
- * IoT Central Application Template Locations.
- */
-export interface AppTemplateLocations {
- /**
- * The ID of the location.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly id?: string;
+/** A list of IoT Central Application Templates with a next link. */
+export interface AppTemplatesResult {
+ /** The link used to get the next page of IoT Central application templates. */
+ nextLink?: string;
/**
- * The display name of the location.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * A list of IoT Central Application Templates.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly displayName?: string;
+ readonly value?: AppTemplate[];
}
-/**
- * IoT Central Application Template.
- */
+/** IoT Central Application Template. */
export interface AppTemplate {
/**
* The ID of the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly manifestId?: string;
/**
* The version of the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly manifestVersion?: string;
/**
* The name of the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* The title of the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly title?: string;
/**
* The order of the template in the templates list.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly order?: number;
/**
* The description of the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly description?: string;
/**
* The industry of the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly industry?: string;
/**
* A list of locations that support the template.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly locations?: AppTemplateLocations[];
}
-/**
- * An interface representing IotCentralClientOptions.
- */
-export interface IotCentralClientOptions extends AzureServiceClientOptions {
- baseUri?: string;
+/** IoT Central Application Template Locations. */
+export interface AppTemplateLocations {
+ /**
+ * The ID of the location.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly id?: string;
+ /**
+ * The display name of the location.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly displayName?: string;
}
-/**
- * @interface
- * A list of IoT Central Applications with a next link.
- * @extends Array
- */
-export interface AppListResult extends Array {
+/** A list of IoT Central operations. It contains a list of operations and a URL link to get the next set of results. */
+export interface OperationListResult {
+ /** The link used to get the next page of IoT Central description objects. */
+ nextLink?: string;
/**
- * The link used to get the next page of IoT Central Applications.
+ * A list of operations supported by the Microsoft.IoTCentral resource provider.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- nextLink?: string;
+ readonly value?: Operation[];
}
-/**
- * @interface
- * A list of IoT Central Application Templates with a next link.
- * @extends Array
- */
-export interface AppTemplatesResult extends Array {
+/** IoT Central REST API operation */
+export interface Operation {
/**
- * The link used to get the next page of IoT Central application templates.
+ * Operation name: {provider}/{resource}/{read | write | action | delete}
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- nextLink?: string;
+ readonly name?: string;
+ /** The object that represents the operation. */
+ display?: OperationDisplay;
+ /**
+ * The intended executor of the operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly origin?: string;
+ /**
+ * Additional descriptions for the operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly properties?: Record;
}
-/**
- * @interface
- * A list of IoT Central operations. It contains a list of operations and a URL link to get the
- * next set of results.
- * @extends Array
- */
-export interface OperationListResult extends Array {
+/** The object that represents the operation. */
+export interface OperationDisplay {
+ /**
+ * Service provider: Microsoft IoT Central
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly provider?: string;
/**
- * The link used to get the next page of IoT Central description objects.
+ * Resource Type: IoT Central
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- nextLink?: string;
+ readonly resource?: string;
+ /**
+ * Name of the operation
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly operation?: string;
+ /**
+ * Friendly description for the operation,
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly description?: string;
}
-/**
- * Defines values for AppSku.
- * Possible values include: 'F1', 'S1', 'ST0', 'ST1', 'ST2'
- * @readonly
- * @enum {string}
- */
-export type AppSku = 'F1' | 'S1' | 'ST0' | 'ST1' | 'ST2';
-
-/**
- * Contains response data for the get operation.
- */
-export type AppsGetResponse = App & {
+/** The IoT Central application. */
+export type App = Resource & {
+ /** A valid instance SKU. */
+ sku: AppSkuInfo;
+ /** The managed identities for the IoT Central application. */
+ identity?: SystemAssignedServiceIdentity;
/**
- * The underlying HTTP response.
+ * The ID of the application.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: App;
- };
-};
-
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type AppsCreateOrUpdateResponse = App & {
+ readonly applicationId?: string;
+ /** The display name of the application. */
+ displayName?: string;
+ /** The subdomain of the application. */
+ subdomain?: string;
+ /** The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. */
+ template?: string;
/**
- * The underlying HTTP response.
+ * The current state of the application.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
-
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: App;
- };
+ readonly state?: AppState;
};
+/** Known values of {@link AppState} that the service accepts. */
+export enum KnownAppState {
+ Created = "created",
+ Suspended = "suspended"
+}
+
/**
- * Contains response data for the update operation.
- */
-export type AppsUpdateResponse = App & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+ * Defines values for AppState. \
+ * {@link KnownAppState} can be used interchangeably with AppState,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **created** \
+ * **suspended**
+ */
+export type AppState = string;
+
+/** Known values of {@link AppSku} that the service accepts. */
+export enum KnownAppSku {
+ ST0 = "ST0",
+ ST1 = "ST1",
+ ST2 = "ST2"
+}
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: App;
- };
-};
+/**
+ * Defines values for AppSku. \
+ * {@link KnownAppSku} can be used interchangeably with AppSku,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **ST0** \
+ * **ST1** \
+ * **ST2**
+ */
+export type AppSku = string;
+
+/** Known values of {@link SystemAssignedServiceIdentityType} that the service accepts. */
+export enum KnownSystemAssignedServiceIdentityType {
+ None = "None",
+ SystemAssigned = "SystemAssigned"
+}
/**
- * Contains response data for the listBySubscription operation.
- */
-export type AppsListBySubscriptionResponse = AppListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+ * Defines values for SystemAssignedServiceIdentityType. \
+ * {@link KnownSystemAssignedServiceIdentityType} can be used interchangeably with SystemAssignedServiceIdentityType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **SystemAssigned**
+ */
+export type SystemAssignedServiceIdentityType = string;
+
+/** Optional parameters. */
+export interface AppsGetOptionalParams extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type AppsGetResponse = App;
+
+/** Optional parameters. */
+export interface AppsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {
+ /** Delay to wait until next poll, in milliseconds. */
+ updateIntervalInMs?: number;
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
+ resumeFrom?: string;
+}
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppListResult;
- };
-};
+/** Contains response data for the createOrUpdate operation. */
+export type AppsCreateOrUpdateResponse = App;
-/**
- * Contains response data for the listByResourceGroup operation.
- */
-export type AppsListByResourceGroupResponse = AppListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Optional parameters. */
+export interface AppsUpdateOptionalParams extends coreClient.OperationOptions {
+ /** Delay to wait until next poll, in milliseconds. */
+ updateIntervalInMs?: number;
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
+ resumeFrom?: string;
+}
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppListResult;
- };
-};
+/** Contains response data for the update operation. */
+export type AppsUpdateResponse = App;
-/**
- * Contains response data for the checkNameAvailability operation.
- */
-export type AppsCheckNameAvailabilityResponse = AppAvailabilityInfo & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Optional parameters. */
+export interface AppsDeleteOptionalParams extends coreClient.OperationOptions {
+ /** Delay to wait until next poll, in milliseconds. */
+ updateIntervalInMs?: number;
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
+ resumeFrom?: string;
+}
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppAvailabilityInfo;
- };
-};
+/** Optional parameters. */
+export interface AppsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the checkSubdomainAvailability operation.
- */
-export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the listBySubscription operation. */
+export type AppsListBySubscriptionResponse = AppListResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppAvailabilityInfo;
- };
-};
+/** Optional parameters. */
+export interface AppsListByResourceGroupOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listTemplates operation.
- */
-export type AppsListTemplatesResponse = AppTemplatesResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the listByResourceGroup operation. */
+export type AppsListByResourceGroupResponse = AppListResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppTemplatesResult;
- };
-};
+/** Optional parameters. */
+export interface AppsCheckNameAvailabilityOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the beginCreateOrUpdate operation.
- */
-export type AppsBeginCreateOrUpdateResponse = App & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the checkNameAvailability operation. */
+export type AppsCheckNameAvailabilityResponse = AppAvailabilityInfo;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: App;
- };
-};
+/** Optional parameters. */
+export interface AppsCheckSubdomainAvailabilityOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the beginUpdate operation.
- */
-export type AppsBeginUpdateResponse = App & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the checkSubdomainAvailability operation. */
+export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: App;
- };
-};
+/** Optional parameters. */
+export interface AppsListTemplatesOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listBySubscriptionNext operation.
- */
-export type AppsListBySubscriptionNextResponse = AppListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the listTemplates operation. */
+export type AppsListTemplatesResponse = AppTemplatesResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppListResult;
- };
-};
+/** Optional parameters. */
+export interface AppsListBySubscriptionNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listByResourceGroupNext operation.
- */
-export type AppsListByResourceGroupNextResponse = AppListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the listBySubscriptionNext operation. */
+export type AppsListBySubscriptionNextResponse = AppListResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppListResult;
- };
-};
+/** Optional parameters. */
+export interface AppsListByResourceGroupNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listTemplatesNext operation.
- */
-export type AppsListTemplatesNextResponse = AppTemplatesResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the listByResourceGroupNext operation. */
+export type AppsListByResourceGroupNextResponse = AppListResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: AppTemplatesResult;
- };
-};
+/** Optional parameters. */
+export interface AppsListTemplatesNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type OperationsListResponse = OperationListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the listTemplatesNext operation. */
+export type AppsListTemplatesNextResponse = AppTemplatesResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: OperationListResult;
- };
-};
+/** Optional parameters. */
+export interface OperationsListOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type OperationsListNextResponse = OperationListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
+/** Contains response data for the list operation. */
+export type OperationsListResponse = OperationListResult;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: OperationListResult;
- };
-};
+/** Optional parameters. */
+export interface OperationsListNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listNext operation. */
+export type OperationsListNextResponse = OperationListResult;
+
+/** Optional parameters. */
+export interface IotCentralClientOptionalParams
+ extends coreClient.ServiceClientOptions {
+ /** server parameter */
+ $host?: string;
+ /** Api Version */
+ apiVersion?: string;
+ /** Overrides client endpoint. */
+ endpoint?: string;
+}
diff --git a/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts
index 1471146067ac..6982d3511bde 100644
--- a/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts
@@ -6,21 +6,16 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export const CloudError = CloudErrorMapper;
-export const BaseResource = BaseResourceMapper;
-
-export const AppSkuInfo: msRest.CompositeMapper = {
- serializedName: "AppSkuInfo",
+export const AppSkuInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "AppSkuInfo",
modelProperties: {
name: {
- required: true,
serializedName: "name",
+ required: true,
type: {
name: "String"
}
@@ -29,178 +24,147 @@ export const AppSkuInfo: msRest.CompositeMapper = {
}
};
-export const Resource: msRest.CompositeMapper = {
- serializedName: "Resource",
+export const SystemAssignedServiceIdentity: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Resource",
+ className: "SystemAssignedServiceIdentity",
modelProperties: {
- id: {
+ principalId: {
+ serializedName: "principalId",
readOnly: true,
- serializedName: "id",
type: {
- name: "String"
+ name: "Uuid"
}
},
- name: {
+ tenantId: {
+ serializedName: "tenantId",
readOnly: true,
- serializedName: "name",
- constraints: {
- Pattern: /^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,99}[a-zA-Z0-9]$/
- },
type: {
- name: "String"
+ name: "Uuid"
}
},
type: {
- readOnly: true,
serializedName: "type",
- type: {
- name: "String"
- }
- },
- location: {
required: true,
- serializedName: "location",
type: {
name: "String"
}
- },
- tags: {
- serializedName: "tags",
- type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
- }
}
}
}
};
-export const App: msRest.CompositeMapper = {
- serializedName: "App",
+export const Resource: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "App",
+ className: "Resource",
modelProperties: {
- ...Resource.type.modelProperties,
- applicationId: {
+ id: {
+ serializedName: "id",
readOnly: true,
- serializedName: "properties.applicationId",
type: {
name: "String"
}
},
- displayName: {
- serializedName: "properties.displayName",
+ name: {
+ constraints: {
+ Pattern: new RegExp("^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,99}[a-zA-Z0-9]$")
+ },
+ serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
- subdomain: {
- serializedName: "properties.subdomain",
+ type: {
+ serializedName: "type",
+ readOnly: true,
type: {
name: "String"
}
},
- template: {
- serializedName: "properties.template",
+ location: {
+ serializedName: "location",
+ required: true,
type: {
name: "String"
}
},
- sku: {
- required: true,
- serializedName: "sku",
+ tags: {
+ serializedName: "tags",
type: {
- name: "Composite",
- className: "AppSkuInfo"
+ name: "Dictionary",
+ value: { type: { name: "String" } }
}
}
}
}
};
-export const AppPatch: msRest.CompositeMapper = {
- serializedName: "AppPatch",
+export const CloudError: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AppPatch",
+ className: "CloudError",
modelProperties: {
- tags: {
- serializedName: "tags",
- type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
- }
- },
- sku: {
- serializedName: "sku",
- type: {
- name: "Composite",
- className: "AppSkuInfo"
- }
- },
- applicationId: {
+ code: {
+ serializedName: "error.code",
readOnly: true,
- serializedName: "properties.applicationId",
type: {
name: "String"
}
},
- displayName: {
- serializedName: "properties.displayName",
+ message: {
+ serializedName: "error.message",
+ readOnly: true,
type: {
name: "String"
}
},
- subdomain: {
- serializedName: "properties.subdomain",
+ target: {
+ serializedName: "error.target",
+ readOnly: true,
type: {
name: "String"
}
},
- template: {
- serializedName: "properties.template",
+ details: {
+ serializedName: "error.details",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "CloudErrorBody"
+ }
+ }
}
}
}
}
};
-export const CloudErrorBody: msRest.CompositeMapper = {
- serializedName: "CloudErrorBody",
+export const CloudErrorBody: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "CloudErrorBody",
modelProperties: {
code: {
- readOnly: true,
serializedName: "code",
+ readOnly: true,
type: {
name: "String"
}
},
message: {
- readOnly: true,
serializedName: "message",
+ readOnly: true,
type: {
name: "String"
}
},
target: {
- readOnly: true,
serializedName: "target",
+ readOnly: true,
type: {
name: "String"
}
@@ -221,36 +185,60 @@ export const CloudErrorBody: msRest.CompositeMapper = {
}
};
-export const OperationDisplay: msRest.CompositeMapper = {
- serializedName: "OperationDisplay",
+export const AppPatch: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OperationDisplay",
+ className: "AppPatch",
modelProperties: {
- provider: {
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ sku: {
+ serializedName: "sku",
+ type: {
+ name: "Composite",
+ className: "AppSkuInfo"
+ }
+ },
+ identity: {
+ serializedName: "identity",
+ type: {
+ name: "Composite",
+ className: "SystemAssignedServiceIdentity"
+ }
+ },
+ applicationId: {
+ serializedName: "properties.applicationId",
readOnly: true,
- serializedName: "provider",
type: {
name: "String"
}
},
- resource: {
- readOnly: true,
- serializedName: "resource",
+ displayName: {
+ serializedName: "properties.displayName",
type: {
name: "String"
}
},
- operation: {
- readOnly: true,
- serializedName: "operation",
+ subdomain: {
+ serializedName: "properties.subdomain",
type: {
name: "String"
}
},
- description: {
+ template: {
+ serializedName: "properties.template",
+ type: {
+ name: "String"
+ }
+ },
+ state: {
+ serializedName: "properties.state",
readOnly: true,
- serializedName: "description",
type: {
name: "String"
}
@@ -259,60 +247,48 @@ export const OperationDisplay: msRest.CompositeMapper = {
}
};
-export const Operation: msRest.CompositeMapper = {
- serializedName: "Operation",
+export const AppListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Operation",
+ className: "AppListResult",
modelProperties: {
- name: {
- readOnly: true,
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- display: {
- serializedName: "display",
- type: {
- name: "Composite",
- className: "OperationDisplay"
- }
- },
- origin: {
- readOnly: true,
- serializedName: "origin",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
},
- properties: {
- readOnly: true,
- serializedName: "properties",
+ value: {
+ serializedName: "value",
type: {
- name: "Object"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "App"
+ }
+ }
}
}
}
}
};
-export const OperationInputs: msRest.CompositeMapper = {
- serializedName: "OperationInputs",
+export const OperationInputs: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "OperationInputs",
modelProperties: {
name: {
- required: true,
serializedName: "name",
+ required: true,
type: {
name: "String"
}
},
type: {
+ defaultValue: "IoTApps",
serializedName: "type",
- defaultValue: 'IoTApps',
type: {
name: "String"
}
@@ -321,29 +297,28 @@ export const OperationInputs: msRest.CompositeMapper = {
}
};
-export const AppAvailabilityInfo: msRest.CompositeMapper = {
- serializedName: "AppAvailabilityInfo",
+export const AppAvailabilityInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "AppAvailabilityInfo",
modelProperties: {
nameAvailable: {
- readOnly: true,
serializedName: "nameAvailable",
+ readOnly: true,
type: {
name: "Boolean"
}
},
reason: {
- readOnly: true,
serializedName: "reason",
+ readOnly: true,
type: {
name: "String"
}
},
message: {
- readOnly: true,
serializedName: "message",
+ readOnly: true,
type: {
name: "String"
}
@@ -352,88 +327,91 @@ export const AppAvailabilityInfo: msRest.CompositeMapper = {
}
};
-export const AppTemplateLocations: msRest.CompositeMapper = {
- serializedName: "AppTemplateLocations",
+export const AppTemplatesResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AppTemplateLocations",
+ className: "AppTemplatesResult",
modelProperties: {
- id: {
- readOnly: true,
- serializedName: "id",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
},
- displayName: {
+ value: {
+ serializedName: "value",
readOnly: true,
- serializedName: "displayName",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "AppTemplate"
+ }
+ }
}
}
}
}
};
-export const AppTemplate: msRest.CompositeMapper = {
- serializedName: "AppTemplate",
+export const AppTemplate: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "AppTemplate",
modelProperties: {
manifestId: {
- readOnly: true,
serializedName: "manifestId",
+ readOnly: true,
type: {
name: "String"
}
},
manifestVersion: {
- readOnly: true,
serializedName: "manifestVersion",
+ readOnly: true,
type: {
name: "String"
}
},
name: {
- readOnly: true,
serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
title: {
- readOnly: true,
serializedName: "title",
+ readOnly: true,
type: {
name: "String"
}
},
order: {
- readOnly: true,
serializedName: "order",
+ readOnly: true,
type: {
name: "Number"
}
},
description: {
- readOnly: true,
serializedName: "description",
+ readOnly: true,
type: {
name: "String"
}
},
industry: {
- readOnly: true,
serializedName: "industry",
+ readOnly: true,
type: {
name: "String"
}
},
locations: {
- readOnly: true,
serializedName: "locations",
+ readOnly: true,
type: {
name: "Sequence",
element: {
@@ -448,39 +426,33 @@ export const AppTemplate: msRest.CompositeMapper = {
}
};
-export const AppListResult: msRest.CompositeMapper = {
- serializedName: "AppListResult",
+export const AppTemplateLocations: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AppListResult",
+ className: "AppTemplateLocations",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ id: {
+ serializedName: "id",
+ readOnly: true,
type: {
name: "String"
}
},
- value: {
- serializedName: "",
+ displayName: {
+ serializedName: "displayName",
+ readOnly: true,
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "App"
- }
- }
+ name: "String"
}
}
}
}
};
-export const AppTemplatesResult: msRest.CompositeMapper = {
- serializedName: "AppTemplatesResult",
+export const OperationListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "AppTemplatesResult",
+ className: "OperationListResult",
modelProperties: {
nextLink: {
serializedName: "nextLink",
@@ -489,14 +461,14 @@ export const AppTemplatesResult: msRest.CompositeMapper = {
}
},
value: {
+ serializedName: "value",
readOnly: true,
- serializedName: "",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "AppTemplate"
+ className: "Operation"
}
}
}
@@ -505,29 +477,131 @@ export const AppTemplatesResult: msRest.CompositeMapper = {
}
};
-export const OperationListResult: msRest.CompositeMapper = {
- serializedName: "OperationListResult",
+export const Operation: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OperationListResult",
+ className: "Operation",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ name: {
+ serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
- value: {
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay"
+ }
+ },
+ origin: {
+ serializedName: "origin",
readOnly: true,
- serializedName: "",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Operation"
- }
- }
+ name: "String"
+ }
+ },
+ properties: {
+ serializedName: "properties",
+ readOnly: true,
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "any" } }
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "OperationDisplay",
+ modelProperties: {
+ provider: {
+ serializedName: "provider",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "resource",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "operation",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ serializedName: "description",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const App: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "App",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ sku: {
+ serializedName: "sku",
+ type: {
+ name: "Composite",
+ className: "AppSkuInfo"
+ }
+ },
+ identity: {
+ serializedName: "identity",
+ type: {
+ name: "Composite",
+ className: "SystemAssignedServiceIdentity"
+ }
+ },
+ applicationId: {
+ serializedName: "properties.applicationId",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ displayName: {
+ serializedName: "properties.displayName",
+ type: {
+ name: "String"
+ }
+ },
+ subdomain: {
+ serializedName: "properties.subdomain",
+ type: {
+ name: "String"
+ }
+ },
+ template: {
+ serializedName: "properties.template",
+ type: {
+ name: "String"
+ }
+ },
+ state: {
+ serializedName: "properties.state",
+ readOnly: true,
+ type: {
+ name: "String"
}
}
}
diff --git a/sdk/iotcentral/arm-iotcentral/src/models/parameters.ts b/sdk/iotcentral/arm-iotcentral/src/models/parameters.ts
index b5b5ee4fce77..0b920e44059b 100644
--- a/sdk/iotcentral/arm-iotcentral/src/models/parameters.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/models/parameters.ts
@@ -3,70 +3,124 @@
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
+import {
+ OperationParameter,
+ OperationURLParameter,
+ OperationQueryParameter
+} from "@azure/core-client";
+import {
+ App as AppMapper,
+ AppPatch as AppPatchMapper,
+ OperationInputs as OperationInputsMapper
+} from "../models/mappers";
-export const acceptLanguage: msRest.OperationParameter = {
- parameterPath: "acceptLanguage",
+export const accept: OperationParameter = {
+ parameterPath: "accept",
mapper: {
- serializedName: "accept-language",
- defaultValue: 'en-US',
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Accept",
type: {
name: "String"
}
}
};
-export const apiVersion: msRest.OperationQueryParameter = {
- parameterPath: "apiVersion",
+
+export const $host: OperationURLParameter = {
+ parameterPath: "$host",
mapper: {
+ serializedName: "$host",
required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const apiVersion: OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ defaultValue: "2021-06-01",
+ isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
-export const nextPageLink: msRest.OperationURLParameter = {
- parameterPath: "nextPageLink",
+
+export const subscriptionId: OperationURLParameter = {
+ parameterPath: "subscriptionId",
mapper: {
+ serializedName: "subscriptionId",
required: true,
- serializedName: "nextLink",
type: {
name: "String"
}
- },
- skipEncoding: true
+ }
};
-export const resourceGroupName: msRest.OperationURLParameter = {
+
+export const resourceGroupName: OperationURLParameter = {
parameterPath: "resourceGroupName",
mapper: {
- required: true,
serializedName: "resourceGroupName",
+ required: true,
type: {
name: "String"
}
}
};
-export const resourceName: msRest.OperationURLParameter = {
+
+export const resourceName: OperationURLParameter = {
parameterPath: "resourceName",
mapper: {
- required: true,
serializedName: "resourceName",
+ required: true,
type: {
name: "String"
}
}
};
-export const subscriptionId: msRest.OperationURLParameter = {
- parameterPath: "subscriptionId",
+
+export const contentType: OperationParameter = {
+ parameterPath: ["options", "contentType"],
mapper: {
- required: true,
- serializedName: "subscriptionId",
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Content-Type",
type: {
name: "String"
}
}
};
+
+export const app: OperationParameter = {
+ parameterPath: "app",
+ mapper: AppMapper
+};
+
+export const appPatch: OperationParameter = {
+ parameterPath: "appPatch",
+ mapper: AppPatchMapper
+};
+
+export const operationInputs: OperationParameter = {
+ parameterPath: "operationInputs",
+ mapper: OperationInputsMapper
+};
+
+export const nextLink: OperationURLParameter = {
+ parameterPath: "nextLink",
+ mapper: {
+ serializedName: "nextLink",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
diff --git a/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts b/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts
index 2e5ecccf4179..7e87f5ef5428 100644
--- a/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts
@@ -3,412 +3,602 @@
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-import * as Models from "../models";
-import * as Mappers from "../models/appsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Apps } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { IotCentralClientContext } from "../iotCentralClientContext";
+import { IotCentralClient } from "../iotCentralClient";
+import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
+import { LroImpl } from "../lroImpl";
+import {
+ App,
+ AppsListBySubscriptionNextOptionalParams,
+ AppsListBySubscriptionOptionalParams,
+ AppsListByResourceGroupNextOptionalParams,
+ AppsListByResourceGroupOptionalParams,
+ AppTemplate,
+ AppsListTemplatesNextOptionalParams,
+ AppsListTemplatesOptionalParams,
+ AppsGetOptionalParams,
+ AppsGetResponse,
+ AppsCreateOrUpdateOptionalParams,
+ AppsCreateOrUpdateResponse,
+ AppPatch,
+ AppsUpdateOptionalParams,
+ AppsUpdateResponse,
+ AppsDeleteOptionalParams,
+ AppsListBySubscriptionResponse,
+ AppsListByResourceGroupResponse,
+ OperationInputs,
+ AppsCheckNameAvailabilityOptionalParams,
+ AppsCheckNameAvailabilityResponse,
+ AppsCheckSubdomainAvailabilityOptionalParams,
+ AppsCheckSubdomainAvailabilityResponse,
+ AppsListTemplatesResponse,
+ AppsListBySubscriptionNextResponse,
+ AppsListByResourceGroupNextResponse,
+ AppsListTemplatesNextResponse
+} from "../models";
-/** Class representing a Apps. */
-export class Apps {
- private readonly client: IotCentralClientContext;
+///
+/** Class containing Apps operations. */
+export class AppsImpl implements Apps {
+ private readonly client: IotCentralClient;
/**
- * Create a Apps.
- * @param {IotCentralClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Apps class.
+ * @param client Reference to the service client
*/
- constructor(client: IotCentralClientContext) {
+ constructor(client: IotCentralClient) {
this.client = client;
}
/**
- * Get the metadata of an IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param resourceName The ARM resource name of the IoT Central application.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param resourceName The ARM resource name of the IoT Central application.
- * @param callback The callback
- */
- get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param resourceName The ARM resource name of the IoT Central application.
- * @param options The optional parameters
- * @param callback The callback
- */
- get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- resourceGroupName,
- resourceName,
- options
+ * Get all IoT Central Applications in a subscription.
+ * @param options The options parameters.
+ */
+ public listBySubscription(
+ options?: AppsListBySubscriptionOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listBySubscriptionPagingAll(options);
+ return {
+ next() {
+ return iter.next();
},
- getOperationSpec,
- callback) as Promise;
- }
-
- /**
- * Create or update the metadata of an IoT Central application. The usual pattern to modify a
- * property is to retrieve the IoT Central application metadata and security metadata, and then
- * combine them with the modified values in a new body to update the IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param resourceName The ARM resource name of the IoT Central application.
- * @param app The IoT Central application metadata and security metadata.
- * @param [options] The optional parameters
- * @returns Promise
- */
- createOrUpdate(resourceGroupName: string, resourceName: string, app: Models.App, options?: msRest.RequestOptionsBase): Promise {
- return this.beginCreateOrUpdate(resourceGroupName,resourceName,app,options)
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listBySubscriptionPagingPage(options);
+ }
+ };
}
- /**
- * Update the metadata of an IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param resourceName The ARM resource name of the IoT Central application.
- * @param appPatch The IoT Central application metadata and security metadata.
- * @param [options] The optional parameters
- * @returns Promise
- */
- update(resourceGroupName: string, resourceName: string, appPatch: Models.AppPatch, options?: msRest.RequestOptionsBase): Promise {
- return this.beginUpdate(resourceGroupName,resourceName,appPatch,options)
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ private async *listBySubscriptionPagingPage(
+ options?: AppsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listBySubscription(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listBySubscriptionNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
}
- /**
- * Delete an IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param resourceName The ARM resource name of the IoT Central application.
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise {
- return this.beginDeleteMethod(resourceGroupName,resourceName,options)
- .then(lroPoller => lroPoller.pollUntilFinished());
+ private async *listBySubscriptionPagingAll(
+ options?: AppsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
+ yield* page;
+ }
}
/**
- * Get all IoT Central Applications in a subscription.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listBySubscription(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- listBySubscription(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- options
+ * Get all the IoT Central Applications in a resource group.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param options The options parameters.
+ */
+ public listByResourceGroup(
+ resourceGroupName: string,
+ options?: AppsListByResourceGroupOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- listBySubscriptionOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
+ }
+ };
}
- /**
- * Get all the IoT Central Applications in a resource group.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param callback The callback
- */
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
- * @param options The optional parameters
- * @param callback The callback
- */
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
+ private async *listByResourceGroupPagingPage(
+ resourceGroupName: string,
+ options?: AppsListByResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listByResourceGroup(resourceGroupName, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listByResourceGroupNext(
resourceGroupName,
+ continuationToken,
options
- },
- listByResourceGroupOperationSpec,
- callback) as Promise;
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listByResourceGroupPagingAll(
+ resourceGroupName: string,
+ options?: AppsListByResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listByResourceGroupPagingPage(
+ resourceGroupName,
+ options
+ )) {
+ yield* page;
+ }
}
/**
- * Check if an IoT Central application name is available.
- * @param operationInputs Set the name parameter in the OperationInputs structure to the name of
- * the IoT Central application to check.
- * @param [options] The optional parameters
- * @returns Promise
- */
- checkNameAvailability(operationInputs: Models.OperationInputs, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param operationInputs Set the name parameter in the OperationInputs structure to the name of
- * the IoT Central application to check.
- * @param callback The callback
- */
- checkNameAvailability(operationInputs: Models.OperationInputs, callback: msRest.ServiceCallback): void;
- /**
- * @param operationInputs Set the name parameter in the OperationInputs structure to the name of
- * the IoT Central application to check.
- * @param options The optional parameters
- * @param callback The callback
- */
- checkNameAvailability(operationInputs: Models.OperationInputs, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- checkNameAvailability(operationInputs: Models.OperationInputs, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- operationInputs,
- options
+ * Get all available application templates.
+ * @param options The options parameters.
+ */
+ public listTemplates(
+ options?: AppsListTemplatesOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listTemplatesPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- checkNameAvailabilityOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listTemplatesPagingPage(options);
+ }
+ };
+ }
+
+ private async *listTemplatesPagingPage(
+ options?: AppsListTemplatesOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listTemplates(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listTemplatesNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listTemplatesPagingAll(
+ options?: AppsListTemplatesOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listTemplatesPagingPage(options)) {
+ yield* page;
+ }
}
/**
- * Check if an IoT Central application subdomain is available.
- * @param operationInputs Set the name parameter in the OperationInputs structure to the subdomain
- * of the IoT Central application to check.
- * @param [options] The optional parameters
- * @returns Promise
- */
- checkSubdomainAvailability(operationInputs: Models.OperationInputs, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param operationInputs Set the name parameter in the OperationInputs structure to the subdomain
- * of the IoT Central application to check.
- * @param callback The callback
- */
- checkSubdomainAvailability(operationInputs: Models.OperationInputs, callback: msRest.ServiceCallback): void;
- /**
- * @param operationInputs Set the name parameter in the OperationInputs structure to the subdomain
- * of the IoT Central application to check.
- * @param options The optional parameters
- * @param callback The callback
+ * Get the metadata of an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param options The options parameters.
*/
- checkSubdomainAvailability(operationInputs: Models.OperationInputs, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- checkSubdomainAvailability(operationInputs: Models.OperationInputs, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ resourceName: string,
+ options?: AppsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- operationInputs,
- options
- },
- checkSubdomainAvailabilityOperationSpec,
- callback) as Promise;
+ { resourceGroupName, resourceName, options },
+ getOperationSpec
+ );
}
/**
- * Get all available application templates.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listTemplates(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- listTemplates(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- listTemplates(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listTemplates(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- options
- },
- listTemplatesOperationSpec,
- callback) as Promise;
+ * Create or update the metadata of an IoT Central application. The usual pattern to modify a property
+ * is to retrieve the IoT Central application metadata and security metadata, and then combine them
+ * with the modified values in a new body to update the IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param app The IoT Central application metadata and security metadata.
+ * @param options The options parameters.
+ */
+ async beginCreateOrUpdate(
+ resourceGroupName: string,
+ resourceName: string,
+ app: App,
+ options?: AppsCreateOrUpdateOptionalParams
+ ): Promise<
+ PollerLike<
+ PollOperationState,
+ AppsCreateOrUpdateResponse
+ >
+ > {
+ const directSendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ): Promise => {
+ return this.client.sendOperationRequest(args, spec);
+ };
+ const sendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ) => {
+ let currentRawResponse:
+ | coreClient.FullOperationResponse
+ | undefined = undefined;
+ const providedCallback = args.options?.onResponse;
+ const callback: coreClient.RawResponseCallback = (
+ rawResponse: coreClient.FullOperationResponse,
+ flatResponse: unknown
+ ) => {
+ currentRawResponse = rawResponse;
+ providedCallback?.(rawResponse, flatResponse);
+ };
+ const updatedArgs = {
+ ...args,
+ options: {
+ ...args.options,
+ onResponse: callback
+ }
+ };
+ const flatResponse = await directSendOperation(updatedArgs, spec);
+ return {
+ flatResponse,
+ rawResponse: {
+ statusCode: currentRawResponse!.status,
+ body: currentRawResponse!.parsedBody,
+ headers: currentRawResponse!.headers.toJSON()
+ }
+ };
+ };
+
+ const lro = new LroImpl(
+ sendOperation,
+ { resourceGroupName, resourceName, app, options },
+ createOrUpdateOperationSpec
+ );
+ return new LroEngine(lro, {
+ resumeFrom: options?.resumeFrom,
+ intervalInMs: options?.updateIntervalInMs
+ });
}
/**
- * Create or update the metadata of an IoT Central application. The usual pattern to modify a
- * property is to retrieve the IoT Central application metadata and security metadata, and then
- * combine them with the modified values in a new body to update the IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
+ * Create or update the metadata of an IoT Central application. The usual pattern to modify a property
+ * is to retrieve the IoT Central application metadata and security metadata, and then combine them
+ * with the modified values in a new body to update the IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
* @param resourceName The ARM resource name of the IoT Central application.
* @param app The IoT Central application metadata and security metadata.
- * @param [options] The optional parameters
- * @returns Promise
- */
- beginCreateOrUpdate(resourceGroupName: string, resourceName: string, app: Models.App, options?: msRest.RequestOptionsBase): Promise {
- return this.client.sendLRORequest(
- {
- resourceGroupName,
- resourceName,
- app,
- options
- },
- beginCreateOrUpdateOperationSpec,
- options);
+ * @param options The options parameters.
+ */
+ async beginCreateOrUpdateAndWait(
+ resourceGroupName: string,
+ resourceName: string,
+ app: App,
+ options?: AppsCreateOrUpdateOptionalParams
+ ): Promise {
+ const poller = await this.beginCreateOrUpdate(
+ resourceGroupName,
+ resourceName,
+ app,
+ options
+ );
+ return poller.pollUntilDone();
}
/**
* Update the metadata of an IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
* @param resourceName The ARM resource name of the IoT Central application.
* @param appPatch The IoT Central application metadata and security metadata.
- * @param [options] The optional parameters
- * @returns Promise
- */
- beginUpdate(resourceGroupName: string, resourceName: string, appPatch: Models.AppPatch, options?: msRest.RequestOptionsBase): Promise {
- return this.client.sendLRORequest(
- {
- resourceGroupName,
- resourceName,
- appPatch,
- options
- },
- beginUpdateOperationSpec,
- options);
+ * @param options The options parameters.
+ */
+ async beginUpdate(
+ resourceGroupName: string,
+ resourceName: string,
+ appPatch: AppPatch,
+ options?: AppsUpdateOptionalParams
+ ): Promise<
+ PollerLike, AppsUpdateResponse>
+ > {
+ const directSendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ): Promise => {
+ return this.client.sendOperationRequest(args, spec);
+ };
+ const sendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ) => {
+ let currentRawResponse:
+ | coreClient.FullOperationResponse
+ | undefined = undefined;
+ const providedCallback = args.options?.onResponse;
+ const callback: coreClient.RawResponseCallback = (
+ rawResponse: coreClient.FullOperationResponse,
+ flatResponse: unknown
+ ) => {
+ currentRawResponse = rawResponse;
+ providedCallback?.(rawResponse, flatResponse);
+ };
+ const updatedArgs = {
+ ...args,
+ options: {
+ ...args.options,
+ onResponse: callback
+ }
+ };
+ const flatResponse = await directSendOperation(updatedArgs, spec);
+ return {
+ flatResponse,
+ rawResponse: {
+ statusCode: currentRawResponse!.status,
+ body: currentRawResponse!.parsedBody,
+ headers: currentRawResponse!.headers.toJSON()
+ }
+ };
+ };
+
+ const lro = new LroImpl(
+ sendOperation,
+ { resourceGroupName, resourceName, appPatch, options },
+ updateOperationSpec
+ );
+ return new LroEngine(lro, {
+ resumeFrom: options?.resumeFrom,
+ intervalInMs: options?.updateIntervalInMs
+ });
}
/**
- * Delete an IoT Central application.
- * @param resourceGroupName The name of the resource group that contains the IoT Central
- * application.
+ * Update the metadata of an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
* @param resourceName The ARM resource name of the IoT Central application.
- * @param [options] The optional parameters
- * @returns Promise
- */
- beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise {
- return this.client.sendLRORequest(
- {
- resourceGroupName,
- resourceName,
- options
- },
- beginDeleteMethodOperationSpec,
- options);
+ * @param appPatch The IoT Central application metadata and security metadata.
+ * @param options The options parameters.
+ */
+ async beginUpdateAndWait(
+ resourceGroupName: string,
+ resourceName: string,
+ appPatch: AppPatch,
+ options?: AppsUpdateOptionalParams
+ ): Promise {
+ const poller = await this.beginUpdate(
+ resourceGroupName,
+ resourceName,
+ appPatch,
+ options
+ );
+ return poller.pollUntilDone();
}
/**
- * Get all IoT Central Applications in a subscription.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ * Delete an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param options The options parameters.
+ */
+ async beginDelete(
+ resourceGroupName: string,
+ resourceName: string,
+ options?: AppsDeleteOptionalParams
+ ): Promise, void>> {
+ const directSendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ): Promise => {
+ return this.client.sendOperationRequest(args, spec);
+ };
+ const sendOperation = async (
+ args: coreClient.OperationArguments,
+ spec: coreClient.OperationSpec
+ ) => {
+ let currentRawResponse:
+ | coreClient.FullOperationResponse
+ | undefined = undefined;
+ const providedCallback = args.options?.onResponse;
+ const callback: coreClient.RawResponseCallback = (
+ rawResponse: coreClient.FullOperationResponse,
+ flatResponse: unknown
+ ) => {
+ currentRawResponse = rawResponse;
+ providedCallback?.(rawResponse, flatResponse);
+ };
+ const updatedArgs = {
+ ...args,
+ options: {
+ ...args.options,
+ onResponse: callback
+ }
+ };
+ const flatResponse = await directSendOperation(updatedArgs, spec);
+ return {
+ flatResponse,
+ rawResponse: {
+ statusCode: currentRawResponse!.status,
+ body: currentRawResponse!.parsedBody,
+ headers: currentRawResponse!.headers.toJSON()
+ }
+ };
+ };
+
+ const lro = new LroImpl(
+ sendOperation,
+ { resourceGroupName, resourceName, options },
+ deleteOperationSpec
+ );
+ return new LroEngine(lro, {
+ resumeFrom: options?.resumeFrom,
+ intervalInMs: options?.updateIntervalInMs
+ });
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param callback The callback
- */
- listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ * Delete an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param options The options parameters.
+ */
+ async beginDeleteAndWait(
+ resourceGroupName: string,
+ resourceName: string,
+ options?: AppsDeleteOptionalParams
+ ): Promise {
+ const poller = await this.beginDelete(
+ resourceGroupName,
+ resourceName,
+ options
+ );
+ return poller.pollUntilDone();
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * Get all IoT Central Applications in a subscription.
+ * @param options The options parameters.
*/
- listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listBySubscription(
+ options?: AppsListBySubscriptionOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listBySubscriptionNextOperationSpec,
- callback) as Promise;
+ { options },
+ listBySubscriptionOperationSpec
+ );
}
/**
* Get all the IoT Central Applications in a resource group.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param options The options parameters.
*/
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ private _listByResourceGroup(
+ resourceGroupName: string,
+ options?: AppsListByResourceGroupOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroupName, options },
+ listByResourceGroupOperationSpec
+ );
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param callback The callback
- */
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ * Check if an IoT Central application name is available.
+ * @param operationInputs Set the name parameter in the OperationInputs structure to the name of the
+ * IoT Central application to check.
+ * @param options The options parameters.
+ */
+ checkNameAvailability(
+ operationInputs: OperationInputs,
+ options?: AppsCheckNameAvailabilityOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { operationInputs, options },
+ checkNameAvailabilityOperationSpec
+ );
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
- */
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ * Check if an IoT Central application subdomain is available.
+ * @param operationInputs Set the name parameter in the OperationInputs structure to the subdomain of
+ * the IoT Central application to check.
+ * @param options The options parameters.
+ */
+ checkSubdomainAvailability(
+ operationInputs: OperationInputs,
+ options?: AppsCheckSubdomainAvailabilityOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listByResourceGroupNextOperationSpec,
- callback) as Promise;
+ { operationInputs, options },
+ checkSubdomainAvailabilityOperationSpec
+ );
}
/**
* Get all available application templates.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- listTemplatesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ private _listTemplates(
+ options?: AppsListTemplatesOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { options },
+ listTemplatesOperationSpec
+ );
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param callback The callback
+ * ListBySubscriptionNext
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
+ * @param options The options parameters.
*/
- listTemplatesNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ private _listBySubscriptionNext(
+ nextLink: string,
+ options?: AppsListBySubscriptionNextOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { nextLink, options },
+ listBySubscriptionNextOperationSpec
+ );
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListByResourceGroupNext
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
+ * @param options The options parameters.
*/
- listTemplatesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listTemplatesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listByResourceGroupNext(
+ resourceGroupName: string,
+ nextLink: string,
+ options?: AppsListByResourceGroupNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listTemplatesNextOperationSpec,
- callback) as Promise;
+ { resourceGroupName, nextLink, options },
+ listByResourceGroupNextOperationSpec
+ );
}
-}
+ /**
+ * ListTemplatesNext
+ * @param nextLink The nextLink from the previous successful call to the ListTemplates method.
+ * @param options The options parameters.
+ */
+ private _listTemplatesNext(
+ nextLink: string,
+ options?: AppsListTemplatesNextOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { nextLink, options },
+ listTemplatesNextOperationSpec
+ );
+ }
+}
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const getOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.resourceName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.App
@@ -417,246 +607,201 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const listBySubscriptionOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/iotApps",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.resourceName
],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
+ httpMethod: "PUT",
responses: {
200: {
- bodyMapper: Mappers.AppListResult
+ bodyMapper: Mappers.App
+ },
+ 201: {
+ bodyMapper: Mappers.App
+ },
+ 202: {
+ bodyMapper: Mappers.App
+ },
+ 204: {
+ bodyMapper: Mappers.App
},
default: {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const listByResourceGroupOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps",
+ requestBody: Parameters.app,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
- Parameters.resourceGroupName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.resourceGroupName,
+ Parameters.resourceName
],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const updateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
+ httpMethod: "PATCH",
responses: {
200: {
- bodyMapper: Mappers.AppListResult
+ bodyMapper: Mappers.App
+ },
+ 201: {
+ bodyMapper: Mappers.App
+ },
+ 202: {
+ bodyMapper: Mappers.App
+ },
+ 204: {
+ bodyMapper: Mappers.App
},
default: {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability",
+ requestBody: Parameters.appPatch,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.resourceName
],
- requestBody: {
- parameterPath: "operationInputs",
- mapper: {
- ...Mappers.OperationInputs,
- required: true
- }
- },
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
+ httpMethod: "DELETE",
responses: {
- 200: {
- bodyMapper: Mappers.AppAvailabilityInfo
- },
+ 200: {},
+ 201: {},
+ 202: {},
+ 204: {},
default: {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const checkSubdomainAvailabilityOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.resourceName
],
- requestBody: {
- parameterPath: "operationInputs",
- mapper: {
- ...Mappers.OperationInputs,
- required: true
- }
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/iotApps",
+ httpMethod: "GET",
responses: {
200: {
- bodyMapper: Mappers.AppAvailabilityInfo
+ bodyMapper: Mappers.AppListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listTemplatesOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/appTemplates",
- urlParameters: [
- Parameters.subscriptionId
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps",
+ httpMethod: "GET",
responses: {
200: {
- bodyMapper: Mappers.AppTemplatesResult
+ bodyMapper: Mappers.AppListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
- serializer
-};
-
-const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
- httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.resourceName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.resourceGroupName
],
- requestBody: {
- parameterPath: "app",
- mapper: {
- ...Mappers.App,
- required: true
- }
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability",
+ httpMethod: "POST",
responses: {
200: {
- bodyMapper: Mappers.App
- },
- 201: {
- bodyMapper: Mappers.App
+ bodyMapper: Mappers.AppAvailabilityInfo
},
- 202: {},
default: {
bodyMapper: Mappers.CloudError
}
},
+ requestBody: Parameters.operationInputs,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
serializer
};
-
-const beginUpdateOperationSpec: msRest.OperationSpec = {
- httpMethod: "PATCH",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.resourceName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "appPatch",
- mapper: {
- ...Mappers.AppPatch,
- required: true
- }
- },
+const checkSubdomainAvailabilityOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability",
+ httpMethod: "POST",
responses: {
200: {
- bodyMapper: Mappers.App
+ bodyMapper: Mappers.AppAvailabilityInfo
},
- 202: {},
default: {
bodyMapper: Mappers.CloudError
}
},
+ requestBody: Parameters.operationInputs,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
serializer
};
-
-const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroupName,
- Parameters.resourceName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+const listTemplatesOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/appTemplates",
+ httpMethod: "POST",
responses: {
- 200: {},
- 202: {},
- 204: {},
+ 200: {
+ bodyMapper: Mappers.AppTemplatesResult
+ },
default: {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AppListResult
@@ -665,22 +810,18 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AppListResult
@@ -689,22 +830,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listTemplatesNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- baseUrl: "https://management.azure.com",
+const listTemplatesNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AppTemplatesResult
@@ -713,5 +851,12 @@ const listTemplatesNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/iotcentral/arm-iotcentral/src/operations/index.ts b/sdk/iotcentral/arm-iotcentral/src/operations/index.ts
index b62f41478b0a..d1e6cfaa9a9a 100644
--- a/sdk/iotcentral/arm-iotcentral/src/operations/index.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/operations/index.ts
@@ -3,8 +3,7 @@
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export * from "./apps";
diff --git a/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts b/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts
index d2b10b4f21c9..62f4054191c9 100644
--- a/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts
@@ -3,92 +3,109 @@
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/operationsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Operations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { IotCentralClientContext } from "../iotCentralClientContext";
+import { IotCentralClient } from "../iotCentralClient";
+import {
+ Operation,
+ OperationsListNextOptionalParams,
+ OperationsListOptionalParams,
+ OperationsListResponse,
+ OperationsListNextResponse
+} from "../models";
-/** Class representing a Operations. */
-export class Operations {
- private readonly client: IotCentralClientContext;
+///
+/** Class containing Operations operations. */
+export class OperationsImpl implements Operations {
+ private readonly client: IotCentralClient;
/**
- * Create a Operations.
- * @param {IotCentralClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Operations class.
+ * @param client Reference to the service client
*/
- constructor(client: IotCentralClientContext) {
+ constructor(client: IotCentralClient) {
this.client = client;
}
/**
- * Lists all of the available IoT Central application REST API operations.
- * @param [options] The optional parameters
- * @returns Promise
+ * Lists all of the available IoT Central Resource Provider operations.
+ * @param options The options parameters.
*/
- list(options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param callback The callback
- */
- list(callback: msRest.ServiceCallback): void;
- /**
- * @param options The optional parameters
- * @param callback The callback
- */
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- options
+ public list(
+ options?: OperationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- listOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
}
/**
- * Lists all of the available IoT Central application REST API operations.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param callback The callback
+ * Lists all of the available IoT Central Resource Provider operations.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ private _list(
+ options?: OperationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ nextLink: string,
+ options?: OperationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path: "/providers/Microsoft.IoTCentral/operations",
httpMethod: "GET",
- path: "providers/Microsoft.IoTCentral/operations",
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.OperationListResult
@@ -97,22 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationListResult
@@ -121,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.nextLink],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/apps.ts b/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/apps.ts
new file mode 100644
index 000000000000..ea4ec2d80ec1
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/apps.ts
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { PollerLike, PollOperationState } from "@azure/core-lro";
+import {
+ App,
+ AppsListBySubscriptionOptionalParams,
+ AppsListByResourceGroupOptionalParams,
+ AppTemplate,
+ AppsListTemplatesOptionalParams,
+ AppsGetOptionalParams,
+ AppsGetResponse,
+ AppsCreateOrUpdateOptionalParams,
+ AppsCreateOrUpdateResponse,
+ AppPatch,
+ AppsUpdateOptionalParams,
+ AppsUpdateResponse,
+ AppsDeleteOptionalParams,
+ OperationInputs,
+ AppsCheckNameAvailabilityOptionalParams,
+ AppsCheckNameAvailabilityResponse,
+ AppsCheckSubdomainAvailabilityOptionalParams,
+ AppsCheckSubdomainAvailabilityResponse
+} from "../models";
+
+///
+/** Interface representing a Apps. */
+export interface Apps {
+ /**
+ * Get all IoT Central Applications in a subscription.
+ * @param options The options parameters.
+ */
+ listBySubscription(
+ options?: AppsListBySubscriptionOptionalParams
+ ): PagedAsyncIterableIterator;
+ /**
+ * Get all the IoT Central Applications in a resource group.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param options The options parameters.
+ */
+ listByResourceGroup(
+ resourceGroupName: string,
+ options?: AppsListByResourceGroupOptionalParams
+ ): PagedAsyncIterableIterator;
+ /**
+ * Get all available application templates.
+ * @param options The options parameters.
+ */
+ listTemplates(
+ options?: AppsListTemplatesOptionalParams
+ ): PagedAsyncIterableIterator;
+ /**
+ * Get the metadata of an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroupName: string,
+ resourceName: string,
+ options?: AppsGetOptionalParams
+ ): Promise;
+ /**
+ * Create or update the metadata of an IoT Central application. The usual pattern to modify a property
+ * is to retrieve the IoT Central application metadata and security metadata, and then combine them
+ * with the modified values in a new body to update the IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param app The IoT Central application metadata and security metadata.
+ * @param options The options parameters.
+ */
+ beginCreateOrUpdate(
+ resourceGroupName: string,
+ resourceName: string,
+ app: App,
+ options?: AppsCreateOrUpdateOptionalParams
+ ): Promise<
+ PollerLike<
+ PollOperationState,
+ AppsCreateOrUpdateResponse
+ >
+ >;
+ /**
+ * Create or update the metadata of an IoT Central application. The usual pattern to modify a property
+ * is to retrieve the IoT Central application metadata and security metadata, and then combine them
+ * with the modified values in a new body to update the IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param app The IoT Central application metadata and security metadata.
+ * @param options The options parameters.
+ */
+ beginCreateOrUpdateAndWait(
+ resourceGroupName: string,
+ resourceName: string,
+ app: App,
+ options?: AppsCreateOrUpdateOptionalParams
+ ): Promise;
+ /**
+ * Update the metadata of an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param appPatch The IoT Central application metadata and security metadata.
+ * @param options The options parameters.
+ */
+ beginUpdate(
+ resourceGroupName: string,
+ resourceName: string,
+ appPatch: AppPatch,
+ options?: AppsUpdateOptionalParams
+ ): Promise<
+ PollerLike, AppsUpdateResponse>
+ >;
+ /**
+ * Update the metadata of an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param appPatch The IoT Central application metadata and security metadata.
+ * @param options The options parameters.
+ */
+ beginUpdateAndWait(
+ resourceGroupName: string,
+ resourceName: string,
+ appPatch: AppPatch,
+ options?: AppsUpdateOptionalParams
+ ): Promise;
+ /**
+ * Delete an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param options The options parameters.
+ */
+ beginDelete(
+ resourceGroupName: string,
+ resourceName: string,
+ options?: AppsDeleteOptionalParams
+ ): Promise, void>>;
+ /**
+ * Delete an IoT Central application.
+ * @param resourceGroupName The name of the resource group that contains the IoT Central application.
+ * @param resourceName The ARM resource name of the IoT Central application.
+ * @param options The options parameters.
+ */
+ beginDeleteAndWait(
+ resourceGroupName: string,
+ resourceName: string,
+ options?: AppsDeleteOptionalParams
+ ): Promise;
+ /**
+ * Check if an IoT Central application name is available.
+ * @param operationInputs Set the name parameter in the OperationInputs structure to the name of the
+ * IoT Central application to check.
+ * @param options The options parameters.
+ */
+ checkNameAvailability(
+ operationInputs: OperationInputs,
+ options?: AppsCheckNameAvailabilityOptionalParams
+ ): Promise;
+ /**
+ * Check if an IoT Central application subdomain is available.
+ * @param operationInputs Set the name parameter in the OperationInputs structure to the subdomain of
+ * the IoT Central application to check.
+ * @param options The options parameters.
+ */
+ checkSubdomainAvailability(
+ operationInputs: OperationInputs,
+ options?: AppsCheckSubdomainAvailabilityOptionalParams
+ ): Promise;
+}
diff --git a/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts b/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/index.ts
similarity index 68%
rename from sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts
rename to sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/index.ts
index 938d3e665a23..d1e6cfaa9a9a 100644
--- a/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts
+++ b/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/index.ts
@@ -6,9 +6,5 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export {
- CloudError,
- Operation,
- OperationDisplay,
- OperationListResult
-} from "../models/mappers";
+export * from "./apps";
+export * from "./operations";
diff --git a/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/operations.ts b/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/operations.ts
new file mode 100644
index 000000000000..9eddb83ee644
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/src/operationsInterfaces/operations.ts
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Operation, OperationsListOptionalParams } from "../models";
+
+///
+/** Interface representing a Operations. */
+export interface Operations {
+ /**
+ * Lists all of the available IoT Central Resource Provider operations.
+ * @param options The options parameters.
+ */
+ list(
+ options?: OperationsListOptionalParams
+ ): PagedAsyncIterableIterator;
+}
diff --git a/sdk/iotcentral/arm-iotcentral/test/sampleTest.ts b/sdk/iotcentral/arm-iotcentral/test/sampleTest.ts
new file mode 100644
index 000000000000..7ed89b043e1b
--- /dev/null
+++ b/sdk/iotcentral/arm-iotcentral/test/sampleTest.ts
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the 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,
+ record,
+ RecorderEnvironmentSetup,
+ Recorder
+} from "@azure-tools/test-recorder";
+import * as assert from "assert";
+
+const recorderEnvSetup: RecorderEnvironmentSetup = {
+ replaceableVariables: {
+ AZURE_CLIENT_ID: "azure_client_id",
+ AZURE_CLIENT_SECRET: "azure_client_secret",
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
+ SUBSCRIPTION_ID: "azure_subscription_id"
+ },
+ customizationsOnRecordings: [
+ (recording: any): any =>
+ recording.replace(
+ /"access_token":"[^"]*"/g,
+ `"access_token":"access_token"`
+ )
+ ],
+ queryParametersToSkip: []
+};
+
+describe("My test", () => {
+ let recorder: Recorder;
+
+ beforeEach(async function() {
+ recorder = record(this, recorderEnvSetup);
+ });
+
+ afterEach(async function() {
+ await recorder.stop();
+ });
+
+ it("sample test", async function() {
+ console.log("Hi, I'm a test!");
+ });
+});
diff --git a/sdk/iotcentral/arm-iotcentral/tsconfig.json b/sdk/iotcentral/arm-iotcentral/tsconfig.json
index 422b584abd5e..525f92e34670 100644
--- a/sdk/iotcentral/arm-iotcentral/tsconfig.json
+++ b/sdk/iotcentral/arm-iotcentral/tsconfig.json
@@ -3,7 +3,7 @@
"module": "es6",
"moduleResolution": "node",
"strict": true,
- "target": "es5",
+ "target": "es6",
"sourceMap": true,
"declarationMap": true,
"esModuleInterop": true,
@@ -11,9 +11,10 @@
"forceConsistentCasingInFileNames": true,
"lib": ["es6", "dom"],
"declaration": true,
- "outDir": "./esm",
- "importHelpers": true
+ "outDir": "./dist-esm",
+ "importHelpers": true,
+ "paths": { "@azure/arm-iotcentral": ["./src/index"] }
},
- "include": ["./src/**/*.ts"],
+ "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"],
"exclude": ["node_modules"]
}
diff --git a/sdk/iotcentral/ci.yml b/sdk/iotcentral/ci.yml
new file mode 100644
index 000000000000..7b3a349593cc
--- /dev/null
+++ b/sdk/iotcentral/ci.yml
@@ -0,0 +1,30 @@
+# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
+
+trigger:
+ branches:
+ include:
+ - main
+ - release/*
+ - hotfix/*
+ paths:
+ include:
+ - sdk/iotcentral/
+
+pr:
+ branches:
+ include:
+ - main
+ - release/*
+ - hotfix/*
+ paths:
+ include:
+ - sdk/iotcentral/
+
+extends:
+ template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
+ parameters:
+ ServiceDirectory: iotcentral
+ Artifacts:
+ - name: azure-arm-iotcentral
+ safeName: azurearmiotcentral
+
\ No newline at end of file
diff --git a/sdk/machinelearning/arm-commitmentplans/CHANGELOG.md b/sdk/machinelearning/arm-commitmentplans/CHANGELOG.md
new file mode 100644
index 000000000000..a97d7b9b16e1
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 2.0.0-beta.1 (2022-01-19)
+
+The package of @azure/arm-commitmentplans is using our next generation design principles since version 2.0.0-beta.1, which contains breaking changes.
+
+To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
+
+To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
+
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
diff --git a/sdk/machinelearning/arm-commitmentplans/LICENSE b/sdk/machinelearning/arm-commitmentplans/LICENSE
new file mode 100644
index 000000000000..5d1d36e0af80
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2022 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/sdk/machinelearning/arm-commitmentplans/README.md b/sdk/machinelearning/arm-commitmentplans/README.md
index 53790844e548..2243befc3607 100644
--- a/sdk/machinelearning/arm-commitmentplans/README.md
+++ b/sdk/machinelearning/arm-commitmentplans/README.md
@@ -1,99 +1,98 @@
-## Azure AzureMLCommitmentPlansManagementClient SDK for JavaScript
+# Azure ML Commitment Plans Management client library for JavaScript
-This package contains an isomorphic SDK for AzureMLCommitmentPlansManagementClient.
+This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ML Commitment Plans Management client.
+
+These APIs allow end users to operate on Azure Machine Learning Commitment Plans resources and their child Commitment Association resources. They support CRUD operations for commitment plans, get and list operations for commitment associations, moving commitment associations between commitment plans, and retrieving commitment plan usage history.
+
+[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-commitmentplans) |
+[Package (NPM)](https://www.npmjs.com/package/@azure/arm-commitmentplans) |
+[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-commitmentplans?view=azure-node-preview) |
+[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
+
+## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
-- Latest versions of Safari, Chrome, Edge, and Firefox.
+- Latest versions of Safari, Chrome, Edge and Firefox.
-### How to Install
+### Prerequisites
-```
+- An [Azure subscription][azure_sub].
+
+### Install the `@azure/arm-commitmentplans` package
+
+Install the Azure ML Commitment Plans Management client library for JavaScript with `npm`:
+
+```bash
npm install @azure/arm-commitmentplans
```
-### How to use
+### Create and authenticate a `AzureMLCommitmentPlansManagementClient`
-#### nodejs - Authentication, client creation and list skus as an example written in TypeScript.
+To create a client object to access the Azure ML Commitment Plans Management API, you will need the `endpoint` of your Azure ML Commitment Plans Management resource and a `credential`. The Azure ML Commitment Plans Management client can use Azure Active Directory credentials to authenticate.
+You can find the endpoint for your Azure ML Commitment Plans Management resource in the [Azure Portal][azure_portal].
-##### Install @azure/ms-rest-nodeauth
+You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
-```
-npm install @azure/ms-rest-nodeauth
-```
+To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
-##### Sample code
-
-```ts
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
-import { AzureMLCommitmentPlansManagementClient, AzureMLCommitmentPlansManagementModels, AzureMLCommitmentPlansManagementMappers } from "@azure/arm-commitmentplans";
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-msRestNodeAuth.interactiveLogin().then((creds) => {
- const client = new AzureMLCommitmentPlansManagementClient(creds, subscriptionId);
- client.skus.list().then((result) => {
- console.log("The result is:");
- console.log(result);
- });
-}).catch((err) => {
- console.error(err);
-});
+```bash
+npm install @azure/identity
```
-#### browser - Authentication, client creation and list skus as an example written in JavaScript.
+You will also need to **register a new AAD application and grant access to Azure ML Commitment Plans Management** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
+Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
-##### Install @azure/ms-rest-browserauth
+For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
+```javascript
+const { AzureMLCommitmentPlansManagementClient } = require("@azure/arm-commitmentplans");
+const { DefaultAzureCredential } = require("@azure/identity");
+const subscriptionId = "00000000-0000-0000-0000-000000000000";
+const client = new AzureMLCommitmentPlansManagementClient(new DefaultAzureCredential(), subscriptionId);
```
-npm install @azure/ms-rest-browserauth
-```
-##### Sample code
-
-See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
-
-- index.html
-```html
-
-
-
- @azure/arm-commitmentplans sample
-
-
-
-
-
-
-
-
+
+### 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
+
+### AzureMLCommitmentPlansManagementClient
+
+`AzureMLCommitmentPlansManagementClient` is the primary interface for developers using the Azure ML Commitment Plans Management client library. Explore the methods on this client object to understand the different features of the Azure ML Commitment Plans Management service that you can access.
+
+## Troubleshooting
+
+### Logging
+
+Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
+
+```javascript
+const { setLogLevel } = require("@azure/logger");
+setLogLevel("info");
```
-## Related projects
+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).
-- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+## Next steps
+Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
+
+## Contributing
+
+If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
+
+## Related projects
+
+- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmachinelearning%2Farm-commitmentplans%2FREADME.png)
+
+[azure_cli]: https://docs.microsoft.com/cli/azure
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_portal]: https://portal.azure.com
+[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
+[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
diff --git a/sdk/machinelearning/arm-commitmentplans/_meta.json b/sdk/machinelearning/arm-commitmentplans/_meta.json
new file mode 100644
index 000000000000..a4bbf4dedbbf
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/_meta.json
@@ -0,0 +1,7 @@
+{
+ "commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
+ "readme": "specification/machinelearning/resource-manager/readme.md",
+ "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/iotspaces/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
+}
diff --git a/sdk/machinelearning/arm-commitmentplans/api-extractor.json b/sdk/machinelearning/arm-commitmentplans/api-extractor.json
new file mode 100644
index 000000000000..e423c962b80c
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/api-extractor.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
+ "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "docModel": { "enabled": true },
+ "apiReport": { "enabled": true, "reportFolder": "./review" },
+ "dtsRollup": {
+ "enabled": true,
+ "untrimmedFilePath": "",
+ "publicTrimmedFilePath": "./types/arm-commitmentplans.d.ts"
+ },
+ "messages": {
+ "tsdocMessageReporting": { "default": { "logLevel": "none" } },
+ "extractorMessageReporting": {
+ "ae-missing-release-tag": { "logLevel": "none" },
+ "ae-unresolved-link": { "logLevel": "none" }
+ }
+ }
+}
diff --git a/sdk/machinelearning/arm-commitmentplans/package.json b/sdk/machinelearning/arm-commitmentplans/package.json
index f278f292273b..627d64df4455 100644
--- a/sdk/machinelearning/arm-commitmentplans/package.json
+++ b/sdk/machinelearning/arm-commitmentplans/package.json
@@ -1,56 +1,98 @@
{
"name": "@azure/arm-commitmentplans",
+ "sdk-type": "mgmt",
"author": "Microsoft Corporation",
- "description": "AzureMLCommitmentPlansManagementClient Library with typescript type definitions for node.js and browser.",
- "version": "1.2.0",
+ "description": "A generated SDK for AzureMLCommitmentPlansManagementClient.",
+ "version": "2.0.0-beta.1",
+ "engines": { "node": ">=12.0.0" },
"dependencies": {
- "@azure/ms-rest-azure-js": "^1.1.0",
- "@azure/ms-rest-js": "^1.1.0",
- "tslib": "^1.9.3"
+ "@azure/core-paging": "^1.2.0",
+ "@azure/core-client": "^1.0.0",
+ "@azure/core-auth": "^1.3.0",
+ "@azure/core-rest-pipeline": "^1.1.0",
+ "tslib": "^2.2.0"
},
- "keywords": [
- "node",
- "azure",
- "typescript",
- "browser",
- "isomorphic"
- ],
+ "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
- "main": "./dist/arm-commitmentplans.js",
- "module": "./esm/azureMLCommitmentPlansManagementClient.js",
- "types": "./esm/azureMLCommitmentPlansManagementClient.d.ts",
+ "main": "./dist/index.js",
+ "module": "./dist-esm/src/index.js",
+ "types": "./types/arm-commitmentplans.d.ts",
"devDependencies": {
- "typescript": "^3.1.1",
- "rollup": "^0.66.2",
- "rollup-plugin-node-resolve": "^3.4.0",
- "uglify-js": "^3.4.9"
+ "@microsoft/api-extractor": "^7.18.11",
+ "@rollup/plugin-commonjs": "11.0.2",
+ "@rollup/plugin-json": "^4.0.0",
+ "@rollup/plugin-multi-entry": "^3.0.0",
+ "@rollup/plugin-node-resolve": "^8.0.0",
+ "mkdirp": "^1.0.4",
+ "rollup": "^1.16.3",
+ "rollup-plugin-sourcemaps": "^0.4.2",
+ "typescript": "~4.2.0",
+ "uglify-js": "^3.4.9",
+ "rimraf": "^3.0.0",
+ "@azure/identity": "^2.0.1",
+ "@azure-tools/test-recorder": "^1.0.0",
+ "mocha": "^7.1.1",
+ "cross-env": "^7.0.2"
},
- "homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-commitmentplans",
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearning/arm-commitmentplans",
"repository": {
"type": "git",
- "url": "https://github.com/azure/azure-sdk-for-js.git"
- },
- "bugs": {
- "url": "https://github.com/azure/azure-sdk-for-js/issues"
+ "url": "https://github.com/Azure/azure-sdk-for-js.git"
},
+ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
- "esm/**/*.js",
- "esm/**/*.js.map",
- "esm/**/*.d.ts",
- "esm/**/*.d.ts.map",
+ "dist-esm/**/*.js",
+ "dist-esm/**/*.js.map",
+ "dist-esm/**/*.d.ts",
+ "dist-esm/**/*.d.ts.map",
"src/**/*.ts",
+ "README.md",
+ "LICENSE",
"rollup.config.js",
- "tsconfig.json"
+ "tsconfig.json",
+ "review/*",
+ "CHANGELOG.md",
+ "types/*"
],
"scripts": {
- "build": "tsc && rollup -c rollup.config.js && npm run minify",
- "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-commitmentplans.js.map'\" -o ./dist/arm-commitmentplans.min.js ./dist/arm-commitmentplans.js",
- "prepack": "npm install && npm run build"
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
+ "prepack": "npm run build",
+ "pack": "npm pack 2>&1",
+ "extract-api": "api-extractor run --local",
+ "lint": "echo skipped",
+ "audit": "echo skipped",
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
+ "build:node": "echo skipped",
+ "build:browser": "echo skipped",
+ "build:test": "echo skipped",
+ "build:samples": "echo skipped.",
+ "check-format": "echo skipped",
+ "execute:samples": "echo skipped",
+ "format": "echo skipped",
+ "test": "npm run integration-test",
+ "test:node": "echo skipped",
+ "test:browser": "echo skipped",
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
+ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
+ "unit-test:browser": "echo skipped",
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
+ "integration-test:browser": "echo skipped",
+ "docs": "echo skipped"
},
"sideEffects": false,
+ "//metadata": {
+ "constantPaths": [
+ {
+ "path": "src/AzureMLCommitmentPlansManagementClient.ts",
+ "prefix": "packageDetails"
+ }
+ ]
+ },
"autoPublish": true
}
diff --git a/sdk/machinelearning/arm-commitmentplans/recordings/node/my_test/recording_sample_test.js b/sdk/machinelearning/arm-commitmentplans/recordings/node/my_test/recording_sample_test.js
new file mode 100644
index 000000000000..0f6ecb857acf
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/recordings/node/my_test/recording_sample_test.js
@@ -0,0 +1,5 @@
+let nock = require('nock');
+
+module.exports.hash = "7a6be38bb8cb644d64b4094802301751";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
diff --git a/sdk/machinelearning/arm-commitmentplans/review/arm-commitmentplans.api.md b/sdk/machinelearning/arm-commitmentplans/review/arm-commitmentplans.api.md
new file mode 100644
index 000000000000..13cefef08b2f
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/review/arm-commitmentplans.api.md
@@ -0,0 +1,405 @@
+## API Report File for "@azure/arm-commitmentplans"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+import * as coreAuth from '@azure/core-auth';
+import * as coreClient from '@azure/core-client';
+import { PagedAsyncIterableIterator } from '@azure/core-paging';
+
+// @public (undocumented)
+export class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceClient {
+ // (undocumented)
+ $host: string;
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureMLCommitmentPlansManagementClientOptionalParams);
+ // (undocumented)
+ apiVersion: string;
+ // (undocumented)
+ commitmentAssociations: CommitmentAssociations;
+ // (undocumented)
+ commitmentPlans: CommitmentPlans;
+ // (undocumented)
+ operations: Operations;
+ // (undocumented)
+ skus: Skus;
+ // (undocumented)
+ subscriptionId: string;
+ // (undocumented)
+ usageHistory: UsageHistory;
+}
+
+// @public
+export interface AzureMLCommitmentPlansManagementClientOptionalParams extends coreClient.ServiceClientOptions {
+ $host?: string;
+ apiVersion?: string;
+ endpoint?: string;
+}
+
+// @public
+export interface CatalogSku {
+ readonly capabilities?: SkuCapability[];
+ readonly capacity?: SkuCapacity;
+ readonly costs?: SkuCost[];
+ readonly locations?: string[];
+ readonly name?: string;
+ readonly resourceType?: string;
+ readonly restrictions?: SkuRestrictions[];
+ readonly tier?: string;
+}
+
+// @public
+export type CommitmentAssociation = Resource & {
+ etag?: string;
+ properties?: CommitmentAssociationProperties;
+};
+
+// @public
+export interface CommitmentAssociationListResult {
+ nextLink?: string;
+ value?: CommitmentAssociation[];
+}
+
+// @public
+export interface CommitmentAssociationProperties {
+ readonly associatedResourceId?: string;
+ readonly commitmentPlanId?: string;
+ readonly creationDate?: Date;
+}
+
+// @public
+export interface CommitmentAssociations {
+ get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, options?: CommitmentAssociationsGetOptionalParams): Promise;
+ list(resourceGroupName: string, commitmentPlanName: string, options?: CommitmentAssociationsListOptionalParams): PagedAsyncIterableIterator;
+ move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: MoveCommitmentAssociationRequest, options?: CommitmentAssociationsMoveOptionalParams): Promise;
+}
+
+// @public
+export interface CommitmentAssociationsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CommitmentAssociationsGetResponse = CommitmentAssociation;
+
+// @public
+export interface CommitmentAssociationsListNextOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type CommitmentAssociationsListNextResponse = CommitmentAssociationListResult;
+
+// @public
+export interface CommitmentAssociationsListOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type CommitmentAssociationsListResponse = CommitmentAssociationListResult;
+
+// @public
+export interface CommitmentAssociationsMoveOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CommitmentAssociationsMoveResponse = CommitmentAssociation;
+
+// @public
+export type CommitmentPlan = Resource & {
+ etag?: string;
+ readonly properties?: CommitmentPlanProperties;
+ sku?: ResourceSku;
+};
+
+// @public
+export interface CommitmentPlanListResult {
+ nextLink?: string;
+ value?: CommitmentPlan[];
+}
+
+// @public
+export interface CommitmentPlanPatchPayload {
+ sku?: ResourceSku;
+ tags?: {
+ [propertyName: string]: string;
+ };
+}
+
+// @public
+export interface CommitmentPlanProperties {
+ readonly chargeForOverage?: boolean;
+ readonly chargeForPlan?: boolean;
+ readonly creationDate?: Date;
+ readonly includedQuantities?: {
+ [propertyName: string]: PlanQuantity;
+ };
+ readonly maxAssociationLimit?: number;
+ readonly maxCapacityLimit?: number;
+ readonly minCapacityLimit?: number;
+ readonly planMeter?: string;
+ readonly refillFrequencyInDays?: number;
+ readonly suspendPlanOnOverage?: boolean;
+}
+
+// @public
+export interface CommitmentPlans {
+ createOrUpdate(resourceGroupName: string, commitmentPlanName: string, createOrUpdatePayload: CommitmentPlan, options?: CommitmentPlansCreateOrUpdateOptionalParams): Promise;
+ get(resourceGroupName: string, commitmentPlanName: string, options?: CommitmentPlansGetOptionalParams): Promise;
+ list(options?: CommitmentPlansListOptionalParams): PagedAsyncIterableIterator;
+ listInResourceGroup(resourceGroupName: string, options?: CommitmentPlansListInResourceGroupOptionalParams): PagedAsyncIterableIterator;
+ patch(resourceGroupName: string, commitmentPlanName: string, patchPayload: CommitmentPlanPatchPayload, options?: CommitmentPlansPatchOptionalParams): Promise;
+ remove(resourceGroupName: string, commitmentPlanName: string, options?: CommitmentPlansRemoveOptionalParams): Promise;
+}
+
+// @public
+export interface CommitmentPlansCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CommitmentPlansCreateOrUpdateResponse = CommitmentPlan;
+
+// @public
+export interface CommitmentPlansGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CommitmentPlansGetResponse = CommitmentPlan;
+
+// @public
+export interface CommitmentPlansListInResourceGroupNextOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type CommitmentPlansListInResourceGroupNextResponse = CommitmentPlanListResult;
+
+// @public
+export interface CommitmentPlansListInResourceGroupOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type CommitmentPlansListInResourceGroupResponse = CommitmentPlanListResult;
+
+// @public
+export interface CommitmentPlansListNextOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type CommitmentPlansListNextResponse = CommitmentPlanListResult;
+
+// @public
+export interface CommitmentPlansListOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type CommitmentPlansListResponse = CommitmentPlanListResult;
+
+// @public
+export interface CommitmentPlansPatchOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CommitmentPlansPatchResponse = CommitmentPlan;
+
+// @public
+export interface CommitmentPlansRemoveOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export enum KnownResourceSkuRestrictionsReasonCode {
+ // (undocumented)
+ NotAvailableForSubscription = "NotAvailableForSubscription",
+ // (undocumented)
+ QuotaId = "QuotaId"
+}
+
+// @public
+export enum KnownResourceSkuRestrictionsType {
+ // (undocumented)
+ Location = "location",
+ // (undocumented)
+ Zone = "zone"
+}
+
+// @public
+export enum KnownSkuCapacityScaleType {
+ // (undocumented)
+ Automatic = "Automatic",
+ // (undocumented)
+ Manual = "Manual",
+ // (undocumented)
+ None = "None"
+}
+
+// @public
+export interface MoveCommitmentAssociationRequest {
+ destinationPlanId?: string;
+}
+
+// @public
+export interface OperationDisplayInfo {
+ readonly description?: string;
+ readonly operation?: string;
+ readonly provider?: string;
+ readonly resource?: string;
+}
+
+// @public
+export interface OperationEntity {
+ display?: OperationDisplayInfo;
+ readonly name?: string;
+}
+
+// @public
+export interface OperationEntityListResult {
+ readonly value?: OperationEntity[];
+}
+
+// @public
+export interface Operations {
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface OperationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListResponse = OperationEntityListResult;
+
+// @public
+export interface PlanQuantity {
+ readonly allowance?: number;
+ readonly amount?: number;
+ readonly includedQuantityMeter?: string;
+ readonly overageMeter?: string;
+}
+
+// @public
+export interface PlanUsageHistory {
+ planDeletionOverage?: {
+ [propertyName: string]: number;
+ };
+ planMigrationOverage?: {
+ [propertyName: string]: number;
+ };
+ planQuantitiesAfterUsage?: {
+ [propertyName: string]: number;
+ };
+ planQuantitiesBeforeUsage?: {
+ [propertyName: string]: number;
+ };
+ planUsageOverage?: {
+ [propertyName: string]: number;
+ };
+ usage?: {
+ [propertyName: string]: number;
+ };
+ usageDate?: Date;
+}
+
+// @public
+export interface PlanUsageHistoryListResult {
+ nextLink?: string;
+ value?: PlanUsageHistory[];
+}
+
+// @public
+export interface Resource {
+ readonly id?: string;
+ location: string;
+ readonly name?: string;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ readonly type?: string;
+}
+
+// @public
+export interface ResourceSku {
+ capacity?: number;
+ name?: string;
+ tier?: string;
+}
+
+// @public
+export type ResourceSkuRestrictionsReasonCode = string;
+
+// @public
+export type ResourceSkuRestrictionsType = string;
+
+// @public
+export interface SkuCapability {
+ readonly name?: string;
+ readonly value?: string;
+}
+
+// @public
+export interface SkuCapacity {
+ readonly default?: number;
+ readonly maximum?: number;
+ readonly minimum?: number;
+ readonly scaleType?: SkuCapacityScaleType;
+}
+
+// @public
+export type SkuCapacityScaleType = string;
+
+// @public
+export interface SkuCost {
+ readonly extendedUnit?: string;
+ readonly meterID?: string;
+ readonly quantity?: number;
+}
+
+// @public
+export interface SkuListResult {
+ readonly value?: CatalogSku[];
+}
+
+// @public
+export interface SkuRestrictions {
+ readonly reasonCode?: ResourceSkuRestrictionsReasonCode;
+ readonly type?: ResourceSkuRestrictionsType;
+ readonly values?: string[];
+}
+
+// @public
+export interface Skus {
+ list(options?: SkusListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface SkusListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type SkusListResponse = SkuListResult;
+
+// @public
+export interface UsageHistory {
+ list(resourceGroupName: string, commitmentPlanName: string, options?: UsageHistoryListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface UsageHistoryListNextOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type UsageHistoryListNextResponse = PlanUsageHistoryListResult;
+
+// @public
+export interface UsageHistoryListOptionalParams extends coreClient.OperationOptions {
+ skipToken?: string;
+}
+
+// @public
+export type UsageHistoryListResponse = PlanUsageHistoryListResult;
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/sdk/machinelearning/arm-commitmentplans/rollup.config.js b/sdk/machinelearning/arm-commitmentplans/rollup.config.js
index 226323b9807f..9be1955eb7f1 100644
--- a/sdk/machinelearning/arm-commitmentplans/rollup.config.js
+++ b/sdk/machinelearning/arm-commitmentplans/rollup.config.js
@@ -1,31 +1,188 @@
-import nodeResolve from "rollup-plugin-node-resolve";
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import nodeResolve from "@rollup/plugin-node-resolve";
+import cjs from "@rollup/plugin-commonjs";
+import sourcemaps from "rollup-plugin-sourcemaps";
+import multiEntry from "@rollup/plugin-multi-entry";
+import json from "@rollup/plugin-json";
+
+import nodeBuiltins from "builtin-modules";
+
+/**
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
+ *
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
+ * __exportStar downleveled helper function to declare its exports which confuses
+ * rollup's automatic discovery mechanism.
+ *
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
+ */
+export function openTelemetryCommonJs() {
+ const namedExports = {};
+
+ for (const key of [
+ "@opentelemetry/api",
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
+ ]) {
+ namedExports[key] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "SpanStatusCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
+
+ for (const version of releasedOpenTelemetryVersions) {
+ namedExports[
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
+ ] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "StatusCode",
+ "CanonicalCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ return namedExports;
+}
+
+// #region Warning Handler
+
+/**
+ * A function that can determine whether a rollupwarning should be ignored. If
+ * the function returns `true`, then the warning will not be displayed.
+ */
+
+function ignoreNiseSinonEvalWarnings(warning) {
+ return (
+ warning.code === "EVAL" &&
+ warning.id &&
+ (warning.id.includes("node_modules/nise") ||
+ warning.id.includes("node_modules/sinon")) === true
+ );
+}
+
+function ignoreChaiCircularDependencyWarnings(warning) {
+ return (
+ warning.code === "CIRCULAR_DEPENDENCY" &&
+ warning.importer && warning.importer.includes("node_modules/chai") === true
+ );
+}
+
+const warningInhibitors = [
+ ignoreChaiCircularDependencyWarnings,
+ ignoreNiseSinonEvalWarnings
+];
+
/**
- * @type {import('rollup').RollupFileOptions}
+ * Construct a warning handler for the shared rollup configuration
+ * that ignores certain warnings that are not relevant to testing.
*/
-const config = {
- input: './esm/azureMLCommitmentPlansManagementClient.js',
- external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
- output: {
- file: "./dist/arm-commitmentplans.js",
- format: "umd",
- name: "Azure.ArmCommitmentplans",
- sourcemap: true,
- globals: {
- "@azure/ms-rest-js": "msRest",
- "@azure/ms-rest-azure-js": "msRestAzure"
+function makeOnWarnForTesting() {
+ return (warning, warn) => {
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
+ warn(warning);
+ }
+ };
+}
+
+// #endregion
+
+function makeBrowserTestConfig() {
+ const config = {
+ input: {
+ include: ["dist-esm/test/**/*.spec.js"],
+ exclude: ["dist-esm/test/**/node/**"]
},
- banner: `/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */`
- },
- plugins: [
- nodeResolve({ module: true })
- ]
+ output: {
+ file: `dist-test/index.browser.js`,
+ format: "umd",
+ sourcemap: true
+ },
+ preserveSymlinks: false,
+ plugins: [
+ multiEntry({ exports: false }),
+ nodeResolve({
+ mainFields: ["module", "browser"]
+ }),
+ cjs({
+ namedExports: {
+ // Chai's strange internal architecture makes it impossible to statically
+ // analyze its exports.
+ chai: [
+ "version",
+ "use",
+ "util",
+ "config",
+ "expect",
+ "should",
+ "assert"
+ ],
+ ...openTelemetryCommonJs()
+ }
+ }),
+ json(),
+ sourcemaps()
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
+ ],
+ onwarn: makeOnWarnForTesting(),
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
+ // rollup started respecting the "sideEffects" field in package.json. Since
+ // our package.json sets "sideEffects=false", this also applies to test
+ // code, which causes all tests to be removed by tree-shaking.
+ treeshake: false
+ };
+
+ return config;
+}
+
+const defaultConfigurationOptions = {
+ disableBrowserBundle: false
};
-export default config;
+
+export function makeConfig(pkg, options) {
+ options = {
+ ...defaultConfigurationOptions,
+ ...(options || {})
+ };
+
+ const baseConfig = {
+ // Use the package's module field if it has one
+ input: pkg["module"] || "dist-esm/src/index.js",
+ external: [
+ ...nodeBuiltins,
+ ...Object.keys(pkg.dependencies),
+ ...Object.keys(pkg.devDependencies)
+ ],
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
+ preserveSymlinks: false,
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
+ };
+
+ const config = [baseConfig];
+
+ if (!options.disableBrowserBundle) {
+ config.push(makeBrowserTestConfig());
+ }
+
+ return config;
+}
+
+export default makeConfig(require("./package.json"));
diff --git a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts
index a1fc34d00224..a3bee2ac4031 100644
--- a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts
+++ b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClient.ts
@@ -1,48 +1,95 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "./models";
-import * as Mappers from "./models/mappers";
-import * as operations from "./operations";
-import { AzureMLCommitmentPlansManagementClientContext } from "./azureMLCommitmentPlansManagementClientContext";
+import * as coreClient from "@azure/core-client";
+import * as coreAuth from "@azure/core-auth";
+import {
+ OperationsImpl,
+ SkusImpl,
+ CommitmentAssociationsImpl,
+ CommitmentPlansImpl,
+ UsageHistoryImpl
+} from "./operations";
+import {
+ Operations,
+ Skus,
+ CommitmentAssociations,
+ CommitmentPlans,
+ UsageHistory
+} from "./operationsInterfaces";
+import { AzureMLCommitmentPlansManagementClientOptionalParams } from "./models";
-
-class AzureMLCommitmentPlansManagementClient extends AzureMLCommitmentPlansManagementClientContext {
- // Operation groups
- skus: operations.Skus;
- commitmentAssociations: operations.CommitmentAssociations;
- commitmentPlans: operations.CommitmentPlans;
- usageHistory: operations.UsageHistory;
+export class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceClient {
+ $host: string;
+ apiVersion: string;
+ subscriptionId: string;
/**
* Initializes a new instance of the AzureMLCommitmentPlansManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId Azure Subscription ID.
- * @param [options] The parameter options
+ * @param options The parameter options
*/
- constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) {
- super(credentials, subscriptionId, options);
- this.skus = new operations.Skus(this);
- this.commitmentAssociations = new operations.CommitmentAssociations(this);
- this.commitmentPlans = new operations.CommitmentPlans(this);
- this.usageHistory = new operations.UsageHistory(this);
- }
-}
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionId: string,
+ options?: AzureMLCommitmentPlansManagementClientOptionalParams
+ ) {
+ 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: AzureMLCommitmentPlansManagementClientOptionalParams = {
+ requestContentType: "application/json; charset=utf-8",
+ credential: credentials
+ };
-// Operation Specifications
+ const packageDetails = `azsdk-js-arm-commitmentplans/2.0.0-beta.1`;
+ const userAgentPrefix =
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
+ : `${packageDetails}`;
-export {
- AzureMLCommitmentPlansManagementClient,
- AzureMLCommitmentPlansManagementClientContext,
- Models as AzureMLCommitmentPlansManagementModels,
- Mappers as AzureMLCommitmentPlansManagementMappers
-};
-export * from "./operations";
+ if (!options.credentialScopes) {
+ options.credentialScopes = ["https://management.azure.com/.default"];
+ }
+ const optionsWithDefaults = {
+ ...defaults,
+ ...options,
+ userAgentOptions: {
+ userAgentPrefix
+ },
+ baseUri: options.endpoint || "https://management.azure.com"
+ };
+ super(optionsWithDefaults);
+ // Parameter assignments
+ this.subscriptionId = subscriptionId;
+
+ // Assigning values to Constant parameters
+ this.$host = options.$host || "https://management.azure.com";
+ this.apiVersion = options.apiVersion || "2016-05-01-preview";
+ this.operations = new OperationsImpl(this);
+ this.skus = new SkusImpl(this);
+ this.commitmentAssociations = new CommitmentAssociationsImpl(this);
+ this.commitmentPlans = new CommitmentPlansImpl(this);
+ this.usageHistory = new UsageHistoryImpl(this);
+ }
+
+ operations: Operations;
+ skus: Skus;
+ commitmentAssociations: CommitmentAssociations;
+ commitmentPlans: CommitmentPlans;
+ usageHistory: UsageHistory;
+}
diff --git a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts b/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts
deleted file mode 100644
index 3293f19add9d..000000000000
--- a/sdk/machinelearning/arm-commitmentplans/src/azureMLCommitmentPlansManagementClientContext.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-import * as Models from "./models";
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-
-const packageName = "@azure/arm-commitmentplans";
-const packageVersion = "0.1.0";
-
-export class AzureMLCommitmentPlansManagementClientContext extends msRestAzure.AzureServiceClient {
- credentials: msRest.ServiceClientCredentials;
- subscriptionId: string;
- apiVersion?: string;
-
- /**
- * Initializes a new instance of the AzureMLCommitmentPlansManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure.
- * @param subscriptionId Azure Subscription ID.
- * @param [options] The parameter options
- */
- constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMLCommitmentPlansManagementClientOptions) {
- if (credentials == undefined) {
- throw new Error('\'credentials\' cannot be null.');
- }
- if (subscriptionId == undefined) {
- throw new Error('\'subscriptionId\' cannot be null.');
- }
-
- if (!options) {
- options = {};
- }
- if(!options.userAgent) {
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
- }
-
- super(credentials, options);
-
- this.apiVersion = '2016-05-01-preview';
- this.acceptLanguage = 'en-US';
- this.longRunningOperationRetryTimeout = 30;
- this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
- this.requestContentType = "application/json; charset=utf-8";
- this.credentials = credentials;
- this.subscriptionId = subscriptionId;
-
- if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
- this.acceptLanguage = options.acceptLanguage;
- }
- if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
- this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
- }
- }
-}
diff --git a/sdk/machinelearning/arm-commitmentplans/src/index.ts b/sdk/machinelearning/arm-commitmentplans/src/index.ts
new file mode 100644
index 000000000000..068a2e27f2d7
--- /dev/null
+++ b/sdk/machinelearning/arm-commitmentplans/src/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+///
+export * from "./models";
+export { AzureMLCommitmentPlansManagementClient } from "./azureMLCommitmentPlansManagementClient";
+export * from "./operationsInterfaces";
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/commitmentAssociationsMappers.ts b/sdk/machinelearning/arm-commitmentplans/src/models/commitmentAssociationsMappers.ts
deleted file mode 100644
index 9c35807a84b3..000000000000
--- a/sdk/machinelearning/arm-commitmentplans/src/models/commitmentAssociationsMappers.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-export {
- CommitmentAssociation,
- Resource,
- BaseResource,
- CommitmentAssociationProperties,
- CloudError,
- CommitmentAssociationListResult,
- MoveCommitmentAssociationRequest,
- CommitmentPlan,
- CommitmentPlanProperties,
- PlanQuantity,
- ResourceSku
-} from "../models/mappers";
-
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/commitmentPlansMappers.ts b/sdk/machinelearning/arm-commitmentplans/src/models/commitmentPlansMappers.ts
deleted file mode 100644
index 54bd9f0cc132..000000000000
--- a/sdk/machinelearning/arm-commitmentplans/src/models/commitmentPlansMappers.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-export {
- CommitmentPlan,
- Resource,
- BaseResource,
- CommitmentPlanProperties,
- PlanQuantity,
- ResourceSku,
- CloudError,
- CommitmentPlanPatchPayload,
- CommitmentPlanListResult,
- CommitmentAssociation,
- CommitmentAssociationProperties
-} from "../models/mappers";
-
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/index.ts b/sdk/machinelearning/arm-commitmentplans/src/models/index.ts
index 743d98989904..1a686d1a1072 100644
--- a/sdk/machinelearning/arm-commitmentplans/src/models/index.ts
+++ b/sdk/machinelearning/arm-commitmentplans/src/models/index.ts
@@ -1,936 +1,579 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export { BaseResource, CloudError };
-
-
-/**
- * @interface
- * An interface representing SkuCapacity.
- * Describes scaling information of a SKU.
- *
- */
-export interface SkuCapacity {
- /**
- * @member {number} [minimum] The minimum capacity.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly minimum?: number;
- /**
- * @member {number} [maximum] The maximum capacity that can be set.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly maximum?: number;
- /**
- * @member {number} [default] The default capacity.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly default?: number;
+/** The list of REST API operations. */
+export interface OperationEntityListResult {
/**
- * @member {SkuCapacityScaleType} [scaleType] The scale type applicable to
- * the sku. Possible values include: 'Automatic', 'Manual', 'None'
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The list of operations.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly scaleType?: SkuCapacityScaleType;
+ readonly value?: OperationEntity[];
}
-/**
- * @interface
- * An interface representing SkuCapability.
- * Describes The SKU capabilites object.
- *
- */
-export interface SkuCapability {
+/** An API operation. */
+export interface OperationEntity {
/**
- * @member {string} [name] The capability name.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Operation name: {provider}/{resource}/{operation}.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
- /**
- * @member {string} [value] The capability value.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly value?: string;
+ /** The API operation info. */
+ display?: OperationDisplayInfo;
}
-/**
- * @interface
- * An interface representing SkuCost.
- * Describes metadata for SKU cost info.
- *
- */
-export interface SkuCost {
- /**
- * @member {string} [meterID] The meter used for this part of a SKU's cost.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly meterID?: string;
+/** The API operation info. */
+export interface OperationDisplayInfo {
/**
- * @member {number} [quantity] The multiplier for the meter ID.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The description of the operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly quantity?: number;
- /**
- * @member {string} [extendedUnit] The overall duration represented by the
- * quantity.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly extendedUnit?: string;
-}
-
-/**
- * @interface
- * An interface representing SkuRestrictions.
- * Describes restrictions which would prevent a SKU from being used.
- *
- */
-export interface SkuRestrictions {
+ readonly description?: string;
/**
- * @member {ResourceSkuRestrictionsType} [type] The type of restrictions.
- * Possible values include: 'location', 'zone'
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The action that users can perform, based on their permission level.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly type?: ResourceSkuRestrictionsType;
+ readonly operation?: string;
/**
- * @member {string[]} [values] The value of restrictions. If the restriction
- * type is set to location. This would be different locations where the SKU
- * is restricted.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The service provider.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly values?: string[];
+ readonly provider?: string;
/**
- * @member {ResourceSkuRestrictionsReasonCode} [reasonCode] The reason for
- * restriction. Possible values include: 'QuotaId',
- * 'NotAvailableForSubscription'
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The resource on which the operation is performed.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly reasonCode?: ResourceSkuRestrictionsReasonCode;
+ readonly resource?: string;
}
-/**
- * @interface
- * An interface representing CatalogSku.
- * Details of a commitment plan SKU.
- *
- */
+/** The list of commitment plan SKUs. */
+export interface SkuListResult {
+ /** NOTE: This property will not be serialized. It can only be populated by the server. */
+ readonly value?: CatalogSku[];
+}
+
+/** Details of a commitment plan SKU. */
export interface CatalogSku {
/**
- * @member {string} [resourceType] Resource type name
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource type name
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resourceType?: string;
/**
- * @member {string} [name] SKU name
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * SKU name
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
- * @member {string} [tier] SKU tier
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * SKU tier
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly tier?: string;
/**
- * @member {string[]} [locations] Regions where the SKU is available.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Regions where the SKU is available.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly locations?: string[];
/**
- * @member {SkuCapacity} [capacity] SKU scaling information
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * SKU scaling information
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly capacity?: SkuCapacity;
/**
- * @member {SkuCapability[]} [capabilities] The capability information for
- * the specified SKU.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The capability information for the specified SKU.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly capabilities?: SkuCapability[];
/**
- * @member {SkuCost[]} [costs] The cost information for the specified SKU.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The cost information for the specified SKU.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly costs?: SkuCost[];
/**
- * @member {SkuRestrictions[]} [restrictions] Restrictions which would
- * prevent a SKU from being used. This is empty if there are no restrictions.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Restrictions which would prevent a SKU from being used. This is empty if there are no restrictions.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly restrictions?: SkuRestrictions[];
}
-/**
- * @interface
- * An interface representing Resource.
- * Common properties of an ARM resource.
- *
- * @extends BaseResource
- */
-export interface Resource extends BaseResource {
- /**
- * @member {string} [id] Resource Id.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly id?: string;
+/** Describes scaling information of a SKU. */
+export interface SkuCapacity {
/**
- * @member {string} [name] Resource name.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The minimum capacity.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly name?: string;
+ readonly minimum?: number;
/**
- * @member {string} location Resource location.
+ * The maximum capacity that can be set.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- location: string;
+ readonly maximum?: number;
/**
- * @member {string} [type] Resource type.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The default capacity.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly type?: string;
+ readonly default?: number;
/**
- * @member {{ [propertyName: string]: string }} [tags] User-defined tags for
- * the resource.
+ * The scale type applicable to the sku.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- tags?: { [propertyName: string]: string };
+ readonly scaleType?: SkuCapacityScaleType;
}
-/**
- * @interface
- * An interface representing CommitmentAssociationProperties.
- * Properties of an Azure ML commitment association.
- *
- */
-export interface CommitmentAssociationProperties {
- /**
- * @member {string} [associatedResourceId] The ID of the resource this
- * association points to, such as the ARM ID of an Azure ML web service.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly associatedResourceId?: string;
+/** Describes The SKU capabilities object. */
+export interface SkuCapability {
/**
- * @member {string} [commitmentPlanId] The ARM ID of the parent Azure ML
- * commitment plan.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The capability name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly commitmentPlanId?: string;
+ readonly name?: string;
/**
- * @member {Date} [creationDate] The date at which this commitment
- * association was created, in ISO 8601 format.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The capability value.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly creationDate?: Date;
+ readonly value?: string;
}
-/**
- * @interface
- * An interface representing CommitmentAssociation.
- * Represents the association between a commitment plan and some other
- * resource, such as a Machine Learning web service.
- *
- * @extends Resource
- */
-export interface CommitmentAssociation extends Resource {
+/** Describes metadata for SKU cost info. */
+export interface SkuCost {
/**
- * @member {string} [etag] An entity tag used to enforce optimistic
- * concurrency.
+ * The meter used for this part of a SKU's cost.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- etag?: string;
+ readonly meterID?: string;
/**
- * @member {CommitmentAssociationProperties} [properties] The properties of
- * the commitment association resource.
+ * The multiplier for the meter ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- properties?: CommitmentAssociationProperties;
+ readonly quantity?: number;
+ /**
+ * The overall duration represented by the quantity.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly extendedUnit?: string;
}
-/**
- * @interface
- * An interface representing ResourceSku.
- * The SKU of a resource.
- *
- */
-export interface ResourceSku {
+/** Describes restrictions which would prevent a SKU from being used. */
+export interface SkuRestrictions {
/**
- * @member {number} [capacity] The scale-out capacity of the resource. 1 is
- * 1x, 2 is 2x, etc. This impacts the quantities and cost of any commitment
- * plan resource.
+ * The type of restrictions.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- capacity?: number;
+ readonly type?: ResourceSkuRestrictionsType;
/**
- * @member {string} [name] The SKU name. Along with tier, uniquely identifies
- * the SKU.
+ * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- name?: string;
+ readonly values?: string[];
/**
- * @member {string} [tier] The SKU tier. Along with name, uniquely identifies
- * the SKU.
+ * The reason for restriction.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- tier?: string;
+ readonly reasonCode?: ResourceSkuRestrictionsReasonCode;
}
-/**
- * @interface
- * An interface representing MoveCommitmentAssociationRequest.
- * Specifies the destination Azure ML commitment plan for a move operation.
- *
- */
-export interface MoveCommitmentAssociationRequest {
+/** Properties of an Azure ML commitment association. */
+export interface CommitmentAssociationProperties {
/**
- * @member {string} [destinationPlanId] The ARM ID of the commitment plan to
- * re-parent the commitment association to.
+ * The ID of the resource this association points to, such as the ARM ID of an Azure ML web service.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- destinationPlanId?: string;
-}
-
-/**
- * @interface
- * An interface representing CommitmentPlanPatchPayload.
- * The properties of a commitment plan which may be updated via PATCH.
- *
- */
-export interface CommitmentPlanPatchPayload {
+ readonly associatedResourceId?: string;
/**
- * @member {{ [propertyName: string]: string }} [tags] User-defined tags for
- * the commitment plan.
+ * The ARM ID of the parent Azure ML commitment plan.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- tags?: { [propertyName: string]: string };
+ readonly commitmentPlanId?: string;
/**
- * @member {ResourceSku} [sku] The commitment plan SKU.
+ * The date at which this commitment association was created, in ISO 8601 format.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- sku?: ResourceSku;
+ readonly creationDate?: Date;
}
-/**
- * @interface
- * An interface representing PlanQuantity.
- * Represents the quantity a commitment plan provides of a metered resource.
- *
- */
-export interface PlanQuantity {
+/** Common properties of an ARM resource. */
+export interface Resource {
/**
- * @member {number} [allowance] The quantity added to the commitment plan at
- * an interval specified by its allowance frequency.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource Id.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly allowance?: number;
- /**
- * @member {number} [amount] The quantity available to the plan the last time
- * usage was calculated.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
- */
- readonly amount?: number;
+ readonly id?: string;
/**
- * @member {string} [includedQuantityMeter] The Azure meter for usage against
- * included quantities.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly includedQuantityMeter?: string;
+ readonly name?: string;
+ /** Resource location. */
+ location: string;
/**
- * @member {string} [overageMeter] The Azure meter for usage which exceeds
- * included quantities.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Resource type.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly overageMeter?: string;
+ readonly type?: string;
+ /** User-defined tags for the resource. */
+ tags?: { [propertyName: string]: string };
}
-/**
- * @interface
- * An interface representing CommitmentPlanProperties.
- * Properties of an Azure ML commitment plan.
- *
- */
+/** A page of commitment association resources. */
+export interface CommitmentAssociationListResult {
+ /** A URI to retrieve the next page of results. */
+ nextLink?: string;
+ /** The set of results for this page. */
+ value?: CommitmentAssociation[];
+}
+
+/** Specifies the destination Azure ML commitment plan for a move operation. */
+export interface MoveCommitmentAssociationRequest {
+ /** The ARM ID of the commitment plan to re-parent the commitment association to. */
+ destinationPlanId?: string;
+}
+
+/** Properties of an Azure ML commitment plan. */
export interface CommitmentPlanProperties {
/**
- * @member {boolean} [chargeForOverage] Indicates whether usage beyond the
- * commitment plan's included quantities will be charged.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Indicates whether usage beyond the commitment plan's included quantities will be charged.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly chargeForOverage?: boolean;
/**
- * @member {boolean} [chargeForPlan] Indicates whether the commitment plan
- * will incur a charge.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Indicates whether the commitment plan will incur a charge.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly chargeForPlan?: boolean;
/**
- * @member {Date} [creationDate] The date at which this commitment plan was
- * created, in ISO 8601 format.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The date at which this commitment plan was created, in ISO 8601 format.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly creationDate?: Date;
/**
- * @member {{ [propertyName: string]: PlanQuantity }} [includedQuantities]
* The included resource quantities this plan gives you.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly includedQuantities?: { [propertyName: string]: PlanQuantity };
/**
- * @member {number} [maxAssociationLimit] The maximum number of commitment
- * associations that can be children of this commitment plan.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The maximum number of commitment associations that can be children of this commitment plan.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maxAssociationLimit?: number;
/**
- * @member {number} [maxCapacityLimit] The maximum scale-out capacity for
- * this commitment plan.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The maximum scale-out capacity for this commitment plan.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maxCapacityLimit?: number;
/**
- * @member {number} [minCapacityLimit] The minimum scale-out capacity for
- * this commitment plan.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The minimum scale-out capacity for this commitment plan.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly minCapacityLimit?: number;
/**
- * @member {string} [planMeter] The Azure meter which will be used to charge
- * for this commitment plan.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The Azure meter which will be used to charge for this commitment plan.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly planMeter?: string;
/**
- * @member {number} [refillFrequencyInDays] The frequency at which this
- * commitment plan's included quantities are refilled.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The frequency at which this commitment plan's included quantities are refilled.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly refillFrequencyInDays?: number;
/**
- * @member {boolean} [suspendPlanOnOverage] Indicates whether this commitment
- * plan will be moved into a suspended state if usage goes beyond the
- * commitment plan's included quantities.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * Indicates whether this commitment plan will be moved into a suspended state if usage goes beyond the commitment plan's included quantities.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly suspendPlanOnOverage?: boolean;
}
-/**
- * @interface
- * An interface representing CommitmentPlan.
- * An Azure ML commitment plan resource.
- *
- * @extends Resource
- */
-export interface CommitmentPlan extends Resource {
+/** Represents the quantity a commitment plan provides of a metered resource. */
+export interface PlanQuantity {
/**
- * @member {string} [etag] An entity tag used to enforce optimistic
- * concurrency.
+ * The quantity added to the commitment plan at an interval specified by its allowance frequency.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- etag?: string;
+ readonly allowance?: number;
/**
- * @member {CommitmentPlanProperties} [properties] The commitment plan
- * properties.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * The quantity available to the plan the last time usage was calculated.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly properties?: CommitmentPlanProperties;
+ readonly amount?: number;
/**
- * @member {ResourceSku} [sku] The commitment plan SKU.
+ * The Azure meter for usage against included quantities.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
+ readonly includedQuantityMeter?: string;
+ /**
+ * The Azure meter for usage which exceeds included quantities.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly overageMeter?: string;
+}
+
+/** The SKU of a resource. */
+export interface ResourceSku {
+ /** The scale-out capacity of the resource. 1 is 1x, 2 is 2x, etc. This impacts the quantities and cost of any commitment plan resource. */
+ capacity?: number;
+ /** The SKU name. Along with tier, uniquely identifies the SKU. */
+ name?: string;
+ /** The SKU tier. Along with name, uniquely identifies the SKU. */
+ tier?: string;
+}
+
+/** The properties of a commitment plan which may be updated via PATCH. */
+export interface CommitmentPlanPatchPayload {
+ /** User-defined tags for the commitment plan. */
+ tags?: { [propertyName: string]: string };
+ /** The commitment plan SKU. */
sku?: ResourceSku;
}
-/**
- * @interface
- * An interface representing PlanUsageHistory.
- * Represents historical information about usage of the Azure resources
- * associated with a commitment plan.
- *
- */
+/** A page of commitment plan resources. */
+export interface CommitmentPlanListResult {
+ /** A URI to retrieve the next page of results. */
+ nextLink?: string;
+ /** The set of results for this page. */
+ value?: CommitmentPlan[];
+}
+
+/** A page of usage history. */
+export interface PlanUsageHistoryListResult {
+ /** A URI to retrieve the next page of results. */
+ nextLink?: string;
+ /** The set of results for this page. */
+ value?: PlanUsageHistory[];
+}
+
+/** Represents historical information about usage of the Azure resources associated with a commitment plan. */
export interface PlanUsageHistory {
- /**
- * @member {{ [propertyName: string]: number }} [planDeletionOverage] Overage
- * incurred as a result of deleting a commitment plan.
- */
+ /** Overage incurred as a result of deleting a commitment plan. */
planDeletionOverage?: { [propertyName: string]: number };
- /**
- * @member {{ [propertyName: string]: number }} [planMigrationOverage]
- * Overage incurred as a result of migrating a commitment plan from one SKU
- * to another.
- */
+ /** Overage incurred as a result of migrating a commitment plan from one SKU to another. */
planMigrationOverage?: { [propertyName: string]: number };
- /**
- * @member {{ [propertyName: string]: number }} [planQuantitiesAfterUsage]
- * Included quantities remaining after usage against the commitment plan's
- * associated resources was calculated.
- */
+ /** Included quantities remaining after usage against the commitment plan's associated resources was calculated. */
planQuantitiesAfterUsage?: { [propertyName: string]: number };
- /**
- * @member {{ [propertyName: string]: number }} [planQuantitiesBeforeUsage]
- * Included quantities remaining before usage against the commitment plan's
- * associated resources was calculated.
- */
+ /** Included quantities remaining before usage against the commitment plan's associated resources was calculated. */
planQuantitiesBeforeUsage?: { [propertyName: string]: number };
- /**
- * @member {{ [propertyName: string]: number }} [planUsageOverage] Usage
- * against the commitment plan's associated resources which was not covered
- * by included quantities and is therefore overage.
- */
+ /** Usage against the commitment plan's associated resources which was not covered by included quantities and is therefore overage. */
planUsageOverage?: { [propertyName: string]: number };
- /**
- * @member {{ [propertyName: string]: number }} [usage] Usage against the
- * commitment plan's associated resources.
- */
+ /** Usage against the commitment plan's associated resources. */
usage?: { [propertyName: string]: number };
- /**
- * @member {Date} [usageDate] The date of usage, in ISO 8601 format.
- */
+ /** The date of usage, in ISO 8601 format. */
usageDate?: Date;
}
-/**
- * @interface
- * An interface representing CommitmentAssociationsListOptionalParams.
- * Optional Parameters.
- *
- * @extends RequestOptionsBase
- */
-export interface CommitmentAssociationsListOptionalParams extends msRest.RequestOptionsBase {
+/** Represents the association between a commitment plan and some other resource, such as a Machine Learning web service. */
+export type CommitmentAssociation = Resource & {
+ /** An entity tag used to enforce optimistic concurrency. */
+ etag?: string;
+ /** The properties of the commitment association resource. */
+ properties?: CommitmentAssociationProperties;
+};
+
+/** An Azure ML commitment plan resource. */
+export type CommitmentPlan = Resource & {
+ /** An entity tag used to enforce optimistic concurrency. */
+ etag?: string;
/**
- * @member {string} [skipToken] Continuation token for pagination.
+ * The commitment plan properties.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- skipToken?: string;
+ readonly properties?: CommitmentPlanProperties;
+ /** The commitment plan SKU. */
+ sku?: ResourceSku;
+};
+
+/** Known values of {@link SkuCapacityScaleType} that the service accepts. */
+export enum KnownSkuCapacityScaleType {
+ Automatic = "Automatic",
+ Manual = "Manual",
+ None = "None"
}
/**
- * @interface
- * An interface representing CommitmentPlansListOptionalParams.
- * Optional Parameters.
- *
- * @extends RequestOptionsBase
+ * Defines values for SkuCapacityScaleType. \
+ * {@link KnownSkuCapacityScaleType} can be used interchangeably with SkuCapacityScaleType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **Automatic** \
+ * **Manual** \
+ * **None**
*/
-export interface CommitmentPlansListOptionalParams extends msRest.RequestOptionsBase {
- /**
- * @member {string} [skipToken] Continuation token for pagination.
- */
- skipToken?: string;
+export type SkuCapacityScaleType = string;
+
+/** Known values of {@link ResourceSkuRestrictionsType} that the service accepts. */
+export enum KnownResourceSkuRestrictionsType {
+ Location = "location",
+ Zone = "zone"
}
/**
- * @interface
- * An interface representing CommitmentPlansListInResourceGroupOptionalParams.
- * Optional Parameters.
- *
- * @extends RequestOptionsBase
+ * Defines values for ResourceSkuRestrictionsType. \
+ * {@link KnownResourceSkuRestrictionsType} can be used interchangeably with ResourceSkuRestrictionsType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **location** \
+ * **zone**
*/
-export interface CommitmentPlansListInResourceGroupOptionalParams extends msRest.RequestOptionsBase {
- /**
- * @member {string} [skipToken] Continuation token for pagination.
- */
- skipToken?: string;
+export type ResourceSkuRestrictionsType = string;
+
+/** Known values of {@link ResourceSkuRestrictionsReasonCode} that the service accepts. */
+export enum KnownResourceSkuRestrictionsReasonCode {
+ QuotaId = "QuotaId",
+ NotAvailableForSubscription = "NotAvailableForSubscription"
}
/**
- * @interface
- * An interface representing UsageHistoryListOptionalParams.
- * Optional Parameters.
- *
- * @extends RequestOptionsBase
+ * Defines values for ResourceSkuRestrictionsReasonCode. \
+ * {@link KnownResourceSkuRestrictionsReasonCode} can be used interchangeably with ResourceSkuRestrictionsReasonCode,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **QuotaId** \
+ * **NotAvailableForSubscription**
*/
-export interface UsageHistoryListOptionalParams extends msRest.RequestOptionsBase {
- /**
- * @member {string} [skipToken] Continuation token for pagination.
- */
+export type ResourceSkuRestrictionsReasonCode = string;
+
+/** Optional parameters. */
+export interface OperationsListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type OperationsListResponse = OperationEntityListResult;
+
+/** Optional parameters. */
+export interface SkusListOptionalParams extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type SkusListResponse = SkuListResult;
+
+/** Optional parameters. */
+export interface CommitmentAssociationsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type CommitmentAssociationsGetResponse = CommitmentAssociation;
+
+/** Optional parameters. */
+export interface CommitmentAssociationsListOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
skipToken?: string;
}
-/**
- * @interface
- * An interface representing AzureMLCommitmentPlansManagementClientOptions.
- * @extends AzureServiceClientOptions
- */
-export interface AzureMLCommitmentPlansManagementClientOptions extends AzureServiceClientOptions {
- /**
- * @member {string} [baseUri]
- */
- baseUri?: string;
-}
+/** Contains response data for the list operation. */
+export type CommitmentAssociationsListResponse = CommitmentAssociationListResult;
+/** Optional parameters. */
+export interface CommitmentAssociationsMoveOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * @interface
- * An interface representing the SkuListResult.
- * The list of commitment plan SKUs.
- *
- * @extends Array
- */
-export interface SkuListResult extends Array {
-}
+/** Contains response data for the move operation. */
+export type CommitmentAssociationsMoveResponse = CommitmentAssociation;
-/**
- * @interface
- * An interface representing the CommitmentAssociationListResult.
- * A page of commitment association resources.
- *
- * @extends Array
- */
-export interface CommitmentAssociationListResult extends Array {
- /**
- * @member {string} [nextLink] A URI to retrieve the next page of results.
- */
- nextLink?: string;
+/** Optional parameters. */
+export interface CommitmentAssociationsListNextOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
}
-/**
- * @interface
- * An interface representing the CommitmentPlanListResult.
- * A page of commitment plan resources.
- *
- * @extends Array
- */
-export interface CommitmentPlanListResult extends Array {
- /**
- * @member {string} [nextLink] A URI to retrieve the next page of results.
- */
- nextLink?: string;
-}
+/** Contains response data for the listNext operation. */
+export type CommitmentAssociationsListNextResponse = CommitmentAssociationListResult;
-/**
- * @interface
- * An interface representing the PlanUsageHistoryListResult.
- * A page of usage history.
- *
- * @extends Array
- */
-export interface PlanUsageHistoryListResult extends Array {
- /**
- * @member {string} [nextLink] A URI to retrieve the next page of results.
- */
- nextLink?: string;
-}
+/** Optional parameters. */
+export interface CommitmentPlansGetOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for SkuCapacityScaleType.
- * Possible values include: 'Automatic', 'Manual', 'None'
- * @readonly
- * @enum {string}
- */
-export type SkuCapacityScaleType = 'Automatic' | 'Manual' | 'None';
+/** Contains response data for the get operation. */
+export type CommitmentPlansGetResponse = CommitmentPlan;
-/**
- * Defines values for ResourceSkuRestrictionsType.
- * Possible values include: 'location', 'zone'
- * @readonly
- * @enum {string}
- */
-export type ResourceSkuRestrictionsType = 'location' | 'zone';
+/** Optional parameters. */
+export interface CommitmentPlansCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for ResourceSkuRestrictionsReasonCode.
- * Possible values include: 'QuotaId', 'NotAvailableForSubscription'
- * @readonly
- * @enum {string}
- */
-export type ResourceSkuRestrictionsReasonCode = 'QuotaId' | 'NotAvailableForSubscription';
+/** Contains response data for the createOrUpdate operation. */
+export type CommitmentPlansCreateOrUpdateResponse = CommitmentPlan;
-/**
- * Contains response data for the list operation.
- */
-export type SkusListResponse = SkuListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: SkuListResult;
- };
-};
+/** Optional parameters. */
+export interface CommitmentPlansRemoveOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the get operation.
- */
-export type CommitmentAssociationsGetResponse = CommitmentAssociation & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentAssociation;
- };
-};
+/** Optional parameters. */
+export interface CommitmentPlansPatchOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type CommitmentAssociationsListResponse = CommitmentAssociationListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentAssociationListResult;
- };
-};
+/** Contains response data for the patch operation. */
+export type CommitmentPlansPatchResponse = CommitmentPlan;
-/**
- * Contains response data for the move operation.
- */
-export type CommitmentAssociationsMoveResponse = CommitmentAssociation & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentAssociation;
- };
-};
+/** Optional parameters. */
+export interface CommitmentPlansListOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
+}
-/**
- * Contains response data for the listNext operation.
- */
-export type CommitmentAssociationsListNextResponse = CommitmentAssociationListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentAssociationListResult;
- };
-};
+/** Contains response data for the list operation. */
+export type CommitmentPlansListResponse = CommitmentPlanListResult;
-/**
- * Contains response data for the get operation.
- */
-export type CommitmentPlansGetResponse = CommitmentPlan & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlan;
- };
-};
+/** Optional parameters. */
+export interface CommitmentPlansListInResourceGroupOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
+}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type CommitmentPlansCreateOrUpdateResponse = CommitmentPlan & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlan;
- };
-};
+/** Contains response data for the listInResourceGroup operation. */
+export type CommitmentPlansListInResourceGroupResponse = CommitmentPlanListResult;
-/**
- * Contains response data for the patch operation.
- */
-export type CommitmentPlansPatchResponse = CommitmentPlan & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlan;
- };
-};
+/** Optional parameters. */
+export interface CommitmentPlansListNextOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
+}
-/**
- * Contains response data for the list operation.
- */
-export type CommitmentPlansListResponse = CommitmentPlanListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlanListResult;
- };
-};
+/** Contains response data for the listNext operation. */
+export type CommitmentPlansListNextResponse = CommitmentPlanListResult;
-/**
- * Contains response data for the listInResourceGroup operation.
- */
-export type CommitmentPlansListInResourceGroupResponse = CommitmentPlanListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlanListResult;
- };
-};
+/** Optional parameters. */
+export interface CommitmentPlansListInResourceGroupNextOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
+}
-/**
- * Contains response data for the listNext operation.
- */
-export type CommitmentPlansListNextResponse = CommitmentPlanListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlanListResult;
- };
-};
+/** Contains response data for the listInResourceGroupNext operation. */
+export type CommitmentPlansListInResourceGroupNextResponse = CommitmentPlanListResult;
-/**
- * Contains response data for the listInResourceGroupNext operation.
- */
-export type CommitmentPlansListInResourceGroupNextResponse = CommitmentPlanListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: CommitmentPlanListResult;
- };
-};
+/** Optional parameters. */
+export interface UsageHistoryListOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
+}
-/**
- * Contains response data for the list operation.
- */
-export type UsageHistoryListResponse = PlanUsageHistoryListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: PlanUsageHistoryListResult;
- };
-};
+/** Contains response data for the list operation. */
+export type UsageHistoryListResponse = PlanUsageHistoryListResult;
-/**
- * Contains response data for the listNext operation.
- */
-export type UsageHistoryListNextResponse = PlanUsageHistoryListResult & {
- /**
- * The underlying HTTP response.
- */
- _response: msRest.HttpResponse & {
- /**
- * The response body as text (string format)
- */
- bodyAsText: string;
- /**
- * The response body as parsed JSON or XML
- */
- parsedBody: PlanUsageHistoryListResult;
- };
-};
+/** Optional parameters. */
+export interface UsageHistoryListNextOptionalParams
+ extends coreClient.OperationOptions {
+ /** Continuation token for pagination. */
+ skipToken?: string;
+}
+
+/** Contains response data for the listNext operation. */
+export type UsageHistoryListNextResponse = PlanUsageHistoryListResult;
+
+/** Optional parameters. */
+export interface AzureMLCommitmentPlansManagementClientOptionalParams
+ extends coreClient.ServiceClientOptions {
+ /** server parameter */
+ $host?: string;
+ /** Api Version */
+ apiVersion?: string;
+ /** Overrides client endpoint. */
+ endpoint?: string;
+}
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/mappers.ts b/sdk/machinelearning/arm-commitmentplans/src/models/mappers.ts
index 544de96c3b7a..2b47942b34da 100644
--- a/sdk/machinelearning/arm-commitmentplans/src/models/mappers.ts
+++ b/sdk/machinelearning/arm-commitmentplans/src/models/mappers.ts
@@ -1,104 +1,87 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export const CloudError = CloudErrorMapper;
-export const BaseResource = BaseResourceMapper;
-
-export const SkuCapacity: msRest.CompositeMapper = {
- serializedName: "SkuCapacity",
+export const OperationEntityListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SkuCapacity",
+ className: "OperationEntityListResult",
modelProperties: {
- minimum: {
- readOnly: true,
- serializedName: "minimum",
- type: {
- name: "Number"
- }
- },
- maximum: {
- readOnly: true,
- serializedName: "maximum",
- type: {
- name: "Number"
- }
- },
- default: {
- readOnly: true,
- serializedName: "default",
- type: {
- name: "Number"
- }
- },
- scaleType: {
+ value: {
+ serializedName: "value",
readOnly: true,
- serializedName: "scaleType",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "OperationEntity"
+ }
+ }
}
}
}
}
};
-export const SkuCapability: msRest.CompositeMapper = {
- serializedName: "SkuCapability",
+export const OperationEntity: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SkuCapability",
+ className: "OperationEntity",
modelProperties: {
name: {
- readOnly: true,
serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
- value: {
- readOnly: true,
- serializedName: "value",
+ display: {
+ serializedName: "display",
type: {
- name: "String"
+ name: "Composite",
+ className: "OperationDisplayInfo"
}
}
}
}
};
-export const SkuCost: msRest.CompositeMapper = {
- serializedName: "SkuCost",
+export const OperationDisplayInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SkuCost",
+ className: "OperationDisplayInfo",
modelProperties: {
- meterID: {
+ description: {
+ serializedName: "description",
readOnly: true,
- serializedName: "meterID",
type: {
name: "String"
}
},
- quantity: {
+ operation: {
+ serializedName: "operation",
readOnly: true,
- serializedName: "quantity",
type: {
- name: "Number"
+ name: "String"
}
},
- extendedUnit: {
+ provider: {
+ serializedName: "provider",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "resource",
readOnly: true,
- serializedName: "extendedUnit",
type: {
name: "String"
}
@@ -107,72 +90,57 @@ export const SkuCost: msRest.CompositeMapper = {
}
};
-export const SkuRestrictions: msRest.CompositeMapper = {
- serializedName: "SkuRestrictions",
+export const SkuListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SkuRestrictions",
+ className: "SkuListResult",
modelProperties: {
- type: {
- readOnly: true,
- serializedName: "type",
- type: {
- name: "String"
- }
- },
- values: {
+ value: {
+ serializedName: "value",
readOnly: true,
- serializedName: "values",
type: {
name: "Sequence",
element: {
type: {
- name: "String"
+ name: "Composite",
+ className: "CatalogSku"
}
}
}
- },
- reasonCode: {
- readOnly: true,
- serializedName: "reasonCode",
- type: {
- name: "String"
- }
}
}
}
};
-export const CatalogSku: msRest.CompositeMapper = {
- serializedName: "CatalogSku",
+export const CatalogSku: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "CatalogSku",
modelProperties: {
resourceType: {
- readOnly: true,
serializedName: "resourceType",
+ readOnly: true,
type: {
name: "String"
}
},
name: {
- readOnly: true,
serializedName: "name",
+ readOnly: true,
type: {
name: "String"
}
},
tier: {
- readOnly: true,
serializedName: "tier",
+ readOnly: true,
type: {
name: "String"
}
},
locations: {
- readOnly: true,
serializedName: "locations",
+ readOnly: true,
type: {
name: "Sequence",
element: {
@@ -183,7 +151,6 @@ export const CatalogSku: msRest.CompositeMapper = {
}
},
capacity: {
- readOnly: true,
serializedName: "capacity",
type: {
name: "Composite",
@@ -191,8 +158,8 @@ export const CatalogSku: msRest.CompositeMapper = {
}
},
capabilities: {
- readOnly: true,
serializedName: "capabilities",
+ readOnly: true,
type: {
name: "Sequence",
element: {
@@ -204,8 +171,8 @@ export const CatalogSku: msRest.CompositeMapper = {
}
},
costs: {
- readOnly: true,
serializedName: "costs",
+ readOnly: true,
type: {
name: "Sequence",
element: {
@@ -217,8 +184,8 @@ export const CatalogSku: msRest.CompositeMapper = {
}
},
restrictions: {
- readOnly: true,
serializedName: "restrictions",
+ readOnly: true,
type: {
name: "Sequence",
element: {
@@ -233,130 +200,88 @@ export const CatalogSku: msRest.CompositeMapper = {
}
};
-export const Resource: msRest.CompositeMapper = {
- serializedName: "Resource",
+export const SkuCapacity: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Resource",
+ className: "SkuCapacity",
modelProperties: {
- id: {
+ minimum: {
+ serializedName: "minimum",
readOnly: true,
- serializedName: "id",
type: {
- name: "String"
+ name: "Number"
}
},
- name: {
+ maximum: {
+ serializedName: "maximum",
readOnly: true,
- serializedName: "name",
type: {
- name: "String"
+ name: "Number"
}
},
- location: {
- required: true,
- serializedName: "location",
+ default: {
+ serializedName: "default",
+ readOnly: true,
type: {
- name: "String"
+ name: "Number"
}
},
- type: {
+ scaleType: {
+ serializedName: "scaleType",
readOnly: true,
- serializedName: "type",
type: {
name: "String"
}
- },
- tags: {
- serializedName: "tags",
- type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
- }
}
}
}
};
-export const CommitmentAssociationProperties: msRest.CompositeMapper = {
- serializedName: "CommitmentAssociationProperties",
+export const SkuCapability: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CommitmentAssociationProperties",
+ className: "SkuCapability",
modelProperties: {
- associatedResourceId: {
+ name: {
+ serializedName: "name",
readOnly: true,
- serializedName: "associatedResourceId",
type: {
name: "String"
}
},
- commitmentPlanId: {
+ value: {
+ serializedName: "value",
readOnly: true,
- serializedName: "commitmentPlanId",
type: {
name: "String"
}
- },
- creationDate: {
- readOnly: true,
- serializedName: "creationDate",
- type: {
- name: "DateTime"
- }
}
}
}
};
-export const CommitmentAssociation: msRest.CompositeMapper = {
- serializedName: "CommitmentAssociation",
+export const SkuCost: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CommitmentAssociation",
+ className: "SkuCost",
modelProperties: {
- ...Resource.type.modelProperties,
- etag: {
- serializedName: "etag",
+ meterID: {
+ serializedName: "meterID",
+ readOnly: true,
type: {
name: "String"
}
},
- properties: {
- serializedName: "properties",
- type: {
- name: "Composite",
- className: "CommitmentAssociationProperties"
- }
- }
- }
- }
-};
-
-export const ResourceSku: msRest.CompositeMapper = {
- serializedName: "ResourceSku",
- type: {
- name: "Composite",
- className: "ResourceSku",
- modelProperties: {
- capacity: {
- serializedName: "capacity",
+ quantity: {
+ serializedName: "quantity",
+ readOnly: true,
type: {
name: "Number"
}
},
- name: {
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- tier: {
- serializedName: "tier",
+ extendedUnit: {
+ serializedName: "extendedUnit",
+ readOnly: true,
type: {
name: "String"
}
@@ -365,166 +290,229 @@ export const ResourceSku: msRest.CompositeMapper = {
}
};
-export const MoveCommitmentAssociationRequest: msRest.CompositeMapper = {
- serializedName: "MoveCommitmentAssociationRequest",
+export const SkuRestrictions: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "MoveCommitmentAssociationRequest",
+ className: "SkuRestrictions",
modelProperties: {
- destinationPlanId: {
- serializedName: "destinationPlanId",
+ type: {
+ serializedName: "type",
+ readOnly: true,
type: {
name: "String"
}
- }
- }
- }
-};
-
-export const CommitmentPlanPatchPayload: msRest.CompositeMapper = {
- serializedName: "CommitmentPlanPatchPayload",
- type: {
- name: "Composite",
- className: "CommitmentPlanPatchPayload",
- modelProperties: {
- tags: {
- serializedName: "tags",
+ },
+ values: {
+ serializedName: "values",
+ readOnly: true,
type: {
- name: "Dictionary",
- value: {
+ name: "Sequence",
+ element: {
type: {
name: "String"
}
}
}
},
- sku: {
- serializedName: "sku",
+ reasonCode: {
+ serializedName: "reasonCode",
+ readOnly: true,
type: {
- name: "Composite",
- className: "ResourceSku"
+ name: "String"
}
}
}
}
};
-export const PlanQuantity: msRest.CompositeMapper = {
- serializedName: "PlanQuantity",
+export const CommitmentAssociationProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PlanQuantity",
+ className: "CommitmentAssociationProperties",
modelProperties: {
- allowance: {
- readOnly: true,
- serializedName: "allowance",
- type: {
- name: "Number"
- }
- },
- amount: {
+ associatedResourceId: {
+ serializedName: "associatedResourceId",
readOnly: true,
- serializedName: "amount",
type: {
- name: "Number"
+ name: "String"
}
},
- includedQuantityMeter: {
+ commitmentPlanId: {
+ serializedName: "commitmentPlanId",
readOnly: true,
- serializedName: "includedQuantityMeter",
type: {
name: "String"
}
},
- overageMeter: {
+ creationDate: {
+ serializedName: "creationDate",
readOnly: true,
- serializedName: "overageMeter",
type: {
- name: "String"
+ name: "DateTime"
}
}
}
}
};
-export const CommitmentPlanProperties: msRest.CompositeMapper = {
- serializedName: "CommitmentPlanProperties",
+export const Resource: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CommitmentPlanProperties",
+ className: "Resource",
modelProperties: {
- chargeForOverage: {
+ id: {
+ serializedName: "id",
readOnly: true,
- serializedName: "chargeForOverage",
type: {
- name: "Boolean"
+ name: "String"
}
},
- chargeForPlan: {
+ name: {
+ serializedName: "name",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ location: {
+ serializedName: "location",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ serializedName: "type",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ }
+ }
+ }
+};
+
+export const CommitmentAssociationListResult: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "CommitmentAssociationListResult",
+ modelProperties: {
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "CommitmentAssociation"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MoveCommitmentAssociationRequest: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "MoveCommitmentAssociationRequest",
+ modelProperties: {
+ destinationPlanId: {
+ serializedName: "destinationPlanId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CommitmentPlanProperties: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "CommitmentPlanProperties",
+ modelProperties: {
+ chargeForOverage: {
+ serializedName: "chargeForOverage",
readOnly: true,
- serializedName: "chargeForPlan",
type: {
name: "Boolean"
}
},
- creationDate: {
+ chargeForPlan: {
+ serializedName: "chargeForPlan",
readOnly: true,
+ type: {
+ name: "Boolean"
+ }
+ },
+ creationDate: {
serializedName: "creationDate",
+ readOnly: true,
type: {
name: "DateTime"
}
},
includedQuantities: {
- readOnly: true,
serializedName: "includedQuantities",
+ readOnly: true,
type: {
name: "Dictionary",
- value: {
- type: {
- name: "Composite",
- className: "PlanQuantity"
- }
- }
+ value: { type: { name: "Composite", className: "PlanQuantity" } }
}
},
maxAssociationLimit: {
- readOnly: true,
serializedName: "maxAssociationLimit",
+ readOnly: true,
type: {
name: "Number"
}
},
maxCapacityLimit: {
- readOnly: true,
serializedName: "maxCapacityLimit",
+ readOnly: true,
type: {
name: "Number"
}
},
minCapacityLimit: {
- readOnly: true,
serializedName: "minCapacityLimit",
+ readOnly: true,
type: {
name: "Number"
}
},
planMeter: {
- readOnly: true,
serializedName: "planMeter",
+ readOnly: true,
type: {
name: "String"
}
},
refillFrequencyInDays: {
- readOnly: true,
serializedName: "refillFrequencyInDays",
+ readOnly: true,
type: {
name: "Number"
}
},
suspendPlanOnOverage: {
- readOnly: true,
serializedName: "suspendPlanOnOverage",
+ readOnly: true,
type: {
name: "Boolean"
}
@@ -533,135 +521,112 @@ export const CommitmentPlanProperties: msRest.CompositeMapper = {
}
};
-export const CommitmentPlan: msRest.CompositeMapper = {
- serializedName: "CommitmentPlan",
+export const PlanQuantity: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CommitmentPlan",
+ className: "PlanQuantity",
modelProperties: {
- ...Resource.type.modelProperties,
- etag: {
- serializedName: "etag",
+ allowance: {
+ serializedName: "allowance",
+ readOnly: true,
type: {
- name: "String"
+ name: "Number"
}
},
- properties: {
+ amount: {
+ serializedName: "amount",
readOnly: true,
- serializedName: "properties",
type: {
- name: "Composite",
- className: "CommitmentPlanProperties"
+ name: "Number"
}
},
- sku: {
- serializedName: "sku",
+ includedQuantityMeter: {
+ serializedName: "includedQuantityMeter",
+ readOnly: true,
type: {
- name: "Composite",
- className: "ResourceSku"
+ name: "String"
+ }
+ },
+ overageMeter: {
+ serializedName: "overageMeter",
+ readOnly: true,
+ type: {
+ name: "String"
}
}
}
}
};
-export const PlanUsageHistory: msRest.CompositeMapper = {
- serializedName: "PlanUsageHistory",
+export const ResourceSku: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PlanUsageHistory",
+ className: "ResourceSku",
modelProperties: {
- planDeletionOverage: {
- serializedName: "planDeletionOverage",
- type: {
- name: "Dictionary",
- value: {
- type: {
- name: "Number"
- }
- }
- }
- },
- planMigrationOverage: {
- serializedName: "planMigrationOverage",
- type: {
- name: "Dictionary",
- value: {
- type: {
- name: "Number"
- }
- }
- }
- },
- planQuantitiesAfterUsage: {
- serializedName: "planQuantitiesAfterUsage",
+ capacity: {
+ serializedName: "capacity",
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "Number"
- }
- }
+ name: "Number"
}
},
- planQuantitiesBeforeUsage: {
- serializedName: "planQuantitiesBeforeUsage",
+ name: {
+ serializedName: "name",
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "Number"
- }
- }
+ name: "String"
}
},
- planUsageOverage: {
- serializedName: "planUsageOverage",
+ tier: {
+ serializedName: "tier",
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "Number"
- }
- }
+ name: "String"
}
- },
- usage: {
- serializedName: "usage",
+ }
+ }
+ }
+};
+
+export const CommitmentPlanPatchPayload: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "CommitmentPlanPatchPayload",
+ modelProperties: {
+ tags: {
+ serializedName: "tags",
type: {
name: "Dictionary",
- value: {
- type: {
- name: "Number"
- }
- }
+ value: { type: { name: "String" } }
}
},
- usageDate: {
- serializedName: "usageDate",
+ sku: {
+ serializedName: "sku",
type: {
- name: "DateTime"
+ name: "Composite",
+ className: "ResourceSku"
}
}
}
}
};
-export const SkuListResult: msRest.CompositeMapper = {
- serializedName: "SkuListResult",
+export const CommitmentPlanListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "SkuListResult",
+ className: "CommitmentPlanListResult",
modelProperties: {
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
value: {
- readOnly: true,
- serializedName: "",
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "CatalogSku"
+ className: "CommitmentPlan"
}
}
}
@@ -670,11 +635,10 @@ export const SkuListResult: msRest.CompositeMapper = {
}
};
-export const CommitmentAssociationListResult: msRest.CompositeMapper = {
- serializedName: "CommitmentAssociationListResult",
+export const PlanUsageHistoryListResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CommitmentAssociationListResult",
+ className: "PlanUsageHistoryListResult",
modelProperties: {
nextLink: {
serializedName: "nextLink",
@@ -683,13 +647,13 @@ export const CommitmentAssociationListResult: msRest.CompositeMapper = {
}
},
value: {
- serializedName: "",
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "CommitmentAssociation"
+ className: "PlanUsageHistory"
}
}
}
@@ -698,56 +662,110 @@ export const CommitmentAssociationListResult: msRest.CompositeMapper = {
}
};
-export const CommitmentPlanListResult: msRest.CompositeMapper = {
- serializedName: "CommitmentPlanListResult",
+export const PlanUsageHistory: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CommitmentPlanListResult",
+ className: "PlanUsageHistory",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ planDeletionOverage: {
+ serializedName: "planDeletionOverage",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "Number" } }
+ }
+ },
+ planMigrationOverage: {
+ serializedName: "planMigrationOverage",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "Number" } }
+ }
+ },
+ planQuantitiesAfterUsage: {
+ serializedName: "planQuantitiesAfterUsage",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "Number" } }
+ }
+ },
+ planQuantitiesBeforeUsage: {
+ serializedName: "planQuantitiesBeforeUsage",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "Number" } }
+ }
+ },
+ planUsageOverage: {
+ serializedName: "planUsageOverage",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "Number" } }
+ }
+ },
+ usage: {
+ serializedName: "usage",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "Number" } }
+ }
+ },
+ usageDate: {
+ serializedName: "usageDate",
+ type: {
+ name: "DateTime"
+ }
+ }
+ }
+ }
+};
+
+export const CommitmentAssociation: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "CommitmentAssociation",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ etag: {
+ serializedName: "etag",
type: {
name: "String"
}
},
- value: {
- serializedName: "",
+ properties: {
+ serializedName: "properties",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "CommitmentPlan"
- }
- }
+ name: "Composite",
+ className: "CommitmentAssociationProperties"
}
}
}
}
};
-export const PlanUsageHistoryListResult: msRest.CompositeMapper = {
- serializedName: "PlanUsageHistoryListResult",
+export const CommitmentPlan: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "PlanUsageHistoryListResult",
+ className: "CommitmentPlan",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ ...Resource.type.modelProperties,
+ etag: {
+ serializedName: "etag",
type: {
name: "String"
}
},
- value: {
- serializedName: "",
+ properties: {
+ serializedName: "properties",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "PlanUsageHistory"
- }
- }
+ name: "Composite",
+ className: "CommitmentPlanProperties"
+ }
+ },
+ sku: {
+ serializedName: "sku",
+ type: {
+ name: "Composite",
+ className: "ResourceSku"
}
}
}
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/parameters.ts b/sdk/machinelearning/arm-commitmentplans/src/models/parameters.ts
index a99eab8a3293..73dec5c63f37 100644
--- a/sdk/machinelearning/arm-commitmentplans/src/models/parameters.ts
+++ b/sdk/machinelearning/arm-commitmentplans/src/models/parameters.ts
@@ -1,81 +1,104 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
+import {
+ OperationParameter,
+ OperationURLParameter,
+ OperationQueryParameter
+} from "@azure/core-client";
+import {
+ MoveCommitmentAssociationRequest as MoveCommitmentAssociationRequestMapper,
+ CommitmentPlan as CommitmentPlanMapper,
+ CommitmentPlanPatchPayload as CommitmentPlanPatchPayloadMapper
+} from "../models/mappers";
-export const acceptLanguage: msRest.OperationParameter = {
- parameterPath: "acceptLanguage",
+export const accept: OperationParameter = {
+ parameterPath: "accept",
mapper: {
- serializedName: "accept-language",
- defaultValue: 'en-US',
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Accept",
type: {
name: "String"
}
}
};
-export const apiVersion: msRest.OperationQueryParameter = {
- parameterPath: "apiVersion",
+
+export const $host: OperationURLParameter = {
+ parameterPath: "$host",
mapper: {
+ serializedName: "$host",
required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const apiVersion: OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ defaultValue: "2016-05-01-preview",
+ isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
-export const commitmentAssociationName: msRest.OperationURLParameter = {
- parameterPath: "commitmentAssociationName",
+
+export const subscriptionId: OperationURLParameter = {
+ parameterPath: "subscriptionId",
mapper: {
+ serializedName: "subscriptionId",
required: true,
- serializedName: "commitmentAssociationName",
type: {
name: "String"
}
}
};
-export const commitmentPlanName: msRest.OperationURLParameter = {
- parameterPath: "commitmentPlanName",
+
+export const resourceGroupName: OperationURLParameter = {
+ parameterPath: "resourceGroupName",
mapper: {
+ serializedName: "resourceGroupName",
required: true,
- serializedName: "commitmentPlanName",
type: {
name: "String"
}
}
};
-export const nextPageLink: msRest.OperationURLParameter = {
- parameterPath: "nextPageLink",
+
+export const commitmentPlanName: OperationURLParameter = {
+ parameterPath: "commitmentPlanName",
mapper: {
+ serializedName: "commitmentPlanName",
required: true,
- serializedName: "nextLink",
type: {
name: "String"
}
- },
- skipEncoding: true
+ }
};
-export const resourceGroupName: msRest.OperationURLParameter = {
- parameterPath: "resourceGroupName",
+
+export const commitmentAssociationName: OperationURLParameter = {
+ parameterPath: "commitmentAssociationName",
mapper: {
+ serializedName: "commitmentAssociationName",
required: true,
- serializedName: "resourceGroupName",
type: {
name: "String"
}
}
};
-export const skipToken: msRest.OperationQueryParameter = {
- parameterPath: [
- "options",
- "skipToken"
- ],
+
+export const skipToken: OperationQueryParameter = {
+ parameterPath: ["options", "skipToken"],
mapper: {
serializedName: "$skipToken",
type: {
@@ -83,13 +106,42 @@ export const skipToken: msRest.OperationQueryParameter = {
}
}
};
-export const subscriptionId: msRest.OperationURLParameter = {
- parameterPath: "subscriptionId",
+
+export const contentType: OperationParameter = {
+ parameterPath: ["options", "contentType"],
mapper: {
- required: true,
- serializedName: "subscriptionId",
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Content-Type",
type: {
name: "String"
}
}
};
+
+export const movePayload: OperationParameter = {
+ parameterPath: "movePayload",
+ mapper: MoveCommitmentAssociationRequestMapper
+};
+
+export const nextLink: OperationURLParameter = {
+ parameterPath: "nextLink",
+ mapper: {
+ serializedName: "nextLink",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const createOrUpdatePayload: OperationParameter = {
+ parameterPath: "createOrUpdatePayload",
+ mapper: CommitmentPlanMapper
+};
+
+export const patchPayload: OperationParameter = {
+ parameterPath: "patchPayload",
+ mapper: CommitmentPlanPatchPayloadMapper
+};
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/skusMappers.ts b/sdk/machinelearning/arm-commitmentplans/src/models/skusMappers.ts
deleted file mode 100644
index 0e4136b64a38..000000000000
--- a/sdk/machinelearning/arm-commitmentplans/src/models/skusMappers.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-export {
- SkuListResult,
- CatalogSku,
- SkuCapacity,
- SkuCapability,
- SkuCost,
- SkuRestrictions,
- CloudError
-} from "../models/mappers";
-
diff --git a/sdk/machinelearning/arm-commitmentplans/src/models/usageHistoryMappers.ts b/sdk/machinelearning/arm-commitmentplans/src/models/usageHistoryMappers.ts
deleted file mode 100644
index af96d4155b40..000000000000
--- a/sdk/machinelearning/arm-commitmentplans/src/models/usageHistoryMappers.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-export {
- PlanUsageHistoryListResult,
- PlanUsageHistory,
- CloudError
-} from "../models/mappers";
-
diff --git a/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentAssociations.ts b/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentAssociations.ts
index e6d63094e88f..619dfbc156e5 100644
--- a/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentAssociations.ts
+++ b/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentAssociations.ts
@@ -1,56 +1,127 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/commitmentAssociationsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { CommitmentAssociations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AzureMLCommitmentPlansManagementClientContext } from "../azureMLCommitmentPlansManagementClientContext";
+import { AzureMLCommitmentPlansManagementClient } from "../azureMLCommitmentPlansManagementClient";
+import {
+ CommitmentAssociation,
+ CommitmentAssociationsListNextOptionalParams,
+ CommitmentAssociationsListOptionalParams,
+ CommitmentAssociationsGetOptionalParams,
+ CommitmentAssociationsGetResponse,
+ CommitmentAssociationsListResponse,
+ MoveCommitmentAssociationRequest,
+ CommitmentAssociationsMoveOptionalParams,
+ CommitmentAssociationsMoveResponse,
+ CommitmentAssociationsListNextResponse
+} from "../models";
-/** Class representing a CommitmentAssociations. */
-export class CommitmentAssociations {
- private readonly client: AzureMLCommitmentPlansManagementClientContext;
+///
+/** Class containing CommitmentAssociations operations. */
+export class CommitmentAssociationsImpl implements CommitmentAssociations {
+ private readonly client: AzureMLCommitmentPlansManagementClient;
/**
- * Create a CommitmentAssociations.
- * @param {AzureMLCommitmentPlansManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class CommitmentAssociations class.
+ * @param client Reference to the service client
*/
- constructor(client: AzureMLCommitmentPlansManagementClientContext) {
+ constructor(client: AzureMLCommitmentPlansManagementClient) {
this.client = client;
}
/**
- * Get a commitment association.
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param commitmentAssociationName The commitment association name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
+ * Get all commitment associations for a parent commitment plan.
* @param resourceGroupName The resource group name.
* @param commitmentPlanName The Azure ML commitment plan name.
- * @param commitmentAssociationName The commitment association name.
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, callback: msRest.ServiceCallback): void;
+ public list(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ options?: CommitmentAssociationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(
+ resourceGroupName,
+ commitmentPlanName,
+ options
+ );
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(
+ resourceGroupName,
+ commitmentPlanName,
+ options
+ );
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ options?: CommitmentAssociationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(
+ resourceGroupName,
+ commitmentPlanName,
+ options
+ );
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(
+ resourceGroupName,
+ commitmentPlanName,
+ continuationToken,
+ options
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ options?: CommitmentAssociationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(
+ resourceGroupName,
+ commitmentPlanName,
+ options
+ )) {
+ yield* page;
+ }
+ }
+
/**
+ * Get a commitment association.
* @param resourceGroupName The resource group name.
* @param commitmentPlanName The Azure ML commitment plan name.
* @param commitmentAssociationName The commitment association name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ commitmentAssociationName: string,
+ options?: CommitmentAssociationsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
{
resourceGroupName,
@@ -58,40 +129,25 @@ export class CommitmentAssociations {
commitmentAssociationName,
options
},
- getOperationSpec,
- callback) as Promise;
+ getOperationSpec
+ );
}
/**
* Get all commitment associations for a parent commitment plan.
* @param resourceGroupName The resource group name.
* @param commitmentPlanName The Azure ML commitment plan name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- list(resourceGroupName: string, commitmentPlanName: string, options?: Models.CommitmentAssociationsListOptionalParams): Promise;
- /**
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param callback The callback
+ * @param options The options parameters.
*/
- list(resourceGroupName: string, commitmentPlanName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param options The optional parameters
- * @param callback The callback
- */
- list(resourceGroupName: string, commitmentPlanName: string, options: Models.CommitmentAssociationsListOptionalParams, callback: msRest.ServiceCallback): void;
- list(resourceGroupName: string, commitmentPlanName: string, options?: Models.CommitmentAssociationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _list(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ options?: CommitmentAssociationsListOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroupName,
- commitmentPlanName,
- options
- },
- listOperationSpec,
- callback) as Promise;
+ { resourceGroupName, commitmentPlanName, options },
+ listOperationSpec
+ );
}
/**
@@ -100,28 +156,15 @@ export class CommitmentAssociations {
* @param commitmentPlanName The Azure ML commitment plan name.
* @param commitmentAssociationName The commitment association name.
* @param movePayload The move request payload.
- * @param [options] The optional parameters
- * @returns Promise
- */
- move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: Models.MoveCommitmentAssociationRequest, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param commitmentAssociationName The commitment association name.
- * @param movePayload The move request payload.
- * @param callback The callback
- */
- move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: Models.MoveCommitmentAssociationRequest, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param commitmentAssociationName The commitment association name.
- * @param movePayload The move request payload.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: Models.MoveCommitmentAssociationRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: Models.MoveCommitmentAssociationRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ move(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ commitmentAssociationName: string,
+ movePayload: MoveCommitmentAssociationRequest,
+ options?: CommitmentAssociationsMoveOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
{
resourceGroupName,
@@ -130,143 +173,109 @@ export class CommitmentAssociations {
movePayload,
options
},
- moveOperationSpec,
- callback) as Promise;
+ moveOperationSpec
+ );
}
/**
- * Get all commitment associations for a parent commitment plan.
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param [options] The optional parameters
- * @returns Promise
- */
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param callback The callback
- */
- listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
- /**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param resourceGroupName The resource group name.
+ * @param commitmentPlanName The Azure ML commitment plan name.
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ nextLink: string,
+ options?: CommitmentAssociationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { resourceGroupName, commitmentPlanName, nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const getOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.CommitmentAssociation
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.commitmentPlanName,
Parameters.commitmentAssociationName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations",
+ httpMethod: "GET",
responses: {
200: {
- bodyMapper: Mappers.CommitmentAssociation
- },
- default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.CommitmentAssociationListResult
}
},
- serializer
-};
-
-const listOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations",
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.commitmentPlanName
],
- queryParameters: [
- Parameters.skipToken,
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const moveOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}/move",
+ httpMethod: "POST",
responses: {
200: {
- bodyMapper: Mappers.CommitmentAssociationListResult
- },
- default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.CommitmentAssociation
}
},
- serializer
-};
-
-const moveOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}/move",
+ requestBody: Parameters.movePayload,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.commitmentPlanName,
Parameters.commitmentAssociationName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "movePayload",
- mapper: {
- ...Mappers.MoveCommitmentAssociationRequest,
- required: true
- }
- },
- responses: {
- 200: {
- bodyMapper: Mappers.CommitmentAssociation
- },
- default: {
- bodyMapper: Mappers.CloudError
- }
- },
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.CommitmentAssociationListResult
- },
- default: {
- bodyMapper: Mappers.CloudError
}
},
+ queryParameters: [Parameters.apiVersion, Parameters.skipToken],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.commitmentPlanName,
+ Parameters.nextLink
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentPlans.ts b/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentPlans.ts
index d5c9807742e3..05c83c93d35b 100644
--- a/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentPlans.ts
+++ b/sdk/machinelearning/arm-commitmentplans/src/operations/commitmentPlans.ts
@@ -1,483 +1,420 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/commitmentPlansMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { CommitmentPlans } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AzureMLCommitmentPlansManagementClientContext } from "../azureMLCommitmentPlansManagementClientContext";
+import { AzureMLCommitmentPlansManagementClient } from "../azureMLCommitmentPlansManagementClient";
+import {
+ CommitmentPlan,
+ CommitmentPlansListNextOptionalParams,
+ CommitmentPlansListOptionalParams,
+ CommitmentPlansListInResourceGroupNextOptionalParams,
+ CommitmentPlansListInResourceGroupOptionalParams,
+ CommitmentPlansGetOptionalParams,
+ CommitmentPlansGetResponse,
+ CommitmentPlansCreateOrUpdateOptionalParams,
+ CommitmentPlansCreateOrUpdateResponse,
+ CommitmentPlansRemoveOptionalParams,
+ CommitmentPlanPatchPayload,
+ CommitmentPlansPatchOptionalParams,
+ CommitmentPlansPatchResponse,
+ CommitmentPlansListResponse,
+ CommitmentPlansListInResourceGroupResponse,
+ CommitmentPlansListNextResponse,
+ CommitmentPlansListInResourceGroupNextResponse
+} from "../models";
-/** Class representing a CommitmentPlans. */
-export class CommitmentPlans {
- private readonly client: AzureMLCommitmentPlansManagementClientContext;
+///
+/** Class containing CommitmentPlans operations. */
+export class CommitmentPlansImpl implements CommitmentPlans {
+ private readonly client: AzureMLCommitmentPlansManagementClient;
/**
- * Create a CommitmentPlans.
- * @param {AzureMLCommitmentPlansManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class CommitmentPlans class.
+ * @param client Reference to the service client
*/
- constructor(client: AzureMLCommitmentPlansManagementClientContext) {
+ constructor(client: AzureMLCommitmentPlansManagementClient) {
this.client = client;
}
/**
- * Retrieve an Azure ML commitment plan by its subscription, resource group and name.
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroupName: string, commitmentPlanName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param callback The callback
+ * Retrieve all Azure ML commitment plans in a subscription.
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, commitmentPlanName: string, callback: msRest.ServiceCallback): void;
+ public list(
+ options?: CommitmentPlansListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: CommitmentPlansListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ options?: CommitmentPlansListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
+ }
+
/**
+ * Retrieve all Azure ML commitment plans in a resource group.
* @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroupName: string, commitmentPlanName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroupName: string, commitmentPlanName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
+ public listInResourceGroup(
+ resourceGroupName: string,
+ options?: CommitmentPlansListInResourceGroupOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listInResourceGroupPagingAll(resourceGroupName, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listInResourceGroupPagingPage(resourceGroupName, options);
+ }
+ };
+ }
+
+ private async *listInResourceGroupPagingPage(
+ resourceGroupName: string,
+ options?: CommitmentPlansListInResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listInResourceGroup(resourceGroupName, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listInResourceGroupNext(
resourceGroupName,
- commitmentPlanName,
+ continuationToken,
options
- },
- getOperationSpec,
- callback) as Promise;
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listInResourceGroupPagingAll(
+ resourceGroupName: string,
+ options?: CommitmentPlansListInResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listInResourceGroupPagingPage(
+ resourceGroupName,
+ options
+ )) {
+ yield* page;
+ }
}
/**
- * Create a new Azure ML commitment plan resource or updates an existing one.
- * @param createOrUpdatePayload The payload to create or update the Azure ML commitment plan.
+ * Retrieve an Azure ML commitment plan by its subscription, resource group and name.
* @param resourceGroupName The resource group name.
* @param commitmentPlanName The Azure ML commitment plan name.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- createOrUpdate(createOrUpdatePayload: Models.CommitmentPlan, resourceGroupName: string, commitmentPlanName: string, options?: msRest.RequestOptionsBase): Promise;
+ get(
+ resourceGroupName: string,
+ commitmentPlanName: string,
+ options?: CommitmentPlansGetOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroupName, commitmentPlanName, options },
+ getOperationSpec
+ );
+ }
+
/**
- * @param createOrUpdatePayload The payload to create or update the Azure ML commitment plan.
+ * Create a new Azure ML commitment plan resource or updates an existing one.
* @param resourceGroupName The resource group name.
* @param commitmentPlanName The Azure ML commitment plan name.
- * @param callback The callback
- */
- createOrUpdate(createOrUpdatePayload: Models.CommitmentPlan, resourceGroupName: string, commitmentPlanName: string, callback: msRest.ServiceCallback): void;
- /**
* @param createOrUpdatePayload The payload to create or update the Azure ML commitment plan.
- * @param resourceGroupName The resource group name.
- * @param commitmentPlanName The Azure ML commitment plan name.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- createOrUpdate(createOrUpdatePayload: Models.CommitmentPlan, resourceGroupName: string, commitmentPlanName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(createOrUpdatePayload: Models.CommitmentPlan, resourceGroupName: string, commitmentPlanName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback