From 0859f06d37377f1b20e1f537b803eeb17223821e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 13 Apr 2023 05:47:09 +0000 Subject: [PATCH] CodeGen from PR 23543 in Azure/azure-rest-api-specs Merge 90ede5c052710c83d39b343a16d6023ccba7e113 into 5bcf0a7c3dbe04a6e8025735584943f5225ef508 --- common/config/rush/pnpm-lock.yaml | 116 +- sdk/eventhub/arm-eventhub/CHANGELOG.md | 73 +- sdk/eventhub/arm-eventhub/LICENSE | 2 +- sdk/eventhub/arm-eventhub/README.md | 2 +- sdk/eventhub/arm-eventhub/_meta.json | 10 +- sdk/eventhub/arm-eventhub/package.json | 23 +- .../arm-eventhub/review/arm-eventhub.api.md | 291 ++++- .../src/eventHubManagementClient.ts | 48 +- sdk/eventhub/arm-eventhub/src/lroImpl.ts | 54 +- sdk/eventhub/arm-eventhub/src/models/index.ts | 963 ++++++++++----- .../arm-eventhub/src/models/mappers.ts | 1100 ++++++++++++----- .../arm-eventhub/src/models/parameters.ts | 110 +- .../operations/applicationGroupOperations.ts | 343 +++++ .../arm-eventhub/src/operations/clusters.ts | 74 +- .../src/operations/configuration.ts | 2 +- .../src/operations/consumerGroups.ts | 1 - .../src/operations/disasterRecoveryConfigs.ts | 412 +++--- .../arm-eventhub/src/operations/eventHubs.ts | 402 +++--- .../arm-eventhub/src/operations/index.ts | 9 +- .../arm-eventhub/src/operations/namespaces.ts | 64 +- ...ecurityPerimeterConfigurationOperations.ts | 73 ++ .../networkSecurityPerimeterConfigurations.ts | 153 +++ .../arm-eventhub/src/operations/operations.ts | 1 - .../operations/privateEndpointConnections.ts | 32 +- .../src/operations/schemaRegistry.ts | 1 - .../applicationGroupOperations.ts | 75 ++ .../src/operationsInterfaces/clusters.ts | 12 +- .../disasterRecoveryConfigs.ts | 82 +- .../src/operationsInterfaces/eventHubs.ts | 106 +- .../src/operationsInterfaces/index.ts | 9 +- .../src/operationsInterfaces/namespaces.ts | 8 +- ...ecurityPerimeterConfigurationOperations.ts | 27 + .../networkSecurityPerimeterConfigurations.ts | 40 + .../privateEndpointConnections.ts | 4 +- sdk/eventhub/arm-eventhub/src/pagingHelper.ts | 8 +- sdk/eventhub/arm-eventhub/test/sampleTest.ts | 43 + sdk/eventhub/arm-eventhub/tsconfig.json | 10 +- 37 files changed, 3418 insertions(+), 1365 deletions(-) create mode 100644 sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurationOperations.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operationsInterfaces/applicationGroupOperations.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurationOperations.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/eventhub/arm-eventhub/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index b74dd2bc552c..a2cf8cffdb6e 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12,6 +12,7 @@ specifiers: '@rush-temp/ai-metrics-advisor': file:./projects/ai-metrics-advisor.tgz '@rush-temp/ai-personalizer': file:./projects/ai-personalizer.tgz '@rush-temp/ai-text-analytics': file:./projects/ai-text-analytics.tgz + '@rush-temp/ai-translation-text': file:./projects/ai-translation-text.tgz '@rush-temp/api-management-custom-widgets-scaffolder': file:./projects/api-management-custom-widgets-scaffolder.tgz '@rush-temp/api-management-custom-widgets-tools': file:./projects/api-management-custom-widgets-tools.tgz '@rush-temp/app-configuration': file:./projects/app-configuration.tgz @@ -217,7 +218,6 @@ specifiers: '@rush-temp/arm-workloads': file:./projects/arm-workloads.tgz '@rush-temp/arm-workspaces': file:./projects/arm-workspaces.tgz '@rush-temp/attestation': file:./projects/attestation.tgz - '@rush-temp/ai-translation-text': file:./projects/ai-translation-text.tgz '@rush-temp/communication-alpha-ids': file:./projects/communication-alpha-ids.tgz '@rush-temp/communication-call-automation': file:./projects/communication-call-automation.tgz '@rush-temp/communication-chat': file:./projects/communication-chat.tgz @@ -350,6 +350,7 @@ dependencies: '@rush-temp/ai-metrics-advisor': file:projects/ai-metrics-advisor.tgz '@rush-temp/ai-personalizer': file:projects/ai-personalizer.tgz '@rush-temp/ai-text-analytics': file:projects/ai-text-analytics.tgz + '@rush-temp/ai-translation-text': file:projects/ai-translation-text.tgz '@rush-temp/api-management-custom-widgets-scaffolder': file:projects/api-management-custom-widgets-scaffolder.tgz '@rush-temp/api-management-custom-widgets-tools': file:projects/api-management-custom-widgets-tools.tgz '@rush-temp/app-configuration': file:projects/app-configuration.tgz @@ -555,7 +556,6 @@ dependencies: '@rush-temp/arm-workloads': file:projects/arm-workloads.tgz '@rush-temp/arm-workspaces': file:projects/arm-workspaces.tgz '@rush-temp/attestation': file:projects/attestation.tgz - '@rush-temp/ai-translation-text': file:projects/ai-translation-text.tgz '@rush-temp/communication-alpha-ids': file:projects/communication-alpha-ids.tgz '@rush-temp/communication-call-automation': file:projects/communication-call-automation.tgz '@rush-temp/communication-chat': file:projects/communication-chat.tgz @@ -738,6 +738,7 @@ packages: /@azure/ai-form-recognizer/3.1.0-beta.3: resolution: {integrity: sha512-+4QtFKNyxAmdqpcYjuAtmWKm/MuOe9kZsbpS9jA9h0YHzngNj5gc67AA4egV9BXOq9x+1phjYTNC/rxiOUr1uQ==} engines: {node: '>=8.0.0'} + deprecated: Please migrate to a supported (non-beta) version of this package dependencies: '@azure/core-auth': 1.4.0 '@azure/core-http': 1.2.6 @@ -796,6 +797,21 @@ packages: - supports-color dev: false + /@azure/arm-eventhub/5.1.0: + resolution: {integrity: sha512-yKglRlr8zbnenZKV7ERnF7b7OXZkoqr0m0ciIeJkMaJJzXETiSuw8xB3O3dAMSf9pR1npQMFngTgFKhxb26ysg==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.4.0 + '@azure/core-client': 1.7.2 + '@azure/core-lro': 2.5.1 + '@azure/core-paging': 1.5.0 + '@azure/core-rest-pipeline': 1.10.2 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/arm-network/26.0.0: resolution: {integrity: sha512-Hp0Q4ZzChs8C0DUdGZOChWKMrhzZ53V0Q681puREZ9S1E6o2yWM0Vb+cYuWoyPOylwuzP2fjNjJZGtB7WuFd3w==} engines: {node: '>=12.0.0'} @@ -4002,7 +4018,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230411 + typescript: 5.1.0-dev.20230412 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8865,8 +8881,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230411: - resolution: {integrity: sha512-3yO7RzC4rZID1/u1alMwKKAhp/kyDkFiR+73vsvK5z99GYRVbUJIy9f3w2pGNZI3K7YI5Hv1bN2XWkPgZhB2CA==} + /typescript/5.1.0-dev.20230412: + resolution: {integrity: sha512-O7UY8wd8wEa6pd6CpVFbS9u+DArm73B4rRz8dwm6SDORvEF7rbuNzJ6GTTnBvGavlVkWT5/cYstySs5uhj0vPg==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -9866,6 +9882,47 @@ packages: - utf-8-validate dev: false + file:projects/ai-translation-text.tgz: + resolution: {integrity: sha512-+LZrnKC6WEXktJx5OM7vSu4A3EwsBCcnX3xS4R5x1MYKUzTkgXoC1xDrXPfX/fX/98de+6s5yKkX+bWeFoOt8Q==, tarball: file:projects/ai-translation-text.tgz} + name: '@rush-temp/ai-translation-text' + version: 0.0.0 + dependencies: + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.34.4_@types+node@14.18.42 + '@types/chai': 4.3.4 + '@types/mocha': 7.0.2 + '@types/node': 14.18.42 + autorest: 3.6.3 + chai: 4.3.7 + cross-env: 7.0.3 + dotenv: 16.0.3 + eslint: 8.37.0 + karma: 6.4.1 + karma-chrome-launcher: 3.1.1 + karma-coverage: 2.2.0 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-junit-reporter: 2.0.1_karma@6.4.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@6.4.1 + karma-source-map-support: 1.4.0 + karma-sourcemap-loader: 0.3.8 + mkdirp: 2.1.6 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 15.1.0 + prettier: 2.8.7 + rimraf: 3.0.2 + source-map-support: 0.5.21 + tslib: 2.5.0 + typescript: 4.8.4 + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + dev: false + file:projects/api-management-custom-widgets-scaffolder.tgz: resolution: {integrity: sha512-QNlFQJsk/3ET4caCJxXBWooRMGlyglbYaCmZDQL28eE8fjHX62lkGweUlMvBZKspVE6UaaDrl3ddDJVJeybv8g==, tarball: file:projects/api-management-custom-widgets-scaffolder.tgz} name: '@rush-temp/api-management-custom-widgets-scaffolder' @@ -12168,7 +12225,7 @@ packages: dev: false file:projects/arm-eventhub.tgz: - resolution: {integrity: sha512-aJzQRAfVvgyk0Nbu9U9HvLJPaiZl6kg4S/QIhCeu+tdfAQFrKCAIEC9ef9s+GW0lE5HFXy754TEGrFtM7xi5RQ==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-rtxJ4Prtd8pxuy3542XRTj6Wvba15pduyiNQbLtsai/c/dsbwP0Y9HM2BKIY6rjYvs8zUjefslETyuYLViA1Dw==, tarball: file:projects/arm-eventhub.tgz} name: '@rush-temp/arm-eventhub' version: 0.0.0 dependencies: @@ -12184,7 +12241,8 @@ packages: '@types/node': 14.18.42 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -13356,10 +13414,11 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-+kZIZf57UFBgwXnvVzcfdy4T/7PaWYW5y7CDPvZDRlR/zzXN/040MHiissaJwQ41X+wf3puS0fdAIbl+Q2U7Kw==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-Cp0JwnEPjOgbpcjJ0FcSZnfI1jVSexkW6KxH8f9ci7UbhQis2h5Owt2/zf2LW1li5Ht3ad/IcqzkfC5ieMZmsA==, tarball: file:projects/arm-monitor.tgz} name: '@rush-temp/arm-monitor' version: 0.0.0 dependencies: + '@azure/arm-eventhub': 5.1.0 '@azure/arm-operationalinsights': 8.0.1 '@azure/arm-storage': 17.2.1 '@azure/identity': 2.1.0 @@ -15674,47 +15733,6 @@ packages: - utf-8-validate dev: false - file:projects/ai-translation-text.tgz: - resolution: {integrity: sha512-t1vY6CnSsEovNxSSUxRia/62S0MvizhtA8sqFxpbQYqmk369JA3RcADZgFIJybT0nlOybtuI8IK7XjF33LGYdQ==, tarball: file:projects/ai-translation-text.tgz} - name: '@rush-temp/ai-translation-text' - version: 0.0.0 - dependencies: - '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.34.3_@types+node@14.18.36 - '@types/chai': 4.3.4 - '@types/mocha': 7.0.2 - '@types/node': 14.18.36 - autorest: 3.6.3 - chai: 4.3.7 - cross-env: 7.0.3 - dotenv: 16.0.3 - eslint: 8.33.0 - karma: 6.4.1 - karma-chrome-launcher: 3.1.1 - karma-coverage: 2.2.0 - karma-env-preprocessor: 0.1.1 - karma-firefox-launcher: 1.3.0 - karma-junit-reporter: 2.0.1_karma@6.4.1 - karma-mocha: 2.0.1 - karma-mocha-reporter: 2.2.5_karma@6.4.1 - karma-source-map-support: 1.4.0 - karma-sourcemap-loader: 0.3.8 - mkdirp: 2.1.3 - mocha: 7.2.0 - mocha-junit-reporter: 1.23.3_mocha@7.2.0 - nyc: 15.1.0 - prettier: 2.8.3 - rimraf: 3.0.2 - source-map-support: 0.5.21 - tslib: 2.5.0 - typescript: 4.8.4 - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - dev: false - file:projects/communication-alpha-ids.tgz: resolution: {integrity: sha512-gFfNaey5SYHtam8H0afb4emCX5xnhR6Ox3K+kzSJUVtrNC4fakIPOWaks0YtFd96toLk6vqIafa+cGdqdRrPPQ==, tarball: file:projects/communication-alpha-ids.tgz} name: '@rush-temp/communication-alpha-ids' diff --git a/sdk/eventhub/arm-eventhub/CHANGELOG.md b/sdk/eventhub/arm-eventhub/CHANGELOG.md index 62992c547f1f..91b5f65e9c40 100644 --- a/sdk/eventhub/arm-eventhub/CHANGELOG.md +++ b/sdk/eventhub/arm-eventhub/CHANGELOG.md @@ -1,15 +1,72 @@ # Release History + +## 6.0.0-beta.1 (2023-04-13) + +**Features** -## 5.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group ApplicationGroupOperations + - Added operation group NetworkSecurityPerimeterConfigurationOperations + - Added operation group NetworkSecurityPerimeterConfigurations + - Added Interface ApplicationGroup + - Added Interface ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams + - Added Interface ApplicationGroupDeleteOptionalParams + - Added Interface ApplicationGroupGetOptionalParams + - Added Interface ApplicationGroupListByNamespaceNextOptionalParams + - Added Interface ApplicationGroupListByNamespaceOptionalParams + - Added Interface ApplicationGroupListResult + - Added Interface ApplicationGroupPolicy + - Added Interface NetworkSecurityPerimeter + - Added Interface NetworkSecurityPerimeterConfiguration + - Added Interface NetworkSecurityPerimeterConfigurationList + - Added Interface NetworkSecurityPerimeterConfigurationListOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationPropertiesProfile + - Added Interface NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation + - Added Interface NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams + - Added Interface NspAccessRule + - Added Interface NspAccessRuleProperties + - Added Interface NspAccessRulePropertiesSubscriptionsItem + - Added Interface ProvisioningIssue + - Added Interface ProvisioningIssueProperties + - Added Interface RetentionDescription + - Added Interface ThrottlingPolicy + - Added Type Alias ApplicationGroupCreateOrUpdateApplicationGroupResponse + - Added Type Alias ApplicationGroupGetResponse + - Added Type Alias ApplicationGroupListByNamespaceNextResponse + - Added Type Alias ApplicationGroupListByNamespaceResponse + - Added Type Alias ApplicationGroupPolicyType + - Added Type Alias ApplicationGroupPolicyUnion + - Added Type Alias CleanupPolicyRetentionDescription + - Added Type Alias MetricId + - Added Type Alias NetworkSecurityPerimeterConfigurationListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationProvisioningState + - Added Type Alias NspAccessRuleDirection + - Added Type Alias PublicNetworkAccess + - Added Type Alias ResourceAssociationAccessMode + - Added Type Alias TlsVersion + - Interface Cluster has a new optional parameter supportsScaling + - Interface EHNamespace has a new optional parameter minimumTlsVersion + - Interface EHNamespace has a new optional parameter publicNetworkAccess + - Interface Eventhub has a new optional parameter retentionDescription + - Added Enum KnownApplicationGroupPolicyType + - Added Enum KnownCleanupPolicyRetentionDescription + - Added Enum KnownMetricId + - Added Enum KnownNetworkSecurityPerimeterConfigurationProvisioningState + - Added Enum KnownNspAccessRuleDirection + - Added Enum KnownPublicNetworkAccess + - Added Enum KnownResourceAssociationAccessMode + - Added Enum KnownTlsVersion + - Enum KnownPublicNetworkAccessFlag has a new value SecuredByPerimeter -### Other Changes +**Breaking Changes** + - Interface ConsumerGroupsListByEventHubNextOptionalParams no longer has parameter skip + - Interface ConsumerGroupsListByEventHubNextOptionalParams no longer has parameter top + - Interface EventHubsListByNamespaceNextOptionalParams no longer has parameter skip + - Interface EventHubsListByNamespaceNextOptionalParams no longer has parameter top + - Interface SchemaRegistryListByNamespaceNextOptionalParams no longer has parameter skip + - Interface SchemaRegistryListByNamespaceNextOptionalParams no longer has parameter top + + ## 5.1.0 (2022-11-22) **Features** diff --git a/sdk/eventhub/arm-eventhub/LICENSE b/sdk/eventhub/arm-eventhub/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/eventhub/arm-eventhub/LICENSE +++ b/sdk/eventhub/arm-eventhub/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md index 966fdd7d4a21..6eb023d52334 100644 --- a/sdk/eventhub/arm-eventhub/README.md +++ b/sdk/eventhub/arm-eventhub/README.md @@ -6,7 +6,7 @@ Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and Virt [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-eventhub) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-eventhub) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-eventhub?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/eventhub/arm-eventhub/_meta.json b/sdk/eventhub/arm-eventhub/_meta.json index 1fa8bd91aded..d336443915b1 100644 --- a/sdk/eventhub/arm-eventhub/_meta.json +++ b/sdk/eventhub/arm-eventhub/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d710fb7f40338ca6ef00e0a9680be0a3d4cf5059", - "readme": "specification\\eventhub\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\eventhub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "247c99091728be51fcb1e085715a4eb42914b513", + "readme": "specification/eventhub/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/eventhub/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index bbee9caa7840..1b2dbf2bb8c4 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventHubManagementClient.", - "version": "5.1.1", + "version": "6.0.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -46,12 +47,9 @@ "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@azure/arm-network": "^26.0.0", - "@azure/arm-storage": "^17.0.0", "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -113,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-eventhub?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub" +} \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/review/arm-eventhub.api.md b/sdk/eventhub/arm-eventhub/review/arm-eventhub.api.md index 37ec5ca7961b..a235eb487956 100644 --- a/sdk/eventhub/arm-eventhub/review/arm-eventhub.api.md +++ b/sdk/eventhub/arm-eventhub/review/arm-eventhub.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface AccessKeys { @@ -24,6 +24,72 @@ export interface AccessKeys { // @public export type AccessRights = string; +// @public +export interface ApplicationGroup extends ProxyResource { + clientAppGroupIdentifier?: string; + isEnabled?: boolean; + policies?: ApplicationGroupPolicyUnion[]; + readonly systemData?: SystemData; +} + +// @public +export interface ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGroupCreateOrUpdateApplicationGroupResponse = ApplicationGroup; + +// @public +export interface ApplicationGroupDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ApplicationGroupGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGroupGetResponse = ApplicationGroup; + +// @public +export interface ApplicationGroupListByNamespaceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGroupListByNamespaceNextResponse = ApplicationGroupListResult; + +// @public +export interface ApplicationGroupListByNamespaceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ApplicationGroupListByNamespaceResponse = ApplicationGroupListResult; + +// @public +export interface ApplicationGroupListResult { + readonly nextLink?: string; + value?: ApplicationGroup[]; +} + +// @public +export interface ApplicationGroupOperations { + createOrUpdateApplicationGroup(resourceGroupName: string, namespaceName: string, applicationGroupName: string, parameters: ApplicationGroup, options?: ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams): Promise; + delete(resourceGroupName: string, namespaceName: string, applicationGroupName: string, options?: ApplicationGroupDeleteOptionalParams): Promise; + get(resourceGroupName: string, namespaceName: string, applicationGroupName: string, options?: ApplicationGroupGetOptionalParams): Promise; + listByNamespace(resourceGroupName: string, namespaceName: string, options?: ApplicationGroupListByNamespaceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ApplicationGroupPolicy { + name: string; + type: "ThrottlingPolicy"; +} + +// @public +export type ApplicationGroupPolicyType = string; + +// @public (undocumented) +export type ApplicationGroupPolicyUnion = ApplicationGroupPolicy | ThrottlingPolicy; + // @public export interface ArmDisasterRecovery extends ProxyResource { alternateName?: string; @@ -84,12 +150,16 @@ export interface CheckNameAvailabilityResult { reason?: UnavailableReason; } +// @public +export type CleanupPolicyRetentionDescription = string; + // @public export interface Cluster extends TrackedResource { readonly createdAt?: string; readonly metricId?: string; sku?: ClusterSku; readonly status?: string; + supportsScaling?: boolean; readonly systemData?: SystemData; readonly updatedAt?: string; } @@ -109,11 +179,11 @@ export interface ClusterQuotaConfigurationProperties { // @public export interface Clusters { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; + beginUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersUpdateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; listAvailableClusterRegion(options?: ClustersListAvailableClusterRegionOptionalParams): Promise; @@ -272,8 +342,6 @@ export type ConsumerGroupsGetResponse = ConsumerGroup; // @public export interface ConsumerGroupsListByEventHubNextOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; } // @public @@ -406,8 +474,10 @@ export interface EHNamespace extends TrackedResource { kafkaEnabled?: boolean; maximumThroughputUnits?: number; readonly metricId?: string; + minimumTlsVersion?: TlsVersion; privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: string; + publicNetworkAccess?: PublicNetworkAccess; readonly serviceBusEndpoint?: string; sku?: Sku; readonly status?: string; @@ -475,6 +545,7 @@ export interface Eventhub extends ProxyResource { messageRetentionInDays?: number; partitionCount?: number; readonly partitionIds?: string[]; + retentionDescription?: RetentionDescription; status?: EntityStatus; readonly systemData?: SystemData; readonly updatedAt?: Date; @@ -494,6 +565,8 @@ export class EventHubManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + applicationGroupOperations: ApplicationGroupOperations; + // (undocumented) clusters: Clusters; // (undocumented) configuration: Configuration; @@ -506,6 +579,10 @@ export class EventHubManagementClient extends coreClient.ServiceClient { // (undocumented) namespaces: Namespaces; // (undocumented) + networkSecurityPerimeterConfigurationOperations: NetworkSecurityPerimeterConfigurationOperations; + // (undocumented) + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -590,8 +667,6 @@ export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResul // @public export interface EventHubsListByNamespaceNextOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; } // @public @@ -653,6 +728,17 @@ export enum KnownAccessRights { Send = "Send" } +// @public +export enum KnownApplicationGroupPolicyType { + ThrottlingPolicy = "ThrottlingPolicy" +} + +// @public +export enum KnownCleanupPolicyRetentionDescription { + Compaction = "Compaction", + Delete = "Delete" +} + // @public export enum KnownClusterSkuName { Dedicated = "Dedicated" @@ -688,11 +774,40 @@ export enum KnownKeyType { SecondaryKey = "SecondaryKey" } +// @public +export enum KnownMetricId { + IncomingBytes = "IncomingBytes", + IncomingMessages = "IncomingMessages", + OutgoingBytes = "OutgoingBytes", + OutgoingMessages = "OutgoingMessages" +} + // @public export enum KnownNetworkRuleIPAction { Allow = "Allow" } +// @public +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleted = "Deleted", + Deleting = "Deleting", + Failed = "Failed", + InvalidResponse = "InvalidResponse", + Succeeded = "Succeeded", + SucceededWithIssues = "SucceededWithIssues", + Unknown = "Unknown", + Updating = "Updating" +} + +// @public +export enum KnownNspAccessRuleDirection { + Inbound = "Inbound", + Outbound = "Outbound" +} + // @public export enum KnownPrivateLinkConnectionStatus { Approved = "Approved", @@ -701,10 +816,27 @@ export enum KnownPrivateLinkConnectionStatus { Rejected = "Rejected" } +// @public +export enum KnownPublicNetworkAccess { + Disabled = "Disabled", + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" +} + // @public export enum KnownPublicNetworkAccessFlag { Disabled = "Disabled", - Enabled = "Enabled" + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" +} + +// @public +export enum KnownResourceAssociationAccessMode { + AuditMode = "AuditMode", + EnforcedMode = "EnforcedMode", + LearningMode = "LearningMode", + NoAssociationMode = "NoAssociationMode", + UnspecifiedMode = "UnspecifiedMode" } // @public @@ -734,14 +866,24 @@ export enum KnownSkuTier { Standard = "Standard" } +// @public +export enum KnownTlsVersion { + One0 = "1.0", + One1 = "1.1", + One2 = "1.2" +} + // @public export type ManagedServiceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned, UserAssigned" | "None"; +// @public +export type MetricId = string; + // @public export interface Namespaces { - beginCreateOrUpdate(resourceGroupName: string, namespaceName: string, parameters: EHNamespace, options?: NamespacesCreateOrUpdateOptionalParams): Promise, NamespacesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, namespaceName: string, parameters: EHNamespace, options?: NamespacesCreateOrUpdateOptionalParams): Promise, NamespacesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, namespaceName: string, parameters: EHNamespace, options?: NamespacesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, namespaceName: string, options?: NamespacesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, namespaceName: string, options?: NamespacesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, namespaceName: string, options?: NamespacesDeleteOptionalParams): Promise; checkNameAvailability(parameters: CheckNameAvailabilityParameter, options?: NamespacesCheckNameAvailabilityOptionalParams): Promise; createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, parameters: AuthorizationRule, options?: NamespacesCreateOrUpdateAuthorizationRuleOptionalParams): Promise; @@ -909,6 +1051,92 @@ export interface NetworkRuleSetListResult { value?: NetworkRuleSet[]; } +// @public +export interface NetworkSecurityPerimeter { + id?: string; + location?: string; + perimeterGuid?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + readonly networkSecurityPerimeter?: NetworkSecurityPerimeter; + readonly profile?: NetworkSecurityPerimeterConfigurationPropertiesProfile; + provisioningIssues?: ProvisioningIssue[]; + provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; + readonly resourceAssociation?: NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationList { + readonly value?: NetworkSecurityPerimeterConfiguration[]; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationListResponse = NetworkSecurityPerimeterConfigurationList; + +// @public +export interface NetworkSecurityPerimeterConfigurationOperations { + list(resourceGroupName: string, namespaceName: string, options?: NetworkSecurityPerimeterConfigurationListOptionalParams): Promise; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationPropertiesProfile { + accessRules?: NspAccessRule[]; + accessRulesVersion?: string; + name?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation { + accessMode?: ResourceAssociationAccessMode; + name?: string; +} + +// @public +export type NetworkSecurityPerimeterConfigurationProvisioningState = string; + +// @public +export interface NetworkSecurityPerimeterConfigurations { + beginCreateOrUpdate(resourceGroupName: string, namespaceName: string, resourceAssociationName: string, options?: NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams): Promise, void>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, namespaceName: string, resourceAssociationName: string, options?: NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams): Promise; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface NspAccessRule { + id?: string; + name?: string; + readonly properties?: NspAccessRuleProperties; + type?: string; +} + +// @public +export type NspAccessRuleDirection = string; + +// @public +export interface NspAccessRuleProperties { + addressPrefixes?: string[]; + direction?: NspAccessRuleDirection; + readonly fullyQualifiedDomainNames?: string[]; + readonly networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + subscriptions?: NspAccessRulePropertiesSubscriptionsItem[]; +} + +// @public +export interface NspAccessRulePropertiesSubscriptionsItem { + id?: string; +} + // @public export interface NWRuleSetIpRules { action?: NetworkRuleIPAction; @@ -984,7 +1212,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnections { - beginDelete(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; @@ -1056,6 +1284,18 @@ export interface PrivateLinkResourcesListResult { value?: PrivateLinkResource[]; } +// @public +export interface ProvisioningIssue { + name?: string; + readonly properties?: ProvisioningIssueProperties; +} + +// @public +export interface ProvisioningIssueProperties { + description?: string; + issueType?: string; +} + // @public export type ProvisioningStateDR = "Accepted" | "Succeeded" | "Failed"; @@ -1067,6 +1307,9 @@ export interface ProxyResource { readonly type?: string; } +// @public +export type PublicNetworkAccess = string; + // @public export type PublicNetworkAccessFlag = string; @@ -1083,6 +1326,16 @@ export interface Resource { readonly type?: string; } +// @public +export type ResourceAssociationAccessMode = string; + +// @public +export interface RetentionDescription { + cleanupPolicy?: CleanupPolicyRetentionDescription; + retentionTimeInHours?: number; + tombstoneRetentionTimeInHours?: number; +} + // @public export type RoleDisasterRecovery = "Primary" | "PrimaryNotReplicating" | "Secondary"; @@ -1141,8 +1394,6 @@ export type SchemaRegistryGetResponse = SchemaGroup; // @public export interface SchemaRegistryListByNamespaceNextOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; } // @public @@ -1188,6 +1439,16 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export interface ThrottlingPolicy extends ApplicationGroupPolicy { + metricId: MetricId; + rateLimitThreshold: number; + type: "ThrottlingPolicy"; +} + +// @public +export type TlsVersion = string; + // @public export interface TrackedResource extends Resource { location?: string; diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index 413d1cefa8e9..c8ee997a055a 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -16,27 +16,33 @@ import { import * as coreAuth from "@azure/core-auth"; import { ClustersImpl, - ConfigurationImpl, NamespacesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, - OperationsImpl, - EventHubsImpl, + NetworkSecurityPerimeterConfigurationOperationsImpl, + NetworkSecurityPerimeterConfigurationsImpl, + ConfigurationImpl, DisasterRecoveryConfigsImpl, + EventHubsImpl, ConsumerGroupsImpl, - SchemaRegistryImpl + OperationsImpl, + SchemaRegistryImpl, + ApplicationGroupOperationsImpl } from "./operations"; import { Clusters, - Configuration, Namespaces, PrivateEndpointConnections, PrivateLinkResources, - Operations, - EventHubs, + NetworkSecurityPerimeterConfigurationOperations, + NetworkSecurityPerimeterConfigurations, + Configuration, DisasterRecoveryConfigs, + EventHubs, ConsumerGroups, - SchemaRegistry + Operations, + SchemaRegistry, + ApplicationGroupOperations } from "./operationsInterfaces"; import { EventHubManagementClientOptionalParams } from "./models"; @@ -73,7 +79,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-eventhub/5.1.1`; + const packageDetails = `azsdk-js-arm-eventhub/6.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -126,17 +132,24 @@ export class EventHubManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-11-01"; + this.apiVersion = options.apiVersion || "2022-10-01-preview"; this.clusters = new ClustersImpl(this); - this.configuration = new ConfigurationImpl(this); this.namespaces = new NamespacesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); - this.operations = new OperationsImpl(this); - this.eventHubs = new EventHubsImpl(this); + this.networkSecurityPerimeterConfigurationOperations = new NetworkSecurityPerimeterConfigurationOperationsImpl( + this + ); + this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl( + this + ); + this.configuration = new ConfigurationImpl(this); this.disasterRecoveryConfigs = new DisasterRecoveryConfigsImpl(this); + this.eventHubs = new EventHubsImpl(this); this.consumerGroups = new ConsumerGroupsImpl(this); + this.operations = new OperationsImpl(this); this.schemaRegistry = new SchemaRegistryImpl(this); + this.applicationGroupOperations = new ApplicationGroupOperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -169,13 +182,16 @@ export class EventHubManagementClient extends coreClient.ServiceClient { } clusters: Clusters; - configuration: Configuration; namespaces: Namespaces; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; - operations: Operations; - eventHubs: EventHubs; + networkSecurityPerimeterConfigurationOperations: NetworkSecurityPerimeterConfigurationOperations; + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + configuration: Configuration; disasterRecoveryConfigs: DisasterRecoveryConfigs; + eventHubs: EventHubs; consumerGroups: ConsumerGroups; + operations: Operations; schemaRegistry: SchemaRegistry; + applicationGroupOperations: ApplicationGroupOperations; } diff --git a/sdk/eventhub/arm-eventhub/src/lroImpl.ts b/sdk/eventhub/arm-eventhub/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/eventhub/arm-eventhub/src/lroImpl.ts +++ b/sdk/eventhub/arm-eventhub/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export 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" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/eventhub/arm-eventhub/src/models/index.ts b/sdk/eventhub/arm-eventhub/src/models/index.ts index e9ece368b526..2efbd350aa5a 100644 --- a/sdk/eventhub/arm-eventhub/src/models/index.ts +++ b/sdk/eventhub/arm-eventhub/src/models/index.ts @@ -8,6 +8,10 @@ import * as coreClient from "@azure/core-client"; +export type ApplicationGroupPolicyUnion = + | ApplicationGroupPolicy + | ThrottlingPolicy; + /** The response of the List Available Clusters operation. */ export interface AvailableClustersList { /** The count of readily available and pre-provisioned Event Hubs Clusters per region. */ @@ -132,12 +136,6 @@ export interface EHNamespaceIdContainer { id?: string; } -/** Contains all settings for the cluster. */ -export interface ClusterQuotaConfigurationProperties { - /** All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed on the cluster. */ - settings?: { [propertyName: string]: string }; -} - /** The response of the List Namespace operation */ export interface EHNamespaceListResult { /** Result of the List Namespace operation */ @@ -284,131 +282,107 @@ export interface PrivateLinkResource { requiredZoneNames?: string[]; } -/** Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set of results. */ -export interface OperationListResult { +/** Result of the List NetworkSecurityPerimeterConfiguration operation. */ +export interface NetworkSecurityPerimeterConfigurationList { /** - * List of Event Hub operations supported by the Microsoft.EventHub resource provider. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results if there are any. + * A collection of NetworkSecurityPerimeterConfigurations * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly value?: NetworkSecurityPerimeterConfiguration[]; } -/** A Event Hub REST API operation */ -export interface Operation { - /** - * Operation name: {provider}/{resource}/{operation} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** Indicates whether the operation is a data action */ - isDataAction?: boolean; - /** Display of the operation */ - display?: OperationDisplay; - /** Origin of the operation */ - origin?: string; - /** Properties of the operation */ - properties?: Record; -} - -/** Operation display payload */ -export interface OperationDisplay { - /** - * Resource provider of the operation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * Resource of the operation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * Localized friendly name for the operation - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; +/** Describes Provisioning issue for given NetworkSecurityPerimeterConfiguration */ +export interface ProvisioningIssue { + /** Name of the issue */ + name?: string; /** - * Localized friendly description for the operation + * Properties of Provisioning Issue * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; + readonly properties?: ProvisioningIssueProperties; } -/** The result of the List EventHubs operation. */ -export interface EventHubListResult { - /** Result of the List EventHubs operation. */ - value?: Eventhub[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of EventHubs. */ - nextLink?: string; +/** Properties of Provisioning Issue */ +export interface ProvisioningIssueProperties { + /** Type of Issue */ + issueType?: string; + /** Description of the issue */ + description?: string; } -/** Properties to configure capture description for eventhub */ -export interface CaptureDescription { - /** A value that indicates whether capture description is enabled. */ - enabled?: boolean; - /** Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version */ - encoding?: EncodingCaptureDescription; - /** The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds */ - intervalInSeconds?: number; - /** The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes */ - sizeLimitInBytes?: number; - /** Properties of Destination where capture will be stored. (Storage Account, Blob Names) */ - destination?: Destination; - /** A value that indicates whether to Skip Empty Archives */ - skipEmptyArchives?: boolean; +/** NetworkSecurityPerimeter related information */ +export interface NetworkSecurityPerimeter { + /** Fully qualified identifier of the resource */ + id?: string; + /** Guid of the resource */ + perimeterGuid?: string; + /** Location of the resource */ + location?: string; } -/** Capture storage details for capture description */ -export interface Destination { - /** Name for capture destination */ +/** Information about resource association */ +export interface NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation { + /** Name of the resource association */ name?: string; - /** Resource id of the storage account to be used to create the blobs */ - storageAccountResourceId?: string; - /** Blob container Name */ - blobContainer?: string; - /** Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order */ - archiveNameFormat?: string; - /** Subscription Id of Azure Data Lake Store */ - dataLakeSubscriptionId?: string; - /** The Azure Data Lake Store name for the captured events */ - dataLakeAccountName?: string; - /** The destination folder path for the captured events */ - dataLakeFolderPath?: string; + /** Access Mode of the resource association */ + accessMode?: ResourceAssociationAccessMode; } -/** Parameter supplied to check Namespace name availability operation */ -export interface CheckNameAvailabilityParameter { - /** Name to check the namespace name availability */ - name: string; +/** Information about current network profile */ +export interface NetworkSecurityPerimeterConfigurationPropertiesProfile { + /** Name of the resource */ + name?: string; + /** Current access rules version */ + accessRulesVersion?: string; + /** List of Access Rules */ + accessRules?: NspAccessRule[]; } -/** The Result of the CheckNameAvailability operation */ -export interface CheckNameAvailabilityResult { +/** Information of Access Rule in Network Profile */ +export interface NspAccessRule { + /** Fully qualified identifier of the resource */ + id?: string; + /** Name of the resource */ + name?: string; + /** Type of the resource */ + type?: string; /** - * The detailed info regarding the reason associated with the Namespace. + * Properties of Access Rule * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; - /** Value indicating Namespace is availability, true if the Namespace is available; otherwise, false. */ - nameAvailable?: boolean; - /** The reason for unavailability of a Namespace. */ - reason?: UnavailableReason; + readonly properties?: NspAccessRuleProperties; } -/** The result of the List Alias(Disaster Recovery configuration) operation. */ -export interface ArmDisasterRecoveryListResult { - /** List of Alias(Disaster Recovery configurations) */ - value?: ArmDisasterRecovery[]; +/** Properties of Access Rule */ +export interface NspAccessRuleProperties { + /** Direction of Access Rule */ + direction?: NspAccessRuleDirection; + /** Address prefixes in the CIDR format for inbound rules */ + addressPrefixes?: string[]; + /** Subscriptions for inbound rules */ + subscriptions?: NspAccessRulePropertiesSubscriptionsItem[]; /** - * Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration) + * NetworkSecurityPerimeters for inbound rules * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + /** + * FQDN for outbound rules + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fullyQualifiedDomainNames?: string[]; +} + +/** Subscription for inbound rule */ +export interface NspAccessRulePropertiesSubscriptionsItem { + /** Fully qualified identifier of subscription */ + id?: string; +} + +/** Contains all settings for the cluster. */ +export interface ClusterQuotaConfigurationProperties { + /** All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed on the cluster. */ + settings?: { [propertyName: string]: string }; } /** The response from the List namespace operation. */ @@ -496,6 +470,25 @@ export interface RegenerateAccessKeyParameters { key?: string; } +/** Parameter supplied to check Namespace name availability operation */ +export interface CheckNameAvailabilityParameter { + /** Name to check the namespace name availability */ + name: string; +} + +/** The Result of the CheckNameAvailability operation */ +export interface CheckNameAvailabilityResult { + /** + * The detailed info regarding the reason associated with the Namespace. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** Value indicating Namespace is availability, true if the Namespace is available; otherwise, false. */ + nameAvailable?: boolean; + /** The reason for unavailability of a Namespace. */ + reason?: UnavailableReason; +} + /** The result to the List Consumer Group operation. */ export interface ConsumerGroupListResult { /** Result of the List Consumer Group operation. */ @@ -504,6 +497,124 @@ export interface ConsumerGroupListResult { nextLink?: string; } +/** The result of the List Alias(Disaster Recovery configuration) operation. */ +export interface ArmDisasterRecoveryListResult { + /** List of Alias(Disaster Recovery configurations) */ + value?: ArmDisasterRecovery[]; + /** + * Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of Event Hub operations supported by the Microsoft.EventHub resource provider. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** A Event Hub REST API operation */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; + /** Display of the operation */ + display?: OperationDisplay; + /** Origin of the operation */ + origin?: string; + /** Properties of the operation */ + properties?: Record; +} + +/** Operation display payload */ +export interface OperationDisplay { + /** + * Resource provider of the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * Resource of the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * Localized friendly name for the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * Localized friendly description for the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** The result of the List EventHubs operation. */ +export interface EventHubListResult { + /** Result of the List EventHubs operation. */ + value?: Eventhub[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of EventHubs. */ + nextLink?: string; +} + +/** Properties to configure capture description for eventhub */ +export interface CaptureDescription { + /** A value that indicates whether capture description is enabled. */ + enabled?: boolean; + /** Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version */ + encoding?: EncodingCaptureDescription; + /** The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds */ + intervalInSeconds?: number; + /** The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes */ + sizeLimitInBytes?: number; + /** Properties of Destination where capture will be stored. (Storage Account, Blob Names) */ + destination?: Destination; + /** A value that indicates whether to Skip Empty Archives */ + skipEmptyArchives?: boolean; +} + +/** Capture storage details for capture description */ +export interface Destination { + /** Name for capture destination */ + name?: string; + /** Resource id of the storage account to be used to create the blobs */ + storageAccountResourceId?: string; + /** Blob container Name */ + blobContainer?: string; + /** Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order */ + archiveNameFormat?: string; + /** Subscription Id of Azure Data Lake Store */ + dataLakeSubscriptionId?: string; + /** The Azure Data Lake Store name for the captured events */ + dataLakeAccountName?: string; + /** The destination folder path for the captured events */ + dataLakeFolderPath?: string; +} + +/** Properties to configure retention settings for the eventhub */ +export interface RetentionDescription { + /** Enumerates the possible values for cleanup policy */ + cleanupPolicy?: CleanupPolicyRetentionDescription; + /** Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compaction the returned value of this property is Long.MaxValue */ + retentionTimeInHours?: number; + /** Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compaction. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub */ + tombstoneRetentionTimeInHours?: number; +} + /** The result of the List SchemaGroup operation. */ export interface SchemaGroupListResult { /** Result of the List SchemaGroups operation. */ @@ -512,6 +623,25 @@ export interface SchemaGroupListResult { nextLink?: string; } +/** The response from the List Application Groups operation. */ +export interface ApplicationGroupListResult { + /** Result of the List Application Groups operation. */ + value?: ApplicationGroup[]; + /** + * Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Properties of the Application Group policy */ +export interface ApplicationGroupPolicy { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "ThrottlingPolicy"; + /** The Name of this policy */ + name: string; +} + /** Definition of resource. */ export interface TrackedResource extends Resource { /** Resource location. */ @@ -535,20 +665,68 @@ export interface PrivateEndpointConnection extends ProxyResource { provisioningState?: EndPointProvisioningState; } -/** Single item in List or Get Event Hub operation */ -export interface Eventhub extends ProxyResource { +/** Network Security Perimeter related configurations of a given namespace */ +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + /** Provisioning state of NetworkSecurityPerimeter configuration propagation */ + provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; + /** List of Provisioning Issues if any */ + provisioningIssues?: ProvisioningIssue[]; + /** + * NetworkSecurityPerimeter related information + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkSecurityPerimeter?: NetworkSecurityPerimeter; + /** + * Information about resource association + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceAssociation?: NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation; + /** + * Information about current network profile + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly profile?: NetworkSecurityPerimeterConfigurationPropertiesProfile; +} + +/** Description of topic resource. */ +export interface NetworkRuleSet extends ProxyResource { /** * The system meta data relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; + /** Value that indicates whether Trusted Service Access is Enabled or not. */ + trustedServiceAccessEnabled?: boolean; + /** Default Action for Network Rule Set */ + defaultAction?: DefaultAction; + /** List VirtualNetwork Rules */ + virtualNetworkRules?: NWRuleSetVirtualNetworkRules[]; + /** List of IpRules */ + ipRules?: NWRuleSetIpRules[]; + /** This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. */ + publicNetworkAccess?: PublicNetworkAccessFlag; +} + +/** Single item in a List or Get AuthorizationRule operation */ +export interface AuthorizationRule extends ProxyResource { /** - * Current number of shards on the Event Hub. + * The system meta data relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partitionIds?: string[]; + readonly systemData?: SystemData; + /** The rights associated with the rule. */ + rights?: AccessRights[]; +} + +/** Single item in List or Get Consumer group operation */ +export interface ConsumerGroup extends ProxyResource { /** - * Exact time the Event Hub was created. + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * Exact time the message was created. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdAt?: Date; @@ -557,14 +735,8 @@ export interface Eventhub extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly updatedAt?: Date; - /** Number of days to retain the events for this Event Hub, value should be 1 to 7 days */ - messageRetentionInDays?: number; - /** Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. */ - partitionCount?: number; - /** Enumerates the possible values for the status of the Event Hub. */ - status?: EntityStatus; - /** Properties of capture description */ - captureDescription?: CaptureDescription; + /** User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. */ + userMetadata?: string; } /** Single item in List or Get Alias(Disaster Recovery configuration) operation */ @@ -595,45 +767,20 @@ export interface ArmDisasterRecovery extends ProxyResource { readonly pendingReplicationOperationsCount?: number; } -/** Description of topic resource. */ -export interface NetworkRuleSet extends ProxyResource { - /** - * The system meta data relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Value that indicates whether Trusted Service Access is Enabled or not. */ - trustedServiceAccessEnabled?: boolean; - /** Default Action for Network Rule Set */ - defaultAction?: DefaultAction; - /** List VirtualNetwork Rules */ - virtualNetworkRules?: NWRuleSetVirtualNetworkRules[]; - /** List of IpRules */ - ipRules?: NWRuleSetIpRules[]; - /** This determines if traffic is allowed over public network. By default it is enabled. */ - publicNetworkAccess?: PublicNetworkAccessFlag; -} - -/** Single item in a List or Get AuthorizationRule operation */ -export interface AuthorizationRule extends ProxyResource { +/** Single item in List or Get Event Hub operation */ +export interface Eventhub extends ProxyResource { /** * The system meta data relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; - /** The rights associated with the rule. */ - rights?: AccessRights[]; -} - -/** Single item in List or Get Consumer group operation */ -export interface ConsumerGroup extends ProxyResource { /** - * The system meta data relating to this resource. + * Current number of shards on the Event Hub. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly partitionIds?: string[]; /** - * Exact time the message was created. + * Exact time the Event Hub was created. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdAt?: Date; @@ -642,8 +789,16 @@ export interface ConsumerGroup extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly updatedAt?: Date; - /** User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. */ - userMetadata?: string; + /** Number of days to retain the events for this Event Hub, value should be 1 to 7 days */ + messageRetentionInDays?: number; + /** Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. */ + partitionCount?: number; + /** Enumerates the possible values for the status of the Event Hub. */ + status?: EntityStatus; + /** Properties of capture description */ + captureDescription?: CaptureDescription; + /** Event Hub retention settings */ + retentionDescription?: RetentionDescription; } /** Single item in List or Get Schema Group operation */ @@ -674,6 +829,31 @@ export interface SchemaGroup extends ProxyResource { schemaType?: SchemaType; } +/** The Application Group object */ +export interface ApplicationGroup extends ProxyResource { + /** + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed */ + isEnabled?: boolean; + /** The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid) */ + clientAppGroupIdentifier?: string; + /** List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. */ + policies?: ApplicationGroupPolicyUnion[]; +} + +/** Properties of the throttling policy */ +export interface ThrottlingPolicy extends ApplicationGroupPolicy { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "ThrottlingPolicy"; + /** The Threshold limit above which the application group will be throttled.Rate limit is always per second. */ + rateLimitThreshold: number; + /** Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal */ + metricId: MetricId; +} + /** Single Event Hubs Cluster resource in List or Get operations. */ export interface Cluster extends TrackedResource { /** Properties of the cluster SKU. */ @@ -703,6 +883,8 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: string; + /** A value that indicates whether Scaling is Supported. */ + supportsScaling?: boolean; } /** Single Namespace item in List or Get Operation */ @@ -716,6 +898,8 @@ export interface EHNamespace extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; + /** The minimum TLS version for the cluster to support, e.g. '1.2' */ + minimumTlsVersion?: TlsVersion; /** * Provisioning state of the Namespace. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -750,6 +934,8 @@ export interface EHNamespace extends TrackedResource { readonly metricId?: string; /** Value that indicates whether AutoInflate is enabled for eventhub namespace. */ isAutoInflateEnabled?: boolean; + /** This determines if traffic is allowed over public network. By default it is enabled. */ + publicNetworkAccess?: PublicNetworkAccess; /** Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true) */ maximumThroughputUnits?: number; /** Value that indicates whether Kafka is enabled for eventhub namespace. */ @@ -847,6 +1033,48 @@ export enum KnownSkuTier { */ export type SkuTier = string; +/** Known values of {@link TlsVersion} that the service accepts. */ +export enum KnownTlsVersion { + /** One0 */ + One0 = "1.0", + /** One1 */ + One1 = "1.1", + /** One2 */ + One2 = "1.2" +} + +/** + * Defines values for TlsVersion. \ + * {@link KnownTlsVersion} can be used interchangeably with TlsVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **1.0** \ + * **1.1** \ + * **1.2** + */ +export type TlsVersion = string; + +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", + /** SecuredByPerimeter */ + SecuredByPerimeter = "SecuredByPerimeter" +} + +/** + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** \ + * **SecuredByPerimeter** + */ +export type PublicNetworkAccess = string; + /** Known values of {@link PrivateLinkConnectionStatus} that the service accepts. */ export enum KnownPrivateLinkConnectionStatus { /** Pending */ @@ -901,6 +1129,96 @@ export enum KnownEndPointProvisioningState { */ export type EndPointProvisioningState = string; +/** Known values of {@link NetworkSecurityPerimeterConfigurationProvisioningState} that the service accepts. */ +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + /** Unknown */ + Unknown = "Unknown", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Accepted */ + Accepted = "Accepted", + /** InvalidResponse */ + InvalidResponse = "InvalidResponse", + /** Succeeded */ + Succeeded = "Succeeded", + /** SucceededWithIssues */ + SucceededWithIssues = "SucceededWithIssues", + /** Failed */ + Failed = "Failed", + /** Deleting */ + Deleting = "Deleting", + /** Deleted */ + Deleted = "Deleted", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for NetworkSecurityPerimeterConfigurationProvisioningState. \ + * {@link KnownNetworkSecurityPerimeterConfigurationProvisioningState} can be used interchangeably with NetworkSecurityPerimeterConfigurationProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Creating** \ + * **Updating** \ + * **Accepted** \ + * **InvalidResponse** \ + * **Succeeded** \ + * **SucceededWithIssues** \ + * **Failed** \ + * **Deleting** \ + * **Deleted** \ + * **Canceled** + */ +export type NetworkSecurityPerimeterConfigurationProvisioningState = string; + +/** Known values of {@link ResourceAssociationAccessMode} that the service accepts. */ +export enum KnownResourceAssociationAccessMode { + /** NoAssociationMode */ + NoAssociationMode = "NoAssociationMode", + /** EnforcedMode */ + EnforcedMode = "EnforcedMode", + /** LearningMode */ + LearningMode = "LearningMode", + /** AuditMode */ + AuditMode = "AuditMode", + /** UnspecifiedMode */ + UnspecifiedMode = "UnspecifiedMode" +} + +/** + * Defines values for ResourceAssociationAccessMode. \ + * {@link KnownResourceAssociationAccessMode} can be used interchangeably with ResourceAssociationAccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NoAssociationMode** \ + * **EnforcedMode** \ + * **LearningMode** \ + * **AuditMode** \ + * **UnspecifiedMode** + */ +export type ResourceAssociationAccessMode = string; + +/** Known values of {@link NspAccessRuleDirection} that the service accepts. */ +export enum KnownNspAccessRuleDirection { + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound" +} + +/** + * Defines values for NspAccessRuleDirection. \ + * {@link KnownNspAccessRuleDirection} can be used interchangeably with NspAccessRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound** \ + * **Outbound** + */ +export type NspAccessRuleDirection = string; + /** Known values of {@link DefaultAction} that the service accepts. */ export enum KnownDefaultAction { /** Allow */ @@ -939,7 +1257,9 @@ export enum KnownPublicNetworkAccessFlag { /** Enabled */ Enabled = "Enabled", /** Disabled */ - Disabled = "Disabled" + Disabled = "Disabled", + /** SecuredByPerimeter */ + SecuredByPerimeter = "SecuredByPerimeter" } /** @@ -948,7 +1268,8 @@ export enum KnownPublicNetworkAccessFlag { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Enabled** \ - * **Disabled** + * **Disabled** \ + * **SecuredByPerimeter** */ export type PublicNetworkAccessFlag = string; @@ -991,6 +1312,24 @@ export enum KnownKeyType { */ export type KeyType = string; +/** Known values of {@link CleanupPolicyRetentionDescription} that the service accepts. */ +export enum KnownCleanupPolicyRetentionDescription { + /** Delete */ + Delete = "Delete", + /** Compaction */ + Compaction = "Compaction" +} + +/** + * Defines values for CleanupPolicyRetentionDescription. \ + * {@link KnownCleanupPolicyRetentionDescription} can be used interchangeably with CleanupPolicyRetentionDescription, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Delete** \ + * **Compaction** + */ +export type CleanupPolicyRetentionDescription = string; + /** Known values of {@link SchemaCompatibility} that the service accepts. */ export enum KnownSchemaCompatibility { /** None */ @@ -1029,25 +1368,51 @@ export enum KnownSchemaType { * **Avro** */ export type SchemaType = string; -/** Defines values for ManagedServiceIdentityType. */ -export type ManagedServiceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned, UserAssigned" - | "None"; -/** Defines values for EntityStatus. */ -export type EntityStatus = - | "Active" - | "Disabled" - | "Restoring" - | "SendDisabled" - | "ReceiveDisabled" - | "Creating" - | "Deleting" - | "Renaming" - | "Unknown"; -/** Defines values for EncodingCaptureDescription. */ -export type EncodingCaptureDescription = "Avro" | "AvroDeflate"; + +/** Known values of {@link ApplicationGroupPolicyType} that the service accepts. */ +export enum KnownApplicationGroupPolicyType { + /** ThrottlingPolicy */ + ThrottlingPolicy = "ThrottlingPolicy" +} + +/** + * Defines values for ApplicationGroupPolicyType. \ + * {@link KnownApplicationGroupPolicyType} can be used interchangeably with ApplicationGroupPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ThrottlingPolicy** + */ +export type ApplicationGroupPolicyType = string; + +/** Known values of {@link MetricId} that the service accepts. */ +export enum KnownMetricId { + /** IncomingBytes */ + IncomingBytes = "IncomingBytes", + /** OutgoingBytes */ + OutgoingBytes = "OutgoingBytes", + /** IncomingMessages */ + IncomingMessages = "IncomingMessages", + /** OutgoingMessages */ + OutgoingMessages = "OutgoingMessages" +} + +/** + * Defines values for MetricId. \ + * {@link KnownMetricId} can be used interchangeably with MetricId, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IncomingBytes** \ + * **OutgoingBytes** \ + * **IncomingMessages** \ + * **OutgoingMessages** + */ +export type MetricId = string; +/** Defines values for ManagedServiceIdentityType. */ +export type ManagedServiceIdentityType = + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned, UserAssigned" + | "None"; /** Defines values for UnavailableReason. */ export type UnavailableReason = | "None" @@ -1063,6 +1428,19 @@ export type RoleDisasterRecovery = | "Primary" | "PrimaryNotReplicating" | "Secondary"; +/** Defines values for EntityStatus. */ +export type EntityStatus = + | "Active" + | "Disabled" + | "Restoring" + | "SendDisabled" + | "ReceiveDisabled" + | "Creating" + | "Deleting" + | "Renaming" + | "Unknown"; +/** Defines values for EncodingCaptureDescription. */ +export type EncodingCaptureDescription = "Avro" | "AvroDeflate"; /** Optional parameters. */ export interface ClustersListAvailableClusterRegionOptionalParams @@ -1146,20 +1524,6 @@ export interface ClustersListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type ClustersListByResourceGroupNextResponse = ClusterListResult; -/** Optional parameters. */ -export interface ConfigurationPatchOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the patch operation. */ -export type ConfigurationPatchResponse = ClusterQuotaConfigurationProperties; - -/** Optional parameters. */ -export interface ConfigurationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ConfigurationGetResponse = ClusterQuotaConfigurationProperties; - /** Optional parameters. */ export interface NamespacesListOptionalParams extends coreClient.OperationOptions {} @@ -1342,106 +1706,55 @@ export interface PrivateLinkResourcesGetOptionalParams export type PrivateLinkResourcesGetResponse = PrivateLinkResourcesListResult; /** Optional parameters. */ -export interface OperationsListOptionalParams +export interface NetworkSecurityPerimeterConfigurationListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; +export type NetworkSecurityPerimeterConfigurationListResponse = NetworkSecurityPerimeterConfigurationList; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface EventHubsListByNamespaceOptionalParams +export interface NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ - skip?: number; - /** May be used to limit the number of results to the most recent N usageDetails. */ - top?: number; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByNamespace operation. */ -export type EventHubsListByNamespaceResponse = EventHubListResult; - /** Optional parameters. */ -export interface EventHubsCreateOrUpdateOptionalParams +export interface ConfigurationPatchOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type EventHubsCreateOrUpdateResponse = Eventhub; - -/** Optional parameters. */ -export interface EventHubsDeleteOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the patch operation. */ +export type ConfigurationPatchResponse = ClusterQuotaConfigurationProperties; /** Optional parameters. */ -export interface EventHubsGetOptionalParams +export interface ConfigurationGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type EventHubsGetResponse = Eventhub; +export type ConfigurationGetResponse = ClusterQuotaConfigurationProperties; /** Optional parameters. */ -export interface EventHubsListAuthorizationRulesOptionalParams +export interface DisasterRecoveryConfigsListAuthorizationRulesOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRules operation. */ -export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResult; - -/** Optional parameters. */ -export interface EventHubsCreateOrUpdateAuthorizationRuleOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdateAuthorizationRule operation. */ -export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule; +export type DisasterRecoveryConfigsListAuthorizationRulesResponse = AuthorizationRuleListResult; /** Optional parameters. */ -export interface EventHubsGetAuthorizationRuleOptionalParams +export interface DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getAuthorizationRule operation. */ -export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule; - -/** Optional parameters. */ -export interface EventHubsDeleteAuthorizationRuleOptionalParams - extends coreClient.OperationOptions {} +export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationRule; /** Optional parameters. */ -export interface EventHubsListKeysOptionalParams +export interface DisasterRecoveryConfigsListKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listKeys operation. */ -export type EventHubsListKeysResponse = AccessKeys; - -/** Optional parameters. */ -export interface EventHubsRegenerateKeysOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the regenerateKeys operation. */ -export type EventHubsRegenerateKeysResponse = AccessKeys; - -/** Optional parameters. */ -export interface EventHubsListByNamespaceNextOptionalParams - extends coreClient.OperationOptions { - /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ - skip?: number; - /** May be used to limit the number of results to the most recent N usageDetails. */ - top?: number; -} - -/** Contains response data for the listByNamespaceNext operation. */ -export type EventHubsListByNamespaceNextResponse = EventHubListResult; - -/** Optional parameters. */ -export interface EventHubsListAuthorizationRulesNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAuthorizationRulesNext operation. */ -export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListResult; +export type DisasterRecoveryConfigsListKeysResponse = AccessKeys; /** Optional parameters. */ export interface DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams @@ -1484,39 +1797,101 @@ export interface DisasterRecoveryConfigsFailOverOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface DisasterRecoveryConfigsListAuthorizationRulesOptionalParams +export interface DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAuthorizationRulesNext operation. */ +export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult; + +/** Optional parameters. */ +export interface DisasterRecoveryConfigsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult; + +/** Optional parameters. */ +export interface EventHubsListAuthorizationRulesOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRules operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesResponse = AuthorizationRuleListResult; +export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResult; /** Optional parameters. */ -export interface DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams +export interface EventHubsCreateOrUpdateAuthorizationRuleOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdateAuthorizationRule operation. */ +export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule; + +/** Optional parameters. */ +export interface EventHubsGetAuthorizationRuleOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getAuthorizationRule operation. */ -export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationRule; +export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule; /** Optional parameters. */ -export interface DisasterRecoveryConfigsListKeysOptionalParams +export interface EventHubsDeleteAuthorizationRuleOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface EventHubsListKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listKeys operation. */ -export type DisasterRecoveryConfigsListKeysResponse = AccessKeys; +export type EventHubsListKeysResponse = AccessKeys; /** Optional parameters. */ -export interface DisasterRecoveryConfigsListNextOptionalParams +export interface EventHubsRegenerateKeysOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult; +/** Contains response data for the regenerateKeys operation. */ +export type EventHubsRegenerateKeysResponse = AccessKeys; /** Optional parameters. */ -export interface DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams +export interface EventHubsListByNamespaceOptionalParams + extends coreClient.OperationOptions { + /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ + skip?: number; + /** May be used to limit the number of results to the most recent N usageDetails. */ + top?: number; +} + +/** Contains response data for the listByNamespace operation. */ +export type EventHubsListByNamespaceResponse = EventHubListResult; + +/** Optional parameters. */ +export interface EventHubsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type EventHubsCreateOrUpdateResponse = Eventhub; + +/** Optional parameters. */ +export interface EventHubsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface EventHubsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type EventHubsGetResponse = Eventhub; + +/** Optional parameters. */ +export interface EventHubsListAuthorizationRulesNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listAuthorizationRulesNext operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult; +export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListResult; + +/** Optional parameters. */ +export interface EventHubsListByNamespaceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByNamespaceNext operation. */ +export type EventHubsListByNamespaceNextResponse = EventHubListResult; /** Optional parameters. */ export interface ConsumerGroupsCreateOrUpdateOptionalParams @@ -1550,16 +1925,25 @@ export type ConsumerGroupsListByEventHubResponse = ConsumerGroupListResult; /** Optional parameters. */ export interface ConsumerGroupsListByEventHubNextOptionalParams - extends coreClient.OperationOptions { - /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ - skip?: number; - /** May be used to limit the number of results to the most recent N usageDetails. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByEventHubNext operation. */ export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + /** Optional parameters. */ export interface SchemaRegistryListByNamespaceOptionalParams extends coreClient.OperationOptions { @@ -1592,16 +1976,43 @@ export type SchemaRegistryGetResponse = SchemaGroup; /** Optional parameters. */ export interface SchemaRegistryListByNamespaceNextOptionalParams - extends coreClient.OperationOptions { - /** Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. */ - skip?: number; - /** May be used to limit the number of results to the most recent N usageDetails. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listByNamespaceNext operation. */ export type SchemaRegistryListByNamespaceNextResponse = SchemaGroupListResult; +/** Optional parameters. */ +export interface ApplicationGroupListByNamespaceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByNamespace operation. */ +export type ApplicationGroupListByNamespaceResponse = ApplicationGroupListResult; + +/** Optional parameters. */ +export interface ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdateApplicationGroup operation. */ +export type ApplicationGroupCreateOrUpdateApplicationGroupResponse = ApplicationGroup; + +/** Optional parameters. */ +export interface ApplicationGroupDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ApplicationGroupGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ApplicationGroupGetResponse = ApplicationGroup; + +/** Optional parameters. */ +export interface ApplicationGroupListByNamespaceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByNamespaceNext operation. */ +export type ApplicationGroupListByNamespaceNextResponse = ApplicationGroupListResult; + /** Optional parameters. */ export interface EventHubManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/eventhub/arm-eventhub/src/models/mappers.ts b/sdk/eventhub/arm-eventhub/src/models/mappers.ts index 075a3c30f9aa..50ec851e0de1 100644 --- a/sdk/eventhub/arm-eventhub/src/models/mappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/mappers.ts @@ -303,22 +303,6 @@ export const EHNamespaceIdContainer: coreClient.CompositeMapper = { } }; -export const ClusterQuotaConfigurationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterQuotaConfigurationProperties", - modelProperties: { - settings: { - serializedName: "settings", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - export const EHNamespaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -710,10 +694,10 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeterConfigurationList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "NetworkSecurityPerimeterConfigurationList", modelProperties: { value: { serializedName: "value", @@ -723,93 +707,99 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "NetworkSecurityPerimeterConfiguration" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const Operation: coreClient.CompositeMapper = { +export const ProvisioningIssue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "ProvisioningIssue", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", - type: { - name: "Boolean" - } - }, - display: { - serializedName: "display", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "OperationDisplay" + className: "ProvisioningIssueProperties" } - }, - origin: { - serializedName: "origin", + } + } + } +}; + +export const ProvisioningIssueProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProvisioningIssueProperties", + modelProperties: { + issueType: { + serializedName: "issueType", type: { name: "String" } }, - properties: { - serializedName: "properties", + description: { + serializedName: "description", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "String" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "NetworkSecurityPerimeter", modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, + id: { + serializedName: "id", type: { name: "String" } }, - resource: { - serializedName: "resource", - readOnly: true, + perimeterGuid: { + serializedName: "perimeterGuid", type: { name: "String" } }, - operation: { - serializedName: "operation", - readOnly: true, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - description: { - serializedName: "description", - readOnly: true, + accessMode: { + serializedName: "accessMode", type: { name: "String" } @@ -818,123 +808,143 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const EventHubListResult: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeterConfigurationPropertiesProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EventHubListResult", + className: "NetworkSecurityPerimeterConfigurationPropertiesProfile", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + accessRulesVersion: { + serializedName: "accessRulesVersion", + type: { + name: "String" + } + }, + accessRules: { + serializedName: "accessRules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Eventhub" + className: "NspAccessRule" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const CaptureDescription: coreClient.CompositeMapper = { +export const NspAccessRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CaptureDescription", + className: "NspAccessRule", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - encoding: { - serializedName: "encoding", + id: { + serializedName: "id", type: { - name: "Enum", - allowedValues: ["Avro", "AvroDeflate"] + name: "String" } }, - intervalInSeconds: { - serializedName: "intervalInSeconds", + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } }, - sizeLimitInBytes: { - serializedName: "sizeLimitInBytes", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" } }, - destination: { - serializedName: "destination", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "Destination" - } - }, - skipEmptyArchives: { - serializedName: "skipEmptyArchives", - type: { - name: "Boolean" + className: "NspAccessRuleProperties" } } } } }; -export const Destination: coreClient.CompositeMapper = { +export const NspAccessRuleProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Destination", + className: "NspAccessRuleProperties", modelProperties: { - name: { - serializedName: "name", + direction: { + serializedName: "direction", type: { name: "String" } }, - storageAccountResourceId: { - serializedName: "properties.storageAccountResourceId", - type: { - name: "String" - } - }, - blobContainer: { - serializedName: "properties.blobContainer", + addressPrefixes: { + serializedName: "addressPrefixes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - archiveNameFormat: { - serializedName: "properties.archiveNameFormat", + subscriptions: { + serializedName: "subscriptions", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NspAccessRulePropertiesSubscriptionsItem" + } + } } }, - dataLakeSubscriptionId: { - serializedName: "properties.dataLakeSubscriptionId", + networkSecurityPerimeters: { + serializedName: "networkSecurityPerimeters", + readOnly: true, type: { - name: "Uuid" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeter" + } + } } }, - dataLakeAccountName: { - serializedName: "properties.dataLakeAccountName", + fullyQualifiedDomainNames: { + serializedName: "fullyQualifiedDomainNames", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - dataLakeFolderPath: { - serializedName: "properties.dataLakeFolderPath", + } + } + } +}; + +export const NspAccessRulePropertiesSubscriptionsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NspAccessRulePropertiesSubscriptionsItem", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } @@ -943,112 +953,48 @@ export const Destination: coreClient.CompositeMapper = { } }; -export const CheckNameAvailabilityParameter: coreClient.CompositeMapper = { +export const ClusterQuotaConfigurationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityParameter", + className: "ClusterQuotaConfigurationProperties", modelProperties: { - name: { - serializedName: "name", - required: true, + settings: { + serializedName: "settings", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { +export const NWRuleSetVirtualNetworkRules: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityResult", + className: "NWRuleSetVirtualNetworkRules", modelProperties: { - message: { - serializedName: "message", - readOnly: true, + subnet: { + serializedName: "subnet", type: { - name: "String" + name: "Composite", + className: "Subnet" } }, - nameAvailable: { - serializedName: "nameAvailable", + ignoreMissingVnetServiceEndpoint: { + serializedName: "ignoreMissingVnetServiceEndpoint", type: { name: "Boolean" } - }, - reason: { - serializedName: "reason", - type: { - name: "Enum", - allowedValues: [ - "None", - "InvalidName", - "SubscriptionIsDisabled", - "NameInUse", - "NameInLockdown", - "TooManyNamespaceInCurrentSubscription" - ] - } } } } }; -export const ArmDisasterRecoveryListResult: coreClient.CompositeMapper = { +export const Subnet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArmDisasterRecoveryListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArmDisasterRecovery" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const NWRuleSetVirtualNetworkRules: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NWRuleSetVirtualNetworkRules", - modelProperties: { - subnet: { - serializedName: "subnet", - type: { - name: "Composite", - className: "Subnet" - } - }, - ignoreMissingVnetServiceEndpoint: { - serializedName: "ignoreMissingVnetServiceEndpoint", - type: { - name: "Boolean" - } - } - } - } -}; - -export const Subnet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Subnet", + className: "Subnet", modelProperties: { id: { serializedName: "id", @@ -1215,6 +1161,58 @@ export const RegenerateAccessKeyParameters: coreClient.CompositeMapper = { } }; +export const CheckNameAvailabilityParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityParameter", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CheckNameAvailabilityResult", + modelProperties: { + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "Enum", + allowedValues: [ + "None", + "InvalidName", + "SubscriptionIsDisabled", + "NameInUse", + "NameInLockdown", + "TooManyNamespaceInCurrentSubscription" + ] + } + } + } + } +}; + export const ConsumerGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1242,10 +1240,10 @@ export const ConsumerGroupListResult: coreClient.CompositeMapper = { } }; -export const SchemaGroupListResult: coreClient.CompositeMapper = { +export const ArmDisasterRecoveryListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SchemaGroupListResult", + className: "ArmDisasterRecoveryListResult", modelProperties: { value: { serializedName: "value", @@ -1254,13 +1252,14 @@ export const SchemaGroupListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SchemaGroup" + className: "ArmDisasterRecovery" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -1269,197 +1268,453 @@ export const SchemaGroupListResult: coreClient.CompositeMapper = { } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "OperationListResult", modelProperties: { - ...Resource.type.modelProperties, - location: { - serializedName: "location", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - tags: { - serializedName: "tags", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } } } } }; -export const PrivateEndpointConnection: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnection", + className: "Operation", modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", + isDataAction: { + serializedName: "isDataAction", type: { - name: "Composite", - className: "PrivateEndpoint" + name: "Boolean" } }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", + display: { + serializedName: "display", type: { name: "Composite", - className: "ConnectionState" + className: "OperationDisplay" } }, - provisioningState: { - serializedName: "properties.provisioningState", + origin: { + serializedName: "origin", type: { name: "String" } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } } } } }; -export const Eventhub: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Eventhub", + className: "OperationDisplay", modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + provider: { + serializedName: "provider", + readOnly: true, type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - partitionIds: { - serializedName: "properties.partitionIds", + 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 EventHubListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EventHubListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Eventhub" } } } }, - createdAt: { - serializedName: "properties.createdAt", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const CaptureDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CaptureDescription", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" } }, - updatedAt: { - serializedName: "properties.updatedAt", - readOnly: true, + encoding: { + serializedName: "encoding", type: { - name: "DateTime" + name: "Enum", + allowedValues: ["Avro", "AvroDeflate"] } }, - messageRetentionInDays: { - constraints: { - InclusiveMinimum: 1 - }, - serializedName: "properties.messageRetentionInDays", + intervalInSeconds: { + serializedName: "intervalInSeconds", type: { name: "Number" } }, - partitionCount: { - constraints: { - InclusiveMinimum: 1 - }, - serializedName: "properties.partitionCount", + sizeLimitInBytes: { + serializedName: "sizeLimitInBytes", type: { name: "Number" } }, - status: { - serializedName: "properties.status", + destination: { + serializedName: "destination", type: { - name: "Enum", - allowedValues: [ - "Active", - "Disabled", - "Restoring", - "SendDisabled", - "ReceiveDisabled", - "Creating", - "Deleting", - "Renaming", - "Unknown" - ] + name: "Composite", + className: "Destination" + } + }, + skipEmptyArchives: { + serializedName: "skipEmptyArchives", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Destination: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Destination", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + storageAccountResourceId: { + serializedName: "properties.storageAccountResourceId", + type: { + name: "String" + } + }, + blobContainer: { + serializedName: "properties.blobContainer", + type: { + name: "String" + } + }, + archiveNameFormat: { + serializedName: "properties.archiveNameFormat", + type: { + name: "String" + } + }, + dataLakeSubscriptionId: { + serializedName: "properties.dataLakeSubscriptionId", + type: { + name: "Uuid" + } + }, + dataLakeAccountName: { + serializedName: "properties.dataLakeAccountName", + type: { + name: "String" + } + }, + dataLakeFolderPath: { + serializedName: "properties.dataLakeFolderPath", + type: { + name: "String" + } + } + } + } +}; + +export const RetentionDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RetentionDescription", + modelProperties: { + cleanupPolicy: { + serializedName: "cleanupPolicy", + type: { + name: "String" + } + }, + retentionTimeInHours: { + serializedName: "retentionTimeInHours", + type: { + name: "Number" + } + }, + tombstoneRetentionTimeInHours: { + serializedName: "tombstoneRetentionTimeInHours", + type: { + name: "Number" + } + } + } + } +}; + +export const SchemaGroupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SchemaGroupListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SchemaGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationGroupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGroupListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ApplicationGroupPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGroupPolicy", + uberParent: "ApplicationGroupPolicy", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ConnectionState" } }, - captureDescription: { - serializedName: "properties.captureDescription", + provisioningState: { + serializedName: "properties.provisioningState", type: { - name: "Composite", - className: "CaptureDescription" + name: "String" } } } } }; -export const ArmDisasterRecovery: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArmDisasterRecovery", + className: "NetworkSecurityPerimeterConfiguration", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, provisioningState: { serializedName: "properties.provisioningState", - readOnly: true, type: { - name: "Enum", - allowedValues: ["Accepted", "Succeeded", "Failed"] + name: "String" } }, - partnerNamespace: { - serializedName: "properties.partnerNamespace", + provisioningIssues: { + serializedName: "properties.provisioningIssues", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisioningIssue" + } + } } }, - alternateName: { - serializedName: "properties.alternateName", + networkSecurityPerimeter: { + serializedName: "properties.networkSecurityPerimeter", type: { - name: "String" + name: "Composite", + className: "NetworkSecurityPerimeter" } }, - role: { - serializedName: "properties.role", - readOnly: true, + resourceAssociation: { + serializedName: "properties.resourceAssociation", type: { - name: "Enum", - allowedValues: ["Primary", "PrimaryNotReplicating", "Secondary"] + name: "Composite", + className: + "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation" } }, - pendingReplicationOperationsCount: { - serializedName: "properties.pendingReplicationOperationsCount", - readOnly: true, + profile: { + serializedName: "properties.profile", type: { - name: "Number" + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationPropertiesProfile" } } } @@ -1591,6 +1846,150 @@ export const ConsumerGroup: coreClient.CompositeMapper = { } }; +export const ArmDisasterRecovery: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArmDisasterRecovery", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Accepted", "Succeeded", "Failed"] + } + }, + partnerNamespace: { + serializedName: "properties.partnerNamespace", + type: { + name: "String" + } + }, + alternateName: { + serializedName: "properties.alternateName", + type: { + name: "String" + } + }, + role: { + serializedName: "properties.role", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Primary", "PrimaryNotReplicating", "Secondary"] + } + }, + pendingReplicationOperationsCount: { + serializedName: "properties.pendingReplicationOperationsCount", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const Eventhub: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Eventhub", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + partitionIds: { + serializedName: "properties.partitionIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + createdAt: { + serializedName: "properties.createdAt", + readOnly: true, + type: { + name: "DateTime" + } + }, + updatedAt: { + serializedName: "properties.updatedAt", + readOnly: true, + type: { + name: "DateTime" + } + }, + messageRetentionInDays: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "properties.messageRetentionInDays", + type: { + name: "Number" + } + }, + partitionCount: { + constraints: { + InclusiveMinimum: 1 + }, + serializedName: "properties.partitionCount", + type: { + name: "Number" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "Enum", + allowedValues: [ + "Active", + "Disabled", + "Restoring", + "SendDisabled", + "ReceiveDisabled", + "Creating", + "Deleting", + "Renaming", + "Unknown" + ] + } + }, + captureDescription: { + serializedName: "properties.captureDescription", + type: { + name: "Composite", + className: "CaptureDescription" + } + }, + retentionDescription: { + serializedName: "properties.retentionDescription", + type: { + name: "Composite", + className: "RetentionDescription" + } + } + } + } +}; + export const SchemaGroup: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1648,6 +2047,75 @@ export const SchemaGroup: coreClient.CompositeMapper = { } }; +export const ApplicationGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplicationGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + isEnabled: { + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + }, + clientAppGroupIdentifier: { + serializedName: "properties.clientAppGroupIdentifier", + type: { + name: "String" + } + }, + policies: { + serializedName: "properties.policies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ApplicationGroupPolicy" + } + } + } + } + } + } +}; + +export const ThrottlingPolicy: coreClient.CompositeMapper = { + serializedName: "ThrottlingPolicy", + type: { + name: "Composite", + className: "ThrottlingPolicy", + uberParent: "ApplicationGroupPolicy", + polymorphicDiscriminator: + ApplicationGroupPolicy.type.polymorphicDiscriminator, + modelProperties: { + ...ApplicationGroupPolicy.type.modelProperties, + rateLimitThreshold: { + serializedName: "rateLimitThreshold", + required: true, + type: { + name: "Number" + } + }, + metricId: { + serializedName: "metricId", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const Cluster: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1695,6 +2163,12 @@ export const Cluster: coreClient.CompositeMapper = { type: { name: "String" } + }, + supportsScaling: { + serializedName: "properties.supportsScaling", + type: { + name: "Boolean" + } } } } @@ -1727,6 +2201,12 @@ export const EHNamespace: coreClient.CompositeMapper = { className: "SystemData" } }, + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -1781,6 +2261,13 @@ export const EHNamespace: coreClient.CompositeMapper = { name: "Boolean" } }, + publicNetworkAccess: { + defaultValue: "Enabled", + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, maximumThroughputUnits: { serializedName: "properties.maximumThroughputUnits", type: { @@ -1833,3 +2320,8 @@ export const EHNamespace: coreClient.CompositeMapper = { } } }; + +export let discriminators = { + ApplicationGroupPolicy: ApplicationGroupPolicy, + "ApplicationGroupPolicy.ThrottlingPolicy": ThrottlingPolicy +}; diff --git a/sdk/eventhub/arm-eventhub/src/models/parameters.ts b/sdk/eventhub/arm-eventhub/src/models/parameters.ts index af93c5af2254..42b2cd4bfa38 100644 --- a/sdk/eventhub/arm-eventhub/src/models/parameters.ts +++ b/sdk/eventhub/arm-eventhub/src/models/parameters.ts @@ -13,17 +13,18 @@ import { } from "@azure/core-client"; import { Cluster as ClusterMapper, - ClusterQuotaConfigurationProperties as ClusterQuotaConfigurationPropertiesMapper, EHNamespace as EHNamespaceMapper, NetworkRuleSet as NetworkRuleSetMapper, AuthorizationRule as AuthorizationRuleMapper, RegenerateAccessKeyParameters as RegenerateAccessKeyParametersMapper, CheckNameAvailabilityParameter as CheckNameAvailabilityParameterMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, - Eventhub as EventhubMapper, + ClusterQuotaConfigurationProperties as ClusterQuotaConfigurationPropertiesMapper, ArmDisasterRecovery as ArmDisasterRecoveryMapper, + Eventhub as EventhubMapper, ConsumerGroup as ConsumerGroupMapper, - SchemaGroup as SchemaGroupMapper + SchemaGroup as SchemaGroupMapper, + ApplicationGroup as ApplicationGroupMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -64,7 +65,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-11-01", + defaultValue: "2022-10-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -133,11 +134,6 @@ export const nextLink: OperationURLParameter = { }; export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: ClusterQuotaConfigurationPropertiesMapper -}; - -export const parameters2: OperationParameter = { parameterPath: "parameters", mapper: EHNamespaceMapper }; @@ -157,12 +153,12 @@ export const namespaceName: OperationURLParameter = { } }; -export const parameters3: OperationParameter = { +export const parameters2: OperationParameter = { parameterPath: "parameters", mapper: NetworkRuleSetMapper }; -export const parameters4: OperationParameter = { +export const parameters3: OperationParameter = { parameterPath: "parameters", mapper: AuthorizationRuleMapper }; @@ -181,17 +177,17 @@ export const authorizationRuleName: OperationURLParameter = { } }; -export const parameters5: OperationParameter = { +export const parameters4: OperationParameter = { parameterPath: "parameters", mapper: RegenerateAccessKeyParametersMapper }; -export const parameters6: OperationParameter = { +export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: CheckNameAvailabilityParameterMapper }; -export const parameters7: OperationParameter = { +export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper }; @@ -207,37 +203,40 @@ export const privateEndpointConnectionName: OperationURLParameter = { } }; -export const skip: OperationQueryParameter = { - parameterPath: ["options", "skip"], +export const resourceAssociationName: OperationURLParameter = { + parameterPath: "resourceAssociationName", mapper: { - constraints: { - InclusiveMaximum: 1000, - InclusiveMinimum: 0 - }, - serializedName: "$skip", + serializedName: "resourceAssociationName", + required: true, type: { - name: "Number" + name: "String" } } }; -export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], +export const parameters7: OperationParameter = { + parameterPath: "parameters", + mapper: ClusterQuotaConfigurationPropertiesMapper +}; + +export const alias: OperationURLParameter = { + parameterPath: "alias", mapper: { constraints: { - InclusiveMaximum: 1000, - InclusiveMinimum: 1 + MaxLength: 50, + MinLength: 1 }, - serializedName: "$top", + serializedName: "alias", + required: true, type: { - name: "Number" + name: "String" } } }; export const parameters8: OperationParameter = { parameterPath: "parameters", - mapper: EventhubMapper + mapper: ArmDisasterRecoveryMapper }; export const eventHubName: OperationURLParameter = { @@ -255,26 +254,39 @@ export const eventHubName: OperationURLParameter = { } }; -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: ArmDisasterRecoveryMapper +export const skip: OperationQueryParameter = { + parameterPath: ["options", "skip"], + mapper: { + constraints: { + InclusiveMaximum: 1000, + InclusiveMinimum: 0 + }, + serializedName: "$skip", + type: { + name: "Number" + } + } }; -export const alias: OperationURLParameter = { - parameterPath: "alias", +export const top: OperationQueryParameter = { + parameterPath: ["options", "top"], mapper: { constraints: { - MaxLength: 50, - MinLength: 1 + InclusiveMaximum: 1000, + InclusiveMinimum: 1 }, - serializedName: "alias", - required: true, + serializedName: "$top", type: { - name: "String" + name: "Number" } } }; +export const parameters9: OperationParameter = { + parameterPath: "parameters", + mapper: EventhubMapper +}; + export const parameters10: OperationParameter = { parameterPath: "parameters", mapper: ConsumerGroupMapper @@ -314,3 +326,23 @@ export const schemaGroupName: OperationURLParameter = { } } }; + +export const parameters12: OperationParameter = { + parameterPath: "parameters", + mapper: ApplicationGroupMapper +}; + +export const applicationGroupName: OperationURLParameter = { + parameterPath: "applicationGroupName", + mapper: { + constraints: { + MaxLength: 256, + MinLength: 1 + }, + serializedName: "applicationGroupName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts b/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts new file mode 100644 index 000000000000..061b6d441c39 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts @@ -0,0 +1,343 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ApplicationGroupOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClient } from "../eventHubManagementClient"; +import { + ApplicationGroup, + ApplicationGroupListByNamespaceNextOptionalParams, + ApplicationGroupListByNamespaceOptionalParams, + ApplicationGroupListByNamespaceResponse, + ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams, + ApplicationGroupCreateOrUpdateApplicationGroupResponse, + ApplicationGroupDeleteOptionalParams, + ApplicationGroupGetOptionalParams, + ApplicationGroupGetResponse, + ApplicationGroupListByNamespaceNextResponse +} from "../models"; + +/// +/** Class containing ApplicationGroupOperations operations. */ +export class ApplicationGroupOperationsImpl + implements ApplicationGroupOperations { + private readonly client: EventHubManagementClient; + + /** + * Initialize a new instance of the class ApplicationGroupOperations class. + * @param client Reference to the service client + */ + constructor(client: EventHubManagementClient) { + this.client = client; + } + + /** + * Gets a list of application groups for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The options parameters. + */ + public listByNamespace( + resourceGroupName: string, + namespaceName: string, + options?: ApplicationGroupListByNamespaceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByNamespacePagingAll( + resourceGroupName, + namespaceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByNamespacePagingPage( + resourceGroupName, + namespaceName, + options, + settings + ); + } + }; + } + + private async *listByNamespacePagingPage( + resourceGroupName: string, + namespaceName: string, + options?: ApplicationGroupListByNamespaceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ApplicationGroupListByNamespaceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByNamespace( + resourceGroupName, + namespaceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByNamespaceNext( + resourceGroupName, + namespaceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByNamespacePagingAll( + resourceGroupName: string, + namespaceName: string, + options?: ApplicationGroupListByNamespaceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByNamespacePagingPage( + resourceGroupName, + namespaceName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of application groups for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The options parameters. + */ + private _listByNamespace( + resourceGroupName: string, + namespaceName: string, + options?: ApplicationGroupListByNamespaceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, options }, + listByNamespaceOperationSpec + ); + } + + /** + * Creates or updates an ApplicationGroup for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param applicationGroupName The Application Group name + * @param parameters The ApplicationGroup. + * @param options The options parameters. + */ + createOrUpdateApplicationGroup( + resourceGroupName: string, + namespaceName: string, + applicationGroupName: string, + parameters: ApplicationGroup, + options?: ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + applicationGroupName, + parameters, + options + }, + createOrUpdateApplicationGroupOperationSpec + ); + } + + /** + * Deletes an ApplicationGroup for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param applicationGroupName The Application Group name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + namespaceName: string, + applicationGroupName: string, + options?: ApplicationGroupDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, applicationGroupName, options }, + deleteOperationSpec + ); + } + + /** + * Gets an ApplicationGroup for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param applicationGroupName The Application Group name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + namespaceName: string, + applicationGroupName: string, + options?: ApplicationGroupGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, applicationGroupName, options }, + getOperationSpec + ); + } + + /** + * ListByNamespaceNext + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param nextLink The nextLink from the previous successful call to the ListByNamespace method. + * @param options The options parameters. + */ + private _listByNamespaceNext( + resourceGroupName: string, + namespaceName: string, + nextLink: string, + options?: ApplicationGroupListByNamespaceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, nextLink, options }, + listByNamespaceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByNamespaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateApplicationGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.applicationGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByNamespaceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ApplicationGroupListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.namespaceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts index de448d9e9b05..5581a350b34b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Cluster, ClustersListBySubscriptionNextOptionalParams, @@ -245,8 +249,8 @@ export class ClustersImpl implements Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateOrUpdateResponse > > { @@ -256,7 +260,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -289,13 +293,16 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ClustersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -337,8 +344,8 @@ export class ClustersImpl implements Clusters { parameters: Cluster, options?: ClustersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersUpdateResponse > > { @@ -348,7 +355,7 @@ export class ClustersImpl implements Clusters { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -381,13 +388,16 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, parameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ClustersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -426,14 +436,14 @@ export class ClustersImpl implements Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -466,13 +476,13 @@ export class ClustersImpl implements Clusters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -748,7 +758,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -768,7 +777,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/eventhub/arm-eventhub/src/operations/configuration.ts b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts index ff2c66efb613..dfcd64703aa2 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/configuration.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts @@ -88,7 +88,7 @@ const patchOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts index a6c267398b9b..5fe6ade61dcb 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts @@ -368,7 +368,6 @@ const listByEventHubNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 28c65a8f4489..af5c19cd4779 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -14,14 +14,18 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; import { - ArmDisasterRecovery, - DisasterRecoveryConfigsListNextOptionalParams, - DisasterRecoveryConfigsListOptionalParams, - DisasterRecoveryConfigsListResponse, AuthorizationRule, DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams, DisasterRecoveryConfigsListAuthorizationRulesOptionalParams, DisasterRecoveryConfigsListAuthorizationRulesResponse, + ArmDisasterRecovery, + DisasterRecoveryConfigsListNextOptionalParams, + DisasterRecoveryConfigsListOptionalParams, + DisasterRecoveryConfigsListResponse, + DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams, + DisasterRecoveryConfigsGetAuthorizationRuleResponse, + DisasterRecoveryConfigsListKeysOptionalParams, + DisasterRecoveryConfigsListKeysResponse, CheckNameAvailabilityParameter, DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams, DisasterRecoveryConfigsCheckNameAvailabilityResponse, @@ -32,12 +36,8 @@ import { DisasterRecoveryConfigsGetResponse, DisasterRecoveryConfigsBreakPairingOptionalParams, DisasterRecoveryConfigsFailOverOptionalParams, - DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams, - DisasterRecoveryConfigsGetAuthorizationRuleResponse, - DisasterRecoveryConfigsListKeysOptionalParams, - DisasterRecoveryConfigsListKeysResponse, - DisasterRecoveryConfigsListNextResponse, - DisasterRecoveryConfigsListAuthorizationRulesNextResponse + DisasterRecoveryConfigsListAuthorizationRulesNextResponse, + DisasterRecoveryConfigsListNextResponse } from "../models"; /// @@ -54,17 +54,24 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { } /** - * Gets all Alias(Disaster Recovery configurations) + * Gets a list of authorization rules for a Namespace. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name * @param options The options parameters. */ - public list( + public listAuthorizationRules( resourceGroupName: string, namespaceName: string, - options?: DisasterRecoveryConfigsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, namespaceName, options); + alias: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAuthorizationRulesPagingAll( + resourceGroupName, + namespaceName, + alias, + options + ); return { next() { return iter.next(); @@ -76,9 +83,10 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage( + return this.listAuthorizationRulesPagingPage( resourceGroupName, namespaceName, + alias, options, settings ); @@ -86,25 +94,32 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { }; } - private async *listPagingPage( + private async *listAuthorizationRulesPagingPage( resourceGroupName: string, namespaceName: string, - options?: DisasterRecoveryConfigsListOptionalParams, + alias: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: DisasterRecoveryConfigsListResponse; + ): AsyncIterableIterator { + let result: DisasterRecoveryConfigsListAuthorizationRulesResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(resourceGroupName, namespaceName, options); + result = await this._listAuthorizationRules( + resourceGroupName, + namespaceName, + alias, + options + ); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext( + result = await this._listAuthorizationRulesNext( resourceGroupName, namespaceName, + alias, continuationToken, options ); @@ -115,14 +130,16 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { } } - private async *listPagingAll( + private async *listAuthorizationRulesPagingAll( resourceGroupName: string, namespaceName: string, - options?: DisasterRecoveryConfigsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( + alias: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAuthorizationRulesPagingPage( resourceGroupName, namespaceName, + alias, options )) { yield* page; @@ -130,24 +147,17 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { } /** - * Gets a list of authorization rules for a Namespace. + * Gets all Alias(Disaster Recovery configurations) * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name * @param options The options parameters. */ - public listAuthorizationRules( + public list( resourceGroupName: string, namespaceName: string, - alias: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listAuthorizationRulesPagingAll( - resourceGroupName, - namespaceName, - alias, - options - ); + options?: DisasterRecoveryConfigsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, namespaceName, options); return { next() { return iter.next(); @@ -159,10 +169,9 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listAuthorizationRulesPagingPage( + return this.listPagingPage( resourceGroupName, namespaceName, - alias, options, settings ); @@ -170,32 +179,25 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { }; } - private async *listAuthorizationRulesPagingPage( + private async *listPagingPage( resourceGroupName: string, namespaceName: string, - alias: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams, + options?: DisasterRecoveryConfigsListOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: DisasterRecoveryConfigsListAuthorizationRulesResponse; + ): AsyncIterableIterator { + let result: DisasterRecoveryConfigsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listAuthorizationRules( - resourceGroupName, - namespaceName, - alias, - options - ); + result = await this._list(resourceGroupName, namespaceName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listAuthorizationRulesNext( + result = await this._listNext( resourceGroupName, namespaceName, - alias, continuationToken, options ); @@ -206,22 +208,93 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { } } - private async *listAuthorizationRulesPagingAll( + private async *listPagingAll( resourceGroupName: string, namespaceName: string, - alias: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listAuthorizationRulesPagingPage( + options?: DisasterRecoveryConfigsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( resourceGroupName, namespaceName, - alias, options )) { yield* page; } } + /** + * Gets a list of authorization rules for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param options The options parameters. + */ + private _listAuthorizationRules( + resourceGroupName: string, + namespaceName: string, + alias: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, alias, options }, + listAuthorizationRulesOperationSpec + ); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @param options The options parameters. + */ + getAuthorizationRule( + resourceGroupName: string, + namespaceName: string, + alias: string, + authorizationRuleName: string, + options?: DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + alias, + authorizationRuleName, + options + }, + getAuthorizationRuleOperationSpec + ); + } + + /** + * Gets the primary and secondary connection strings for the Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + namespaceName: string, + alias: string, + authorizationRuleName: string, + options?: DisasterRecoveryConfigsListKeysOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + alias, + authorizationRuleName, + options + }, + listKeysOperationSpec + ); + } + /** * Check the give Namespace name availability. * @param resourceGroupName Name of the resource group within the azure subscription. @@ -357,75 +430,23 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { } /** - * Gets a list of authorization rules for a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name - * @param options The options parameters. - */ - private _listAuthorizationRules( - resourceGroupName: string, - namespaceName: string, - alias: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, alias, options }, - listAuthorizationRulesOperationSpec - ); - } - - /** - * Gets an AuthorizationRule for a Namespace by rule name. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name - * @param authorizationRuleName The authorization rule name. - * @param options The options parameters. - */ - getAuthorizationRule( - resourceGroupName: string, - namespaceName: string, - alias: string, - authorizationRuleName: string, - options?: DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - namespaceName, - alias, - authorizationRuleName, - options - }, - getAuthorizationRuleOperationSpec - ); - } - - /** - * Gets the primary and secondary connection strings for the Namespace. + * ListAuthorizationRulesNext * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name - * @param authorizationRuleName The authorization rule name. + * @param nextLink The nextLink from the previous successful call to the ListAuthorizationRules method. * @param options The options parameters. */ - listKeys( + private _listAuthorizationRulesNext( resourceGroupName: string, namespaceName: string, alias: string, - authorizationRuleName: string, - options?: DisasterRecoveryConfigsListKeysOptionalParams - ): Promise { + nextLink: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - namespaceName, - alias, - authorizationRuleName, - options - }, - listKeysOperationSpec + { resourceGroupName, namespaceName, alias, nextLink, options }, + listAuthorizationRulesNextOperationSpec ); } @@ -447,62 +468,40 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { listNextOperationSpec ); } - - /** - * ListAuthorizationRulesNext - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name - * @param nextLink The nextLink from the previous successful call to the ListAuthorizationRules method. - * @param options The options parameters. - */ - private _listAuthorizationRulesNext( - resourceGroupName: string, - namespaceName: string, - alias: string, - nextLink: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, alias, nextLink, options }, - listAuthorizationRulesNextOperationSpec - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { +const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName + Parameters.namespaceName, + Parameters.alias ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listOperationSpec: coreClient.OperationSpec = { +const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecoveryListResult + bodyMapper: Mappers.AuthorizationRule }, default: { bodyMapper: Mappers.ErrorResponse @@ -513,66 +512,68 @@ const listOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName + Parameters.namespaceName, + Parameters.authorizationRuleName, + Parameters.alias ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const listKeysOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", - httpMethod: "PUT", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecovery + bodyMapper: Mappers.AccessKeys }, - 201: {}, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.authorizationRuleName, Parameters.alias ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const deleteOperationSpec: coreClient.OperationSpec = { +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", - httpMethod: "DELETE", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", + httpMethod: "POST", responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResult + }, default: { bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName, - Parameters.alias + Parameters.namespaceName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecovery + bodyMapper: Mappers.ArmDisasterRecoveryListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -583,22 +584,27 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName, - Parameters.alias + Parameters.namespaceName ], headerParameters: [Parameters.accept], serializer }; -const breakPairingOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", + httpMethod: "PUT", responses: { - 200: {}, + 200: { + bodyMapper: Mappers.ArmDisasterRecovery + }, + 201: { + bodyMapper: Mappers.ArmDisasterRecovery + }, default: { bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -607,15 +613,17 @@ const breakPairingOperationSpec: coreClient.OperationSpec = { Parameters.namespaceName, Parameters.alias ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const failOverOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", + httpMethod: "DELETE", responses: { 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -631,13 +639,13 @@ const failOverOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.ArmDisasterRecovery }, default: { bodyMapper: Mappers.ErrorResponse @@ -654,14 +662,12 @@ const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = { +const breakPairingOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", + httpMethod: "POST", responses: { - 200: { - bodyMapper: Mappers.AuthorizationRule - }, + 200: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -672,20 +678,17 @@ const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.authorizationRuleName, Parameters.alias ], headerParameters: [Parameters.accept], serializer }; -const listKeysOperationSpec: coreClient.OperationSpec = { +const failOverOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", httpMethod: "POST", responses: { - 200: { - bodyMapper: Mappers.AccessKeys - }, + 200: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -696,53 +699,50 @@ const listKeysOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.authorizationRuleName, Parameters.alias ], headerParameters: [Parameters.accept], serializer }; -const listNextOperationSpec: coreClient.OperationSpec = { +const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecoveryListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.nextLink, - Parameters.namespaceName + Parameters.namespaceName, + Parameters.alias ], headerParameters: [Parameters.accept], serializer }; -const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.ArmDisasterRecoveryListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.nextLink, - Parameters.namespaceName, - Parameters.alias + Parameters.namespaceName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts index 65d03c82debd..342dc65bcc35 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts @@ -14,19 +14,14 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; import { - Eventhub, - EventHubsListByNamespaceNextOptionalParams, - EventHubsListByNamespaceOptionalParams, - EventHubsListByNamespaceResponse, AuthorizationRule, EventHubsListAuthorizationRulesNextOptionalParams, EventHubsListAuthorizationRulesOptionalParams, EventHubsListAuthorizationRulesResponse, - EventHubsCreateOrUpdateOptionalParams, - EventHubsCreateOrUpdateResponse, - EventHubsDeleteOptionalParams, - EventHubsGetOptionalParams, - EventHubsGetResponse, + Eventhub, + EventHubsListByNamespaceNextOptionalParams, + EventHubsListByNamespaceOptionalParams, + EventHubsListByNamespaceResponse, EventHubsCreateOrUpdateAuthorizationRuleOptionalParams, EventHubsCreateOrUpdateAuthorizationRuleResponse, EventHubsGetAuthorizationRuleOptionalParams, @@ -37,8 +32,13 @@ import { RegenerateAccessKeyParameters, EventHubsRegenerateKeysOptionalParams, EventHubsRegenerateKeysResponse, - EventHubsListByNamespaceNextResponse, - EventHubsListAuthorizationRulesNextResponse + EventHubsCreateOrUpdateOptionalParams, + EventHubsCreateOrUpdateResponse, + EventHubsDeleteOptionalParams, + EventHubsGetOptionalParams, + EventHubsGetResponse, + EventHubsListAuthorizationRulesNextResponse, + EventHubsListByNamespaceNextResponse } from "../models"; /// @@ -55,19 +55,22 @@ export class EventHubsImpl implements EventHubs { } /** - * Gets all the Event Hubs in a Namespace. + * Gets the authorization rules for an Event Hub. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name * @param options The options parameters. */ - public listByNamespace( + public listAuthorizationRules( resourceGroupName: string, namespaceName: string, - options?: EventHubsListByNamespaceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByNamespacePagingAll( + eventHubName: string, + options?: EventHubsListAuthorizationRulesOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAuthorizationRulesPagingAll( resourceGroupName, namespaceName, + eventHubName, options ); return { @@ -81,9 +84,10 @@ export class EventHubsImpl implements EventHubs { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByNamespacePagingPage( + return this.listAuthorizationRulesPagingPage( resourceGroupName, namespaceName, + eventHubName, options, settings ); @@ -91,18 +95,20 @@ export class EventHubsImpl implements EventHubs { }; } - private async *listByNamespacePagingPage( + private async *listAuthorizationRulesPagingPage( resourceGroupName: string, namespaceName: string, - options?: EventHubsListByNamespaceOptionalParams, + eventHubName: string, + options?: EventHubsListAuthorizationRulesOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: EventHubsListByNamespaceResponse; + ): AsyncIterableIterator { + let result: EventHubsListAuthorizationRulesResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByNamespace( + result = await this._listAuthorizationRules( resourceGroupName, namespaceName, + eventHubName, options ); let page = result.value || []; @@ -111,9 +117,10 @@ export class EventHubsImpl implements EventHubs { yield page; } while (continuationToken) { - result = await this._listByNamespaceNext( + result = await this._listAuthorizationRulesNext( resourceGroupName, namespaceName, + eventHubName, continuationToken, options ); @@ -124,14 +131,16 @@ export class EventHubsImpl implements EventHubs { } } - private async *listByNamespacePagingAll( + private async *listAuthorizationRulesPagingAll( resourceGroupName: string, namespaceName: string, - options?: EventHubsListByNamespaceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByNamespacePagingPage( + eventHubName: string, + options?: EventHubsListAuthorizationRulesOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAuthorizationRulesPagingPage( resourceGroupName, namespaceName, + eventHubName, options )) { yield* page; @@ -139,22 +148,19 @@ export class EventHubsImpl implements EventHubs { } /** - * Gets the authorization rules for an Event Hub. + * Gets all the Event Hubs in a Namespace. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name * @param options The options parameters. */ - public listAuthorizationRules( + public listByNamespace( resourceGroupName: string, namespaceName: string, - eventHubName: string, - options?: EventHubsListAuthorizationRulesOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listAuthorizationRulesPagingAll( + options?: EventHubsListByNamespaceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByNamespacePagingAll( resourceGroupName, namespaceName, - eventHubName, options ); return { @@ -168,10 +174,9 @@ export class EventHubsImpl implements EventHubs { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listAuthorizationRulesPagingPage( + return this.listByNamespacePagingPage( resourceGroupName, namespaceName, - eventHubName, options, settings ); @@ -179,20 +184,18 @@ export class EventHubsImpl implements EventHubs { }; } - private async *listAuthorizationRulesPagingPage( + private async *listByNamespacePagingPage( resourceGroupName: string, namespaceName: string, - eventHubName: string, - options?: EventHubsListAuthorizationRulesOptionalParams, + options?: EventHubsListByNamespaceOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: EventHubsListAuthorizationRulesResponse; + ): AsyncIterableIterator { + let result: EventHubsListByNamespaceResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listAuthorizationRules( + result = await this._listByNamespace( resourceGroupName, namespaceName, - eventHubName, options ); let page = result.value || []; @@ -201,10 +204,9 @@ export class EventHubsImpl implements EventHubs { yield page; } while (continuationToken) { - result = await this._listAuthorizationRulesNext( + result = await this._listByNamespaceNext( resourceGroupName, namespaceName, - eventHubName, continuationToken, options ); @@ -215,98 +217,20 @@ export class EventHubsImpl implements EventHubs { } } - private async *listAuthorizationRulesPagingAll( + private async *listByNamespacePagingAll( resourceGroupName: string, namespaceName: string, - eventHubName: string, - options?: EventHubsListAuthorizationRulesOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listAuthorizationRulesPagingPage( + options?: EventHubsListByNamespaceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByNamespacePagingPage( resourceGroupName, namespaceName, - eventHubName, options )) { yield* page; } } - /** - * Gets all the Event Hubs in a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param options The options parameters. - */ - private _listByNamespace( - resourceGroupName: string, - namespaceName: string, - options?: EventHubsListByNamespaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, options }, - listByNamespaceOperationSpec - ); - } - - /** - * Creates or updates a new Event Hub as a nested resource within a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param parameters Parameters supplied to create an Event Hub resource. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - namespaceName: string, - eventHubName: string, - parameters: Eventhub, - options?: EventHubsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, eventHubName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Deletes an Event Hub from the specified Namespace and resource group. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - namespaceName: string, - eventHubName: string, - options?: EventHubsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, eventHubName, options }, - deleteOperationSpec - ); - } - - /** - * Gets an Event Hubs description for the specified Event Hub. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param options The options parameters. - */ - get( - resourceGroupName: string, - namespaceName: string, - eventHubName: string, - options?: EventHubsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, eventHubName, options }, - getOperationSpec - ); - } - /** * Gets the authorization rules for an Event Hub. * @param resourceGroupName Name of the resource group within the azure subscription. @@ -470,21 +394,78 @@ export class EventHubsImpl implements EventHubs { } /** - * ListByNamespaceNext + * Gets all the Event Hubs in a Namespace. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param nextLink The nextLink from the previous successful call to the ListByNamespace method. * @param options The options parameters. */ - private _listByNamespaceNext( + private _listByNamespace( resourceGroupName: string, namespaceName: string, - nextLink: string, - options?: EventHubsListByNamespaceNextOptionalParams - ): Promise { + options?: EventHubsListByNamespaceOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, namespaceName, nextLink, options }, - listByNamespaceNextOperationSpec + { resourceGroupName, namespaceName, options }, + listByNamespaceOperationSpec + ); + } + + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param parameters Parameters supplied to create an Event Hub resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + namespaceName: string, + eventHubName: string, + parameters: Eventhub, + options?: EventHubsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, eventHubName, parameters, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + namespaceName: string, + eventHubName: string, + options?: EventHubsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, eventHubName, options }, + deleteOperationSpec + ); + } + + /** + * Gets an Event Hubs description for the specified Event Hub. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + namespaceName: string, + eventHubName: string, + options?: EventHubsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, eventHubName, options }, + getOperationSpec ); } @@ -508,64 +489,86 @@ export class EventHubsImpl implements EventHubs { listAuthorizationRulesNextOperationSpec ); } + + /** + * ListByNamespaceNext + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param nextLink The nextLink from the previous successful call to the ListByNamespace method. + * @param options The options parameters. + */ + private _listByNamespaceNext( + resourceGroupName: string, + namespaceName: string, + nextLink: string, + options?: EventHubsListByNamespaceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, nextLink, options }, + listByNamespaceNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listByNamespaceOperationSpec: coreClient.OperationSpec = { +const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.EventHubListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName + Parameters.namespaceName, + Parameters.eventHubName ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Eventhub + bodyMapper: Mappers.AuthorizationRule }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.authorizationRuleName, Parameters.eventHubName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const deleteOperationSpec: coreClient.OperationSpec = { +const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", - httpMethod: "DELETE", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", + httpMethod: "GET", responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.AuthorizationRule + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -576,19 +579,19 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.authorizationRuleName, Parameters.eventHubName ], headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const deleteAuthorizationRuleOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.Eventhub - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -599,18 +602,19 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.authorizationRuleName, Parameters.eventHubName ], headerParameters: [Parameters.accept], serializer }; -const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = { +const listKeysOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.AccessKeys }, default: { bodyMapper: Mappers.ErrorResponse @@ -622,18 +626,19 @@ const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.authorizationRuleName, Parameters.eventHubName ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = { +const regenerateKeysOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", - httpMethod: "PUT", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.AuthorizationRule + bodyMapper: Mappers.AccessKeys }, default: { bodyMapper: Mappers.ErrorResponse @@ -653,61 +658,60 @@ const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = { +const listByNamespaceOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AuthorizationRule + bodyMapper: Mappers.EventHubListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName, - Parameters.authorizationRuleName, - Parameters.eventHubName + Parameters.namespaceName ], headerParameters: [Parameters.accept], serializer }; -const deleteAuthorizationRuleOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", - httpMethod: "DELETE", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", + httpMethod: "PUT", responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.Eventhub + }, default: { bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.authorizationRuleName, Parameters.eventHubName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const listKeysOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.AccessKeys - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -718,79 +722,73 @@ const listKeysOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.authorizationRuleName, Parameters.eventHubName ], headerParameters: [Parameters.accept], serializer }; -const regenerateKeysOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AccessKeys + bodyMapper: Mappers.Eventhub }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.authorizationRuleName, Parameters.eventHubName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByNamespaceNextOperationSpec: coreClient.OperationSpec = { +const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.EventHubListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.nextLink, - Parameters.namespaceName + Parameters.namespaceName, + Parameters.eventHubName ], headerParameters: [Parameters.accept], serializer }; -const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = { +const listByNamespaceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.EventHubListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.nextLink, - Parameters.namespaceName, - Parameters.eventHubName + Parameters.namespaceName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/eventhub/arm-eventhub/src/operations/index.ts b/sdk/eventhub/arm-eventhub/src/operations/index.ts index 56453e88cbfe..966a54e6000d 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/index.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/index.ts @@ -7,12 +7,15 @@ */ export * from "./clusters"; -export * from "./configuration"; export * from "./namespaces"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; -export * from "./operations"; -export * from "./eventHubs"; +export * from "./networkSecurityPerimeterConfigurationOperations"; +export * from "./networkSecurityPerimeterConfigurations"; +export * from "./configuration"; export * from "./disasterRecoveryConfigs"; +export * from "./eventHubs"; export * from "./consumerGroups"; +export * from "./operations"; export * from "./schemaRegistry"; +export * from "./applicationGroupOperations"; diff --git a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts index ab2d33f8ceef..86a5a8b17a84 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { EHNamespace, NamespacesListNextOptionalParams, @@ -318,8 +322,8 @@ export class NamespacesImpl implements Namespaces { parameters: EHNamespace, options?: NamespacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, NamespacesCreateOrUpdateResponse > > { @@ -329,7 +333,7 @@ export class NamespacesImpl implements Namespaces { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -362,13 +366,16 @@ export class NamespacesImpl implements Namespaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, namespaceName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, namespaceName, parameters, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + NamespacesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -409,14 +416,14 @@ export class NamespacesImpl implements Namespaces { resourceGroupName: string, namespaceName: string, options?: NamespacesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -449,13 +456,13 @@ export class NamespacesImpl implements Namespaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, namespaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, namespaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -828,7 +835,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters2, + requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -901,7 +908,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters2, + requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -925,7 +932,7 @@ const createOrUpdateNetworkRuleSetOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters3, + requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1015,7 +1022,7 @@ const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1108,7 +1115,7 @@ const regenerateKeysOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1133,7 +1140,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept, Parameters.contentType], @@ -1151,7 +1158,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1171,7 +1177,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1192,7 +1197,6 @@ const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurationOperations.ts b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurationOperations.ts new file mode 100644 index 000000000000..1edcaf24e20c --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurationOperations.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { NetworkSecurityPerimeterConfigurationOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClient } from "../eventHubManagementClient"; +import { + NetworkSecurityPerimeterConfigurationListOptionalParams, + NetworkSecurityPerimeterConfigurationListResponse +} from "../models"; + +/** Class containing NetworkSecurityPerimeterConfigurationOperations operations. */ +export class NetworkSecurityPerimeterConfigurationOperationsImpl + implements NetworkSecurityPerimeterConfigurationOperations { + private readonly client: EventHubManagementClient; + + /** + * Initialize a new instance of the class NetworkSecurityPerimeterConfigurationOperations class. + * @param client Reference to the service client + */ + constructor(client: EventHubManagementClient) { + this.client = client; + } + + /** + * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The options parameters. + */ + list( + resourceGroupName: string, + namespaceName: string, + options?: NetworkSecurityPerimeterConfigurationListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, namespaceName, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..9a71cabee532 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClient } from "../eventHubManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams } from "../models"; + +/** Class containing NetworkSecurityPerimeterConfigurations operations. */ +export class NetworkSecurityPerimeterConfigurationsImpl + implements NetworkSecurityPerimeterConfigurations { + private readonly client: EventHubManagementClient; + + /** + * Initialize a new instance of the class NetworkSecurityPerimeterConfigurations class. + * @param client Reference to the service client + */ + constructor(client: EventHubManagementClient) { + this.client = client; + } + + /** + * Refreshes any information about the association. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param resourceAssociationName The ResourceAssociation Name + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + namespaceName: string, + resourceAssociationName: string, + options?: NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + namespaceName, + resourceAssociationName, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Refreshes any information about the association. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param resourceAssociationName The ResourceAssociation Name + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + namespaceName: string, + resourceAssociationName: string, + options?: NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + namespaceName, + resourceAssociationName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}/reconcile", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.resourceAssociationName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/operations.ts b/sdk/eventhub/arm-eventhub/src/operations/operations.ts index 38c848184a56..7603a2868b80 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/operations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts index 81560ff1ae39..53ab761dea5f 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListNextOptionalParams, @@ -176,14 +180,14 @@ export class PrivateEndpointConnectionsImpl namespaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -216,18 +220,18 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, namespaceName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -336,11 +340,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { 201: { bodyMapper: Mappers.PrivateEndpointConnection }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -411,7 +418,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts b/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts index d39a4a04e04a..e480b82b809d 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts @@ -327,7 +327,6 @@ const listByNamespaceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/applicationGroupOperations.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/applicationGroupOperations.ts new file mode 100644 index 000000000000..d0169847b7fd --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/applicationGroupOperations.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + ApplicationGroup, + ApplicationGroupListByNamespaceOptionalParams, + ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams, + ApplicationGroupCreateOrUpdateApplicationGroupResponse, + ApplicationGroupDeleteOptionalParams, + ApplicationGroupGetOptionalParams, + ApplicationGroupGetResponse +} from "../models"; + +/// +/** Interface representing a ApplicationGroupOperations. */ +export interface ApplicationGroupOperations { + /** + * Gets a list of application groups for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The options parameters. + */ + listByNamespace( + resourceGroupName: string, + namespaceName: string, + options?: ApplicationGroupListByNamespaceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates or updates an ApplicationGroup for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param applicationGroupName The Application Group name + * @param parameters The ApplicationGroup. + * @param options The options parameters. + */ + createOrUpdateApplicationGroup( + resourceGroupName: string, + namespaceName: string, + applicationGroupName: string, + parameters: ApplicationGroup, + options?: ApplicationGroupCreateOrUpdateApplicationGroupOptionalParams + ): Promise; + /** + * Deletes an ApplicationGroup for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param applicationGroupName The Application Group name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + namespaceName: string, + applicationGroupName: string, + options?: ApplicationGroupDeleteOptionalParams + ): Promise; + /** + * Gets an ApplicationGroup for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param applicationGroupName The Application Group name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + namespaceName: string, + applicationGroupName: string, + options?: ApplicationGroupGetOptionalParams + ): Promise; +} diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts index b86f57c21aff..468c81b6ed11 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Cluster, ClustersListBySubscriptionOptionalParams, @@ -75,8 +75,8 @@ export interface Clusters { parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersCreateOrUpdateResponse > >; @@ -106,8 +106,8 @@ export interface Clusters { parameters: Cluster, options?: ClustersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ClustersUpdateResponse > >; @@ -134,7 +134,7 @@ export interface Clusters { resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * @param resourceGroupName Name of the resource group within the azure subscription. diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/disasterRecoveryConfigs.ts index 30e41281a090..c7a03e36cf06 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/disasterRecoveryConfigs.ts @@ -8,10 +8,14 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ArmDisasterRecovery, - DisasterRecoveryConfigsListOptionalParams, AuthorizationRule, DisasterRecoveryConfigsListAuthorizationRulesOptionalParams, + ArmDisasterRecovery, + DisasterRecoveryConfigsListOptionalParams, + DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams, + DisasterRecoveryConfigsGetAuthorizationRuleResponse, + DisasterRecoveryConfigsListKeysOptionalParams, + DisasterRecoveryConfigsListKeysResponse, CheckNameAvailabilityParameter, DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams, DisasterRecoveryConfigsCheckNameAvailabilityResponse, @@ -21,16 +25,25 @@ import { DisasterRecoveryConfigsGetOptionalParams, DisasterRecoveryConfigsGetResponse, DisasterRecoveryConfigsBreakPairingOptionalParams, - DisasterRecoveryConfigsFailOverOptionalParams, - DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams, - DisasterRecoveryConfigsGetAuthorizationRuleResponse, - DisasterRecoveryConfigsListKeysOptionalParams, - DisasterRecoveryConfigsListKeysResponse + DisasterRecoveryConfigsFailOverOptionalParams } from "../models"; /// /** Interface representing a DisasterRecoveryConfigs. */ export interface DisasterRecoveryConfigs { + /** + * Gets a list of authorization rules for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param options The options parameters. + */ + listAuthorizationRules( + resourceGroupName: string, + namespaceName: string, + alias: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams + ): PagedAsyncIterableIterator; /** * Gets all Alias(Disaster Recovery configurations) * @param resourceGroupName Name of the resource group within the azure subscription. @@ -43,18 +56,35 @@ export interface DisasterRecoveryConfigs { options?: DisasterRecoveryConfigsListOptionalParams ): PagedAsyncIterableIterator; /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. * @param options The options parameters. */ - listAuthorizationRules( + getAuthorizationRule( resourceGroupName: string, namespaceName: string, alias: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams - ): PagedAsyncIterableIterator; + authorizationRuleName: string, + options?: DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams + ): Promise; + /** + * Gets the primary and secondary connection strings for the Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param alias The Disaster Recovery configuration name + * @param authorizationRuleName The authorization rule name. + * @param options The options parameters. + */ + listKeys( + resourceGroupName: string, + namespaceName: string, + alias: string, + authorizationRuleName: string, + options?: DisasterRecoveryConfigsListKeysOptionalParams + ): Promise; /** * Check the give Namespace name availability. * @param resourceGroupName Name of the resource group within the azure subscription. @@ -136,34 +166,4 @@ export interface DisasterRecoveryConfigs { alias: string, options?: DisasterRecoveryConfigsFailOverOptionalParams ): Promise; - /** - * Gets an AuthorizationRule for a Namespace by rule name. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name - * @param authorizationRuleName The authorization rule name. - * @param options The options parameters. - */ - getAuthorizationRule( - resourceGroupName: string, - namespaceName: string, - alias: string, - authorizationRuleName: string, - options?: DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams - ): Promise; - /** - * Gets the primary and secondary connection strings for the Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name - * @param authorizationRuleName The authorization rule name. - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - namespaceName: string, - alias: string, - authorizationRuleName: string, - options?: DisasterRecoveryConfigsListKeysOptionalParams - ): Promise; } diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/eventHubs.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/eventHubs.ts index 0e588c572d00..07f6d801c161 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/eventHubs.ts @@ -8,15 +8,10 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - Eventhub, - EventHubsListByNamespaceOptionalParams, AuthorizationRule, EventHubsListAuthorizationRulesOptionalParams, - EventHubsCreateOrUpdateOptionalParams, - EventHubsCreateOrUpdateResponse, - EventHubsDeleteOptionalParams, - EventHubsGetOptionalParams, - EventHubsGetResponse, + Eventhub, + EventHubsListByNamespaceOptionalParams, EventHubsCreateOrUpdateAuthorizationRuleOptionalParams, EventHubsCreateOrUpdateAuthorizationRuleResponse, EventHubsGetAuthorizationRuleOptionalParams, @@ -26,23 +21,17 @@ import { EventHubsListKeysResponse, RegenerateAccessKeyParameters, EventHubsRegenerateKeysOptionalParams, - EventHubsRegenerateKeysResponse + EventHubsRegenerateKeysResponse, + EventHubsCreateOrUpdateOptionalParams, + EventHubsCreateOrUpdateResponse, + EventHubsDeleteOptionalParams, + EventHubsGetOptionalParams, + EventHubsGetResponse } from "../models"; /// /** Interface representing a EventHubs. */ export interface EventHubs { - /** - * Gets all the Event Hubs in a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param options The options parameters. - */ - listByNamespace( - resourceGroupName: string, - namespaceName: string, - options?: EventHubsListByNamespaceOptionalParams - ): PagedAsyncIterableIterator; /** * Gets the authorization rules for an Event Hub. * @param resourceGroupName Name of the resource group within the azure subscription. @@ -57,46 +46,16 @@ export interface EventHubs { options?: EventHubsListAuthorizationRulesOptionalParams ): PagedAsyncIterableIterator; /** - * Creates or updates a new Event Hub as a nested resource within a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param parameters Parameters supplied to create an Event Hub resource. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - namespaceName: string, - eventHubName: string, - parameters: Eventhub, - options?: EventHubsCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes an Event Hub from the specified Namespace and resource group. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - namespaceName: string, - eventHubName: string, - options?: EventHubsDeleteOptionalParams - ): Promise; - /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name * @param options The options parameters. */ - get( + listByNamespace( resourceGroupName: string, namespaceName: string, - eventHubName: string, - options?: EventHubsGetOptionalParams - ): Promise; + options?: EventHubsListByNamespaceOptionalParams + ): PagedAsyncIterableIterator; /** * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the * AuthorizationRule will take a few seconds to take effect. @@ -178,4 +137,45 @@ export interface EventHubs { parameters: RegenerateAccessKeyParameters, options?: EventHubsRegenerateKeysOptionalParams ): Promise; + /** + * Creates or updates a new Event Hub as a nested resource within a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param parameters Parameters supplied to create an Event Hub resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + namespaceName: string, + eventHubName: string, + parameters: Eventhub, + options?: EventHubsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes an Event Hub from the specified Namespace and resource group. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + namespaceName: string, + eventHubName: string, + options?: EventHubsDeleteOptionalParams + ): Promise; + /** + * Gets an Event Hubs description for the specified Event Hub. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name + * @param options The options parameters. + */ + get( + resourceGroupName: string, + namespaceName: string, + eventHubName: string, + options?: EventHubsGetOptionalParams + ): Promise; } diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/index.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/index.ts index 56453e88cbfe..966a54e6000d 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/index.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/index.ts @@ -7,12 +7,15 @@ */ export * from "./clusters"; -export * from "./configuration"; export * from "./namespaces"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; -export * from "./operations"; -export * from "./eventHubs"; +export * from "./networkSecurityPerimeterConfigurationOperations"; +export * from "./networkSecurityPerimeterConfigurations"; +export * from "./configuration"; export * from "./disasterRecoveryConfigs"; +export * from "./eventHubs"; export * from "./consumerGroups"; +export * from "./operations"; export * from "./schemaRegistry"; +export * from "./applicationGroupOperations"; diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts index 6e4189407a1f..572584311f3e 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/namespaces.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { EHNamespace, NamespacesListOptionalParams, @@ -87,8 +87,8 @@ export interface Namespaces { parameters: EHNamespace, options?: NamespacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, NamespacesCreateOrUpdateResponse > >; @@ -117,7 +117,7 @@ export interface Namespaces { resourceGroupName: string, namespaceName: string, options?: NamespacesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing namespace. This operation also removes all associated resources under the * namespace. diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurationOperations.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurationOperations.ts new file mode 100644 index 000000000000..6a1c7df4d5fd --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurationOperations.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + NetworkSecurityPerimeterConfigurationListOptionalParams, + NetworkSecurityPerimeterConfigurationListResponse +} from "../models"; + +/** Interface representing a NetworkSecurityPerimeterConfigurationOperations. */ +export interface NetworkSecurityPerimeterConfigurationOperations { + /** + * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The options parameters. + */ + list( + resourceGroupName: string, + namespaceName: string, + options?: NetworkSecurityPerimeterConfigurationListOptionalParams + ): Promise; +} diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..d9afd4fd48a2 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams } from "../models"; + +/** Interface representing a NetworkSecurityPerimeterConfigurations. */ +export interface NetworkSecurityPerimeterConfigurations { + /** + * Refreshes any information about the association. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param resourceAssociationName The ResourceAssociation Name + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + namespaceName: string, + resourceAssociationName: string, + options?: NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams + ): Promise, void>>; + /** + * Refreshes any information about the association. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param resourceAssociationName The ResourceAssociation Name + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + namespaceName: string, + resourceAssociationName: string, + options?: NetworkSecurityPerimeterConfigurationsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/privateEndpointConnections.ts index 37ba1ad4cc36..11af5fe868d6 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/privateEndpointConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListOptionalParams, @@ -61,7 +61,7 @@ export interface PrivateEndpointConnections { namespaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an existing namespace. This operation also removes all associated resources under the * namespace. diff --git a/sdk/eventhub/arm-eventhub/src/pagingHelper.ts b/sdk/eventhub/arm-eventhub/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/eventhub/arm-eventhub/src/pagingHelper.ts +++ b/sdk/eventhub/arm-eventhub/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/eventhub/arm-eventhub/test/sampleTest.ts b/sdk/eventhub/arm-eventhub/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/eventhub/arm-eventhub/tsconfig.json b/sdk/eventhub/arm-eventhub/tsconfig.json index f1fddb077683..3e6ae96443f3 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-eventhub": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"