From fc7ac18f91cdbd2880c0381ecc88e4c32ed743d7 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 13 May 2022 03:31:05 +0000 Subject: [PATCH] CodeGen from PR 18996 in Azure/azure-rest-api-specs Migrate to net track2 for some resource-manager readmes (#18996) * migrate to net track2 for some mgmt RPs * Update readme.md --- common/config/rush/pnpm-lock.yaml | 36 +- sdk/eventhub/arm-eventhub/CHANGELOG.md | 66 +- sdk/eventhub/arm-eventhub/README.md | 2 +- sdk/eventhub/arm-eventhub/_meta.json | 10 +- sdk/eventhub/arm-eventhub/package.json | 22 +- .../arm-eventhub/review/arm-eventhub.api.md | 282 ++++- .../src/eventHubManagementClient.ts | 82 +- sdk/eventhub/arm-eventhub/src/models/index.ts | 892 ++++++++++---- .../arm-eventhub/src/models/mappers.ts | 1062 ++++++++++++----- .../arm-eventhub/src/models/parameters.ts | 110 +- .../operations/applicationGroupOperations.ts | 330 +++++ .../src/operations/configuration.ts | 2 +- .../src/operations/disasterRecoveryConfigs.ts | 412 +++---- .../arm-eventhub/src/operations/eventHubs.ts | 400 +++---- .../arm-eventhub/src/operations/index.ts | 9 +- .../arm-eventhub/src/operations/namespaces.ts | 12 +- ...ecurityPerimeterConfigurationOperations.ts | 73 ++ .../networkSecurityPerimeterConfigurations.ts | 144 +++ .../operations/privateEndpointConnections.ts | 2 +- .../applicationGroupOperations.ts | 75 ++ .../disasterRecoveryConfigs.ts | 82 +- .../src/operationsInterfaces/eventHubs.ts | 106 +- .../src/operationsInterfaces/index.ts | 9 +- ...ecurityPerimeterConfigurationOperations.ts | 27 + .../networkSecurityPerimeterConfigurations.ts | 40 + sdk/eventhub/arm-eventhub/test/sampleTest.ts | 43 + sdk/eventhub/arm-eventhub/tsconfig.json | 10 +- 27 files changed, 3155 insertions(+), 1185 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 cabce816ec51..fa506b26a1b1 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -649,6 +649,21 @@ packages: - encoding dev: false + /@azure/arm-eventhub/5.0.1: + resolution: {integrity: sha512-a6TOdc5ShsknIveI1Olk3PXMT5tQ40qi+zlaWGXO+lD/OzVpYZaR4mw49XXryX/1Pv1O/+3awz219Sxv4S3fEQ==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.3.2 + '@azure/core-client': 1.6.0 + '@azure/core-lro': 2.2.4 + '@azure/core-paging': 1.2.1 + '@azure/core-rest-pipeline': 1.8.1 + tslib: 2.4.0 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/arm-msi/2.0.0: resolution: {integrity: sha512-yBprEoMQRNLyHtR/RuJh8ehQCcF6rO5049Pfped79uRd/Y8EW+pNpbW0EjqWC5lVllC1VG4B89aC5PwE3XeISA==} engines: {node: '>=12.0.0'} @@ -9235,7 +9250,7 @@ packages: dev: false file:projects/app-configuration.tgz: - resolution: {integrity: sha512-mgBqLgANN5GfvaBoC8b8M+0kupymQe4VEtqebrPmON2T7RjuaEy02HZ0BfAqC5Ag+ea8O9+ZC2TrjGHfE3DV5w==, tarball: file:projects/app-configuration.tgz} + resolution: {integrity: sha512-SzCn41YZ/BPyOG53bMpoU8tddmYMQSW9zTTvSd0356VPzGXj4UKzyUsV97dhpUclb9Ar5PuNdETNcaFP2KuBmA==, tarball: file:projects/app-configuration.tgz} name: '@rush-temp/app-configuration' version: 0.0.0 dependencies: @@ -10881,7 +10896,7 @@ packages: dev: false file:projects/arm-eventhub.tgz: - resolution: {integrity: sha512-0/bLZaWh1M+YMhOqdV7043GLZJYohPa+NnJY//fRmfNe6PRe8MAmhkBP650zKFudSZa6nh/LTZ8mESRtPj6hYA==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-RYyuvGdUzeIzUALMyRDpjreoo/1WIuskFUFU4T6IMOaRBNfnALr6G3Ps2SqpLgPTDntYzp5dqMxnvuUO0eOXuw==, tarball: file:projects/arm-eventhub.tgz} name: '@rush-temp/arm-eventhub' version: 0.0.0 dependencies: @@ -10905,7 +10920,6 @@ packages: transitivePeerDependencies: - '@types/node' - debug - - encoding - supports-color dev: false @@ -11972,11 +11986,12 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-F4KBzJWHJ5xl98pUJNPft9sAouJTQ7gYwOra8wt/2KcziB3lnR5wgEOFZoxy/BX3L3ggA9hGOxl7mVlsnk6FYg==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-PhfToAT2M418IrgFNZsuTGvdS/S+mQrG4pKWKKW50BXlVCE/MGY+mNMdRwySP29vvYXAUZot/Yv0JurSQHFL/g==, tarball: file:projects/arm-monitor.tgz} name: '@rush-temp/arm-monitor' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-eventhub': 5.0.1 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.72.0 @@ -14397,7 +14412,7 @@ packages: dev: false file:projects/container-registry.tgz: - resolution: {integrity: sha512-V/p7+Cu1a49LybAJV+v1tUHitMbg1pVOSwQ6JAxkgH16EcQnohNFUpqf+QtvKXMpbI6BKVSx/9VQM5/AtUMAQw==, tarball: file:projects/container-registry.tgz} + resolution: {integrity: sha512-BLmLIgLI2MH9kI3aFjUoctL3DRWLA5JIZhrJkZNm4L4lWmBvXrmHmsa0PZiQccwCnkln+mTtEB1KE28sPwEVkg==, tarball: file:projects/container-registry.tgz} name: '@rush-temp/container-registry' version: 0.0.0 dependencies: @@ -15349,7 +15364,7 @@ packages: dev: false file:projects/eventhubs-checkpointstore-blob.tgz: - resolution: {integrity: sha512-fJ6cZn28kU24JmLoWiHPo3PAobLpDHVym2oH/wy9csf0xLJ1GhrPVFYHiBPxWpgYC5flNiH5OBe2DsF3XLTjxQ==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} + resolution: {integrity: sha512-o2cL07TelVeXEaU2wY2Y4BeA+eMaU/TnmxrCoFyEw3Op0a/F+cctdENNTDxm2tIDP9MNz0LspCktHFgf4NPFLg==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} name: '@rush-temp/eventhubs-checkpointstore-blob' version: 0.0.0 dependencies: @@ -15396,7 +15411,6 @@ packages: - '@swc/core' - '@swc/wasm' - bufferutil - - encoding - supports-color - utf-8-validate dev: false @@ -16736,7 +16750,7 @@ packages: dev: false file:projects/quantum-jobs.tgz: - resolution: {integrity: sha512-VxnLvyLqoZH49xy0s+rp9ctoU8vHvYNl+4ZHlV0kTIWs1m8Gum1j8KODVUJgTkQxkfen1ajFnJ6H70k8fzmdWA==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-3tDUSyC5067Lkl6sXvFfb/AmVxbl/T17baX535KAcbz1wmc+a77SxX0QJwnd0B60nhPYtxqGTV9jhS8n+FmS0Q==, tarball: file:projects/quantum-jobs.tgz} name: '@rush-temp/quantum-jobs' version: 0.0.0 dependencies: @@ -17008,7 +17022,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-b0ZQkTSDa8yRCYocVj6uJPULInje0y+srK1cj12YGNGCf3/7LvLyIr477AQMl6mH0LMKQqm5GGNy2QrzpS2ACQ==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-SrCjeQtrzDJmR9Zt36InqNML4QReO6HcTs2/N/Pa4fvIX5WfkDW/vO9lXpUQYnrfXJVcKKatFAvc42WIanJaTg==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: @@ -17121,7 +17135,7 @@ packages: dev: false file:projects/storage-file-datalake.tgz: - resolution: {integrity: sha512-kKcBF5zuGkuic74HUG5FcmQj2CyY0vwQg9wosa+mCSlt/Ix88gpUyuKD/O+D8r1LuA3a76TmFjOsulUwdvhUKg==, tarball: file:projects/storage-file-datalake.tgz} + resolution: {integrity: sha512-nXm5s35Wfg8EJFNsOIDTkcIW5uWws1QHUGFGKuoWSJyHUEqY2pmtAAdO+3RZfaA10SrvCD3zNTwqFLYmxxZ37w==, tarball: file:projects/storage-file-datalake.tgz} name: '@rush-temp/storage-file-datalake' version: 0.0.0 dependencies: @@ -17177,7 +17191,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-uTsgr0VLUxHKZktJu5q3HFXhXpVPlAQ6i+QYCtRJ+H3S072thFQPmScED3nSXbG6sU6wudKC6MK6Odl7Y8qN/Q==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-Jrb/nCljJ1JIrl0pYwCo6g7kp4d5qL8W3R/wAiFYHUgLwgRpF/4GaH8CtrfvlUwcGeuRhrkKJLp0+CFf1PEGKw==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: diff --git a/sdk/eventhub/arm-eventhub/CHANGELOG.md b/sdk/eventhub/arm-eventhub/CHANGELOG.md index a599511568cb..13bb1e06c33c 100644 --- a/sdk/eventhub/arm-eventhub/CHANGELOG.md +++ b/sdk/eventhub/arm-eventhub/CHANGELOG.md @@ -1,15 +1,61 @@ # Release History + +## 5.1.0-beta.1 (2022-05-13) + +**Features** -## 5.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group ApplicationGroupOperations + - Added operation group NetworkSecurityPerimeterConfigurationOperations + - Added operation group NetworkSecurityPerimeterConfigurations + - 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 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 Type Alias ApplicationGroup + - 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 MetricId + - Added Type Alias NetworkSecurityPerimeterConfiguration + - Added Type Alias NetworkSecurityPerimeterConfigurationListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationProvisioningState + - Added Type Alias NspAccessRuleDirection + - Added Type Alias PublicNetworkAccess + - Added Type Alias ResourceAssociationAccessMode + - Added Type Alias ThrottlingPolicy + - Added Type Alias TlsVersion + - Class EventHubManagementClient has a new parameter applicationGroupOperations + - Class EventHubManagementClient has a new parameter networkSecurityPerimeterConfigurationOperations + - Class EventHubManagementClient has a new parameter networkSecurityPerimeterConfigurations + - Type Alias Cluster has a new parameter supportsScaling + - Type Alias EHNamespace has a new parameter minimumTlsVersion + - Type Alias EHNamespace has a new parameter publicNetworkAccess + - Added Enum KnownApplicationGroupPolicyType + - 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 + ## 5.0.1 (2022-04-18) **features** diff --git a/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md index 30e17ffe6fc2..fe63ac40637e 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 987811d91e9c..8d3c18923dc9 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.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\eventhub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "a416080c85111fbe4e0a483a1b99f1126ca6e97c", + "readme": "specification/eventhub/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/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-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 4266c2702388..b1dc195b00cd 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventHubManagementClient.", - "version": "5.0.2", + "version": "5.1.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -40,11 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", "cross-env": "^7.0.2", - "@azure/arm-network": "^26.0.0", - "@azure/arm-storage": "^17.0.0" + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub", "repository": { @@ -95,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -108,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-eventhub?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 27a035d7eb76..999f4eb65e2e 100644 --- a/sdk/eventhub/arm-eventhub/review/arm-eventhub.api.md +++ b/sdk/eventhub/arm-eventhub/review/arm-eventhub.api.md @@ -24,6 +24,72 @@ export interface AccessKeys { // @public export type AccessRights = string; +// @public +export type ApplicationGroup = ProxyResource & { + readonly systemData?: SystemData; + isEnabled?: boolean; + clientAppGroupIdentifier?: string; + policies?: ApplicationGroupPolicyUnion[]; +}; + +// @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 type ArmDisasterRecovery = ProxyResource & { readonly systemData?: SystemData; @@ -92,6 +158,7 @@ export type Cluster = TrackedResource & { readonly updatedAt?: string; readonly metricId?: string; readonly status?: string; + supportsScaling?: boolean; }; // @public @@ -399,6 +466,7 @@ export type EHNamespace = TrackedResource & { sku?: Sku; identity?: Identity; readonly systemData?: SystemData; + minimumTlsVersion?: TlsVersion; readonly provisioningState?: string; readonly status?: string; readonly createdAt?: Date; @@ -407,6 +475,7 @@ export type EHNamespace = TrackedResource & { clusterArmId?: string; readonly metricId?: string; isAutoInflateEnabled?: boolean; + publicNetworkAccess?: PublicNetworkAccess; maximumThroughputUnits?: number; kafkaEnabled?: boolean; zoneRedundant?: boolean; @@ -494,6 +563,8 @@ export class EventHubManagementClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + applicationGroupOperations: ApplicationGroupOperations; + // (undocumented) clusters: Clusters; // (undocumented) configuration: Configuration; @@ -506,6 +577,10 @@ export class EventHubManagementClient extends coreClient.ServiceClient { // (undocumented) namespaces: Namespaces; // (undocumented) + networkSecurityPerimeterConfigurationOperations: NetworkSecurityPerimeterConfigurationOperations; + // (undocumented) + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -653,6 +728,12 @@ export enum KnownAccessRights { Send = "Send" } +// @public +export enum KnownApplicationGroupPolicyType { + // (undocumented) + ThrottlingPolicy = "ThrottlingPolicy" +} + // @public export enum KnownClusterSkuName { // (undocumented) @@ -703,12 +784,58 @@ export enum KnownKeyType { SecondaryKey = "SecondaryKey" } +// @public +export enum KnownMetricId { + // (undocumented) + IncomingBytes = "IncomingBytes", + // (undocumented) + IncomingMessages = "IncomingMessages", + // (undocumented) + OutgoingBytes = "OutgoingBytes", + // (undocumented) + OutgoingMessages = "OutgoingMessages" +} + // @public export enum KnownNetworkRuleIPAction { // (undocumented) Allow = "Allow" } +// @public +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + // (undocumented) + Accepted = "Accepted", + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleted = "Deleted", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + InvalidResponse = "InvalidResponse", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + SucceededWithIssues = "SucceededWithIssues", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownNspAccessRuleDirection { + // (undocumented) + Inbound = "Inbound", + // (undocumented) + Outbound = "Outbound" +} + // @public export enum KnownPrivateLinkConnectionStatus { // (undocumented) @@ -721,12 +848,38 @@ export enum KnownPrivateLinkConnectionStatus { Rejected = "Rejected" } +// @public +export enum KnownPublicNetworkAccess { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled", + // (undocumented) + SecuredByPerimeter = "SecuredByPerimeter" +} + // @public export enum KnownPublicNetworkAccessFlag { // (undocumented) Disabled = "Disabled", // (undocumented) - Enabled = "Enabled" + Enabled = "Enabled", + // (undocumented) + SecuredByPerimeter = "SecuredByPerimeter" +} + +// @public +export enum KnownResourceAssociationAccessMode { + // (undocumented) + AuditMode = "AuditMode", + // (undocumented) + EnforcedMode = "EnforcedMode", + // (undocumented) + LearningMode = "LearningMode", + // (undocumented) + NoAssociationMode = "NoAssociationMode", + // (undocumented) + UnspecifiedMode = "UnspecifiedMode" } // @public @@ -767,9 +920,22 @@ export enum KnownSkuTier { Standard = "Standard" } +// @public +export enum KnownTlsVersion { + // (undocumented) + One0 = "1.0", + // (undocumented) + One1 = "1.1", + // (undocumented) + 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>>; @@ -942,6 +1108,92 @@ export interface NetworkRuleSetListResult { value?: NetworkRuleSet[]; } +// @public +export interface NetworkSecurityPerimeter { + id?: string; + location?: string; + perimeterGuid?: string; +} + +// @public +export type NetworkSecurityPerimeterConfiguration = TrackedResource & { + provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; + provisioningIssues?: ProvisioningIssue[]; + readonly networkSecurityPerimeter?: NetworkSecurityPerimeter; + readonly resourceAssociation?: NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation; + readonly profile?: NetworkSecurityPerimeterConfigurationPropertiesProfile; +}; + +// @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; @@ -1089,6 +1341,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"; @@ -1100,6 +1364,9 @@ export interface ProxyResource { readonly type?: string; } +// @public +export type PublicNetworkAccess = string; + // @public export type PublicNetworkAccessFlag = string; @@ -1116,6 +1383,9 @@ export interface Resource { readonly type?: string; } +// @public +export type ResourceAssociationAccessMode = string; + // @public export type RoleDisasterRecovery = "Primary" | "PrimaryNotReplicating" | "Secondary"; @@ -1219,6 +1489,16 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export type ThrottlingPolicy = ApplicationGroupPolicy & { + type: "ThrottlingPolicy"; + rateLimitThreshold: number; + metricId: MetricId; +}; + +// @public +export type TlsVersion = string; + // @public export type TrackedResource = Resource & { location?: string; diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index 7eb6f5c69daa..9afa762ba023 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -8,30 +8,41 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { 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"; @@ -68,7 +79,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-eventhub/5.0.2`; + const packageDetails = `azsdk-js-arm-eventhub/5.1.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -115,27 +126,66 @@ 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-01-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); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } 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/models/index.ts b/sdk/eventhub/arm-eventhub/src/models/index.ts index 1c3a92e8e239..085cd820926f 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 { - /** - * 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[]; +/** Result of the List NetworkSecurityPerimeterConfiguration operation. */ +export interface NetworkSecurityPerimeterConfigurationList { /** - * 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,114 @@ 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; +} + /** The result of the List SchemaGroup operation. */ export interface SchemaGroupListResult { /** Result of the List SchemaGroups operation. */ @@ -512,6 +613,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 type TrackedResource = Resource & { /** Resource location. */ @@ -535,20 +655,45 @@ export type PrivateEndpointConnection = ProxyResource & { provisioningState?: EndPointProvisioningState; }; -/** Single item in List or Get Event Hub operation */ -export type Eventhub = ProxyResource & { +/** Description of topic resource. */ +export type NetworkRuleSet = 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 type AuthorizationRule = 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 type ConsumerGroup = 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; /** - * Exact time the Event Hub was created. + * 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 +702,8 @@ export type Eventhub = 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 +734,20 @@ export type ArmDisasterRecovery = ProxyResource & { readonly pendingReplicationOperationsCount?: number; }; -/** Description of topic resource. */ -export type NetworkRuleSet = 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 type AuthorizationRule = ProxyResource & { +/** Single item in List or Get Event Hub operation */ +export type Eventhub = 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 type ConsumerGroup = 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 +756,14 @@ export type ConsumerGroup = 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; }; /** Single item in List or Get Schema Group operation */ @@ -674,6 +794,31 @@ export type SchemaGroup = ProxyResource & { schemaType?: SchemaType; }; +/** The Application Group object */ +export type ApplicationGroup = 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 type ThrottlingPolicy = 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 type Cluster = TrackedResource & { /** Properties of the cluster SKU. */ @@ -703,6 +848,8 @@ export type Cluster = 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 +863,8 @@ export type EHNamespace = 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 +899,8 @@ export type EHNamespace = 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. */ @@ -766,6 +917,29 @@ export type EHNamespace = TrackedResource & { alternateName?: string; }; +/** Network Security Perimeter related configurations of a given namespace */ +export type NetworkSecurityPerimeterConfiguration = TrackedResource & { + /** 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; +}; + /** Known values of {@link ClusterSkuName} that the service accepts. */ export enum KnownClusterSkuName { Dedicated = "Dedicated" @@ -836,6 +1010,42 @@ export enum KnownSkuTier { */ export type SkuTier = string; +/** Known values of {@link TlsVersion} that the service accepts. */ +export enum KnownTlsVersion { + One0 = "1.0", + One1 = "1.1", + 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", + Disabled = "Disabled", + 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 = "Pending", @@ -880,6 +1090,78 @@ export enum KnownEndPointProvisioningState { */ export type EndPointProvisioningState = string; +/** Known values of {@link NetworkSecurityPerimeterConfigurationProvisioningState} that the service accepts. */ +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + Unknown = "Unknown", + Creating = "Creating", + Updating = "Updating", + Accepted = "Accepted", + InvalidResponse = "InvalidResponse", + Succeeded = "Succeeded", + SucceededWithIssues = "SucceededWithIssues", + Failed = "Failed", + Deleting = "Deleting", + Deleted = "Deleted", + 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", + EnforcedMode = "EnforcedMode", + LearningMode = "LearningMode", + AuditMode = "AuditMode", + 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", + 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 = "Allow", @@ -913,7 +1195,8 @@ export type NetworkRuleIPAction = string; /** Known values of {@link PublicNetworkAccessFlag} that the service accepts. */ export enum KnownPublicNetworkAccessFlag { Enabled = "Enabled", - Disabled = "Disabled" + Disabled = "Disabled", + SecuredByPerimeter = "SecuredByPerimeter" } /** @@ -922,7 +1205,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; @@ -985,33 +1269,54 @@ export enum KnownSchemaType { } /** - * Defines values for SchemaType. \ - * {@link KnownSchemaType} can be used interchangeably with SchemaType, + * Defines values for SchemaType. \ + * {@link KnownSchemaType} can be used interchangeably with SchemaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Avro** + */ +export type SchemaType = string; + +/** Known values of {@link ApplicationGroupPolicyType} that the service accepts. */ +export enum KnownApplicationGroupPolicyType { + 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", + OutgoingBytes = "OutgoingBytes", + IncomingMessages = "IncomingMessages", + 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 - * **Unknown** \ - * **Avro** + * **IncomingBytes** \ + * **OutgoingBytes** \ + * **IncomingMessages** \ + * **OutgoingMessages** */ -export type SchemaType = string; +export type MetricId = 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"; /** Defines values for UnavailableReason. */ export type UnavailableReason = | "None" @@ -1027,6 +1332,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 @@ -1110,20 +1428,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 {} @@ -1306,106 +1610,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; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; +export type NetworkSecurityPerimeterConfigurationListResponse = NetworkSecurityPerimeterConfigurationList; /** 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 @@ -1448,39 +1701,106 @@ 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 { + /** 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 ConsumerGroupsCreateOrUpdateOptionalParams @@ -1524,6 +1844,20 @@ export interface ConsumerGroupsListByEventHubNextOptionalParams /** 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 { @@ -1566,6 +1900,38 @@ export interface SchemaRegistryListByNamespaceNextOptionalParams /** 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..077be451d0d6 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,376 @@ 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" } }, - captureDescription: { - serializedName: "properties.captureDescription", + skipEmptyArchives: { + serializedName: "skipEmptyArchives", type: { - name: "Composite", - className: "CaptureDescription" + name: "Boolean" } } } } }; -export const ArmDisasterRecovery: coreClient.CompositeMapper = { +export const Destination: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArmDisasterRecovery", + className: "Destination", modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + name: { + serializedName: "name", type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + storageAccountResourceId: { + serializedName: "properties.storageAccountResourceId", type: { - name: "Enum", - allowedValues: ["Accepted", "Succeeded", "Failed"] + name: "String" } }, - partnerNamespace: { - serializedName: "properties.partnerNamespace", + blobContainer: { + serializedName: "properties.blobContainer", type: { name: "String" } }, - alternateName: { - serializedName: "properties.alternateName", + 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 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" + } }, - role: { - serializedName: "properties.role", - readOnly: true, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "Enum", - allowedValues: ["Primary", "PrimaryNotReplicating", "Secondary"] + name: "Composite", + className: "ConnectionState" } }, - pendingReplicationOperationsCount: { - serializedName: "properties.pendingReplicationOperationsCount", - readOnly: true, + provisioningState: { + serializedName: "properties.provisioningState", type: { - name: "Number" + name: "String" } } } @@ -1591,6 +1769,143 @@ 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" + } + } + } + } +}; + export const SchemaGroup: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1648,6 +1963,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 +2079,12 @@ export const Cluster: coreClient.CompositeMapper = { type: { name: "String" } + }, + supportsScaling: { + serializedName: "properties.supportsScaling", + type: { + name: "Boolean" + } } } } @@ -1727,6 +2117,12 @@ export const EHNamespace: coreClient.CompositeMapper = { className: "SystemData" } }, + minimumTlsVersion: { + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -1781,6 +2177,13 @@ export const EHNamespace: coreClient.CompositeMapper = { name: "Boolean" } }, + publicNetworkAccess: { + defaultValue: "Enabled", + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, maximumThroughputUnits: { serializedName: "properties.maximumThroughputUnits", type: { @@ -1833,3 +2236,58 @@ export const EHNamespace: coreClient.CompositeMapper = { } } }; + +export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + provisioningIssues: { + serializedName: "properties.provisioningIssues", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisioningIssue" + } + } + } + }, + networkSecurityPerimeter: { + serializedName: "properties.networkSecurityPerimeter", + type: { + name: "Composite", + className: "NetworkSecurityPerimeter" + } + }, + resourceAssociation: { + serializedName: "properties.resourceAssociation", + type: { + name: "Composite", + className: + "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation" + } + }, + profile: { + serializedName: "properties.profile", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationPropertiesProfile" + } + } + } + } +}; + +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..422d4a3e2362 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-01-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..02b51a0edebd --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/applicationGroupOperations.ts @@ -0,0 +1,330 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { 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: () => { + return this.listByNamespacePagingPage( + resourceGroupName, + namespaceName, + options + ); + } + }; + } + + private async *listByNamespacePagingPage( + resourceGroupName: string, + namespaceName: string, + options?: ApplicationGroupListByNamespaceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByNamespace( + resourceGroupName, + namespaceName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByNamespaceNext( + resourceGroupName, + namespaceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.namespaceName + ], + headerParameters: [Parameters.accept], + serializer +}; 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/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 5bf7638a7d7f..128fcfe5106b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -13,12 +13,17 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; import { - ArmDisasterRecovery, - DisasterRecoveryConfigsListNextOptionalParams, - DisasterRecoveryConfigsListOptionalParams, AuthorizationRule, DisasterRecoveryConfigsListAuthorizationRulesNextOptionalParams, DisasterRecoveryConfigsListAuthorizationRulesOptionalParams, + ArmDisasterRecovery, + DisasterRecoveryConfigsListNextOptionalParams, + DisasterRecoveryConfigsListOptionalParams, + DisasterRecoveryConfigsListAuthorizationRulesResponse, + DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams, + DisasterRecoveryConfigsGetAuthorizationRuleResponse, + DisasterRecoveryConfigsListKeysOptionalParams, + DisasterRecoveryConfigsListKeysResponse, CheckNameAvailabilityParameter, DisasterRecoveryConfigsCheckNameAvailabilityOptionalParams, DisasterRecoveryConfigsCheckNameAvailabilityResponse, @@ -30,13 +35,8 @@ import { DisasterRecoveryConfigsGetResponse, DisasterRecoveryConfigsBreakPairingOptionalParams, DisasterRecoveryConfigsFailOverOptionalParams, - DisasterRecoveryConfigsListAuthorizationRulesResponse, - DisasterRecoveryConfigsGetAuthorizationRuleOptionalParams, - DisasterRecoveryConfigsGetAuthorizationRuleResponse, - DisasterRecoveryConfigsListKeysOptionalParams, - DisasterRecoveryConfigsListKeysResponse, - DisasterRecoveryConfigsListNextResponse, - DisasterRecoveryConfigsListAuthorizationRulesNextResponse + DisasterRecoveryConfigsListAuthorizationRulesNextResponse, + DisasterRecoveryConfigsListNextResponse } from "../models"; /// @@ -53,17 +53,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(); @@ -72,23 +79,35 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { return this; }, byPage: () => { - return this.listPagingPage(resourceGroupName, namespaceName, options); + return this.listAuthorizationRulesPagingPage( + resourceGroupName, + namespaceName, + alias, + options + ); } }; } - private async *listPagingPage( + private async *listAuthorizationRulesPagingPage( resourceGroupName: string, namespaceName: string, - options?: DisasterRecoveryConfigsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceGroupName, namespaceName, options); + alias: string, + options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams + ): AsyncIterableIterator { + let result = await this._listAuthorizationRules( + resourceGroupName, + namespaceName, + alias, + options + ); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listNext( + result = await this._listAuthorizationRulesNext( resourceGroupName, namespaceName, + alias, continuationToken, options ); @@ -97,14 +116,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; @@ -112,24 +133,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(); @@ -138,35 +152,23 @@ export class DisasterRecoveryConfigsImpl implements DisasterRecoveryConfigs { return this; }, byPage: () => { - return this.listAuthorizationRulesPagingPage( - resourceGroupName, - namespaceName, - alias, - options - ); + return this.listPagingPage(resourceGroupName, namespaceName, options); } }; } - private async *listAuthorizationRulesPagingPage( + private async *listPagingPage( resourceGroupName: string, namespaceName: string, - alias: string, - options?: DisasterRecoveryConfigsListAuthorizationRulesOptionalParams - ): AsyncIterableIterator { - let result = await this._listAuthorizationRules( - resourceGroupName, - namespaceName, - alias, - options - ); + options?: DisasterRecoveryConfigsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, namespaceName, options); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listAuthorizationRulesNext( + result = await this._listNext( resourceGroupName, namespaceName, - alias, continuationToken, options ); @@ -175,22 +177,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. @@ -326,75 +399,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 ); } @@ -416,62 +437,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 @@ -482,66 +481,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 @@ -552,22 +553,25 @@ 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: {}, default: { bodyMapper: Mappers.ErrorResponse } }, + requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -576,15 +580,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 } @@ -600,13 +606,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 @@ -623,14 +629,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 } @@ -641,20 +645,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 } @@ -665,18 +666,17 @@ 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 @@ -688,17 +688,18 @@ const listNextOperationSpec: coreClient.OperationSpec = { 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 @@ -710,8 +711,7 @@ const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = { 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 0f673e8b142f..623bbd0ac809 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts @@ -13,18 +13,12 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventHubManagementClient } from "../eventHubManagementClient"; import { - Eventhub, - EventHubsListByNamespaceNextOptionalParams, - EventHubsListByNamespaceOptionalParams, AuthorizationRule, EventHubsListAuthorizationRulesNextOptionalParams, EventHubsListAuthorizationRulesOptionalParams, - EventHubsListByNamespaceResponse, - EventHubsCreateOrUpdateOptionalParams, - EventHubsCreateOrUpdateResponse, - EventHubsDeleteOptionalParams, - EventHubsGetOptionalParams, - EventHubsGetResponse, + Eventhub, + EventHubsListByNamespaceNextOptionalParams, + EventHubsListByNamespaceOptionalParams, EventHubsListAuthorizationRulesResponse, EventHubsCreateOrUpdateAuthorizationRuleOptionalParams, EventHubsCreateOrUpdateAuthorizationRuleResponse, @@ -36,8 +30,14 @@ import { RegenerateAccessKeyParameters, EventHubsRegenerateKeysOptionalParams, EventHubsRegenerateKeysResponse, - EventHubsListByNamespaceNextResponse, - EventHubsListAuthorizationRulesNextResponse + EventHubsListByNamespaceResponse, + EventHubsCreateOrUpdateOptionalParams, + EventHubsCreateOrUpdateResponse, + EventHubsDeleteOptionalParams, + EventHubsGetOptionalParams, + EventHubsGetResponse, + EventHubsListAuthorizationRulesNextResponse, + EventHubsListByNamespaceNextResponse } from "../models"; /// @@ -54,19 +54,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 { @@ -77,31 +80,35 @@ export class EventHubsImpl implements EventHubs { return this; }, byPage: () => { - return this.listByNamespacePagingPage( + return this.listAuthorizationRulesPagingPage( resourceGroupName, namespaceName, + eventHubName, options ); } }; } - private async *listByNamespacePagingPage( + private async *listAuthorizationRulesPagingPage( resourceGroupName: string, namespaceName: string, - options?: EventHubsListByNamespaceOptionalParams - ): AsyncIterableIterator { - let result = await this._listByNamespace( + eventHubName: string, + options?: EventHubsListAuthorizationRulesOptionalParams + ): AsyncIterableIterator { + let result = await this._listAuthorizationRules( resourceGroupName, namespaceName, + eventHubName, options ); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listByNamespaceNext( + result = await this._listAuthorizationRulesNext( resourceGroupName, namespaceName, + eventHubName, continuationToken, options ); @@ -110,14 +117,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; @@ -125,22 +134,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 { @@ -151,35 +157,31 @@ export class EventHubsImpl implements EventHubs { return this; }, byPage: () => { - return this.listAuthorizationRulesPagingPage( + return this.listByNamespacePagingPage( resourceGroupName, namespaceName, - eventHubName, options ); } }; } - private async *listAuthorizationRulesPagingPage( + private async *listByNamespacePagingPage( resourceGroupName: string, namespaceName: string, - eventHubName: string, - options?: EventHubsListAuthorizationRulesOptionalParams - ): AsyncIterableIterator { - let result = await this._listAuthorizationRules( + options?: EventHubsListByNamespaceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByNamespace( resourceGroupName, namespaceName, - eventHubName, options ); yield result.value || []; let continuationToken = result.nextLink; while (continuationToken) { - result = await this._listAuthorizationRulesNext( + result = await this._listByNamespaceNext( resourceGroupName, namespaceName, - eventHubName, continuationToken, options ); @@ -188,98 +190,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. @@ -443,21 +367,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 ); } @@ -481,64 +462,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 } @@ -549,19 +552,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 } @@ -572,18 +575,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 @@ -595,18 +599,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 @@ -626,61 +631,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 } @@ -691,79 +695,75 @@ 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], + queryParameters: [Parameters.apiVersion], 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], + queryParameters: [Parameters.apiVersion, Parameters.skip, Parameters.top], 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 dbb17e7cea2b..db6d04b13dbf 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts @@ -786,7 +786,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters2, + requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -859,7 +859,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters2, + requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -883,7 +883,7 @@ const createOrUpdateNetworkRuleSetOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters3, + requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -973,7 +973,7 @@ const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1066,7 +1066,7 @@ const regenerateKeysOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1091,7 +1091,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], 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..15b3ef1b4da2 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,144 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } 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 sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, namespaceName, resourceAssociationName, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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/privateEndpointConnections.ts b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts index ea2e92582aea..53a76923fe62 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts @@ -322,7 +322,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, 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/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/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..0ccb0622a681 --- /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 { PollerLike, PollOperationState } 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/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"