From 4a6e7fca9385a77533bc09062fad38f90dfdcd46 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 24 Aug 2021 03:38:30 +0000 Subject: [PATCH] CodeGen from PR 15748 in Azure/azure-rest-api-specs Merge 6b0c5b49f6db208443234a77ddf9467b632cd991 into 09c9f24645674a7277d897f21082f1b1f9642a73 --- sdk/eventhub/arm-eventhub/LICENSE.txt | 2 +- sdk/eventhub/arm-eventhub/README.md | 19 +- sdk/eventhub/arm-eventhub/package.json | 18 +- sdk/eventhub/arm-eventhub/rollup.config.js | 6 +- .../src/eventHubManagementClient.ts | 17 +- .../src/eventHubManagementClientContext.ts | 11 +- .../src/models/clustersMappers.ts | 43 + .../src/models/configurationMappers.ts | 12 + .../src/models/consumerGroupsMappers.ts | 17 +- .../models/disasterRecoveryConfigsMappers.ts | 17 +- .../src/models/eventHubsMappers.ts | 17 +- sdk/eventhub/arm-eventhub/src/models/index.ts | 1481 +++++++++++++---- .../arm-eventhub/src/models/mappers.ts | 1317 ++++++++++----- .../src/models/namespacesMappers.ts | 19 +- .../src/models/operationsMappers.ts | 4 +- .../arm-eventhub/src/models/parameters.ts | 56 +- .../privateEndpointConnectionsMappers.ts | 39 + .../src/models/privateLinkResourcesMappers.ts | 13 + .../arm-eventhub/src/models/regionsMappers.ts | 17 +- .../arm-eventhub/src/operations/clusters.ts | 488 ++++++ .../src/operations/configuration.ts | 160 ++ .../src/operations/consumerGroups.ts | 16 +- .../src/operations/disasterRecoveryConfigs.ts | 381 ++--- .../arm-eventhub/src/operations/eventHubs.ts | 402 ++--- .../arm-eventhub/src/operations/index.ts | 11 +- .../arm-eventhub/src/operations/namespaces.ts | 811 +++++++-- .../arm-eventhub/src/operations/operations.ts | 8 +- .../operations/privateEndpointConnections.ts | 341 ++++ .../src/operations/privateLinkResources.ts | 86 + .../arm-eventhub/src/operations/regions.ts | 8 +- sdk/eventhub/arm-eventhub/tsconfig.json | 2 +- 31 files changed, 4561 insertions(+), 1278 deletions(-) create mode 100644 sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts create mode 100644 sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts create mode 100644 sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operations/clusters.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operations/configuration.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts create mode 100644 sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts diff --git a/sdk/eventhub/arm-eventhub/LICENSE.txt b/sdk/eventhub/arm-eventhub/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/eventhub/arm-eventhub/LICENSE.txt +++ b/sdk/eventhub/arm-eventhub/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md index 1bebe8ce0919..80922b8e35c8 100644 --- a/sdk/eventhub/arm-eventhub/README.md +++ b/sdk/eventhub/arm-eventhub/README.md @@ -1,11 +1,11 @@ ## Azure EventHubManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for EventHubManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for EventHubManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-eventhub @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. +#### nodejs - Authentication, client creation, and listAvailableClusterRegion clusters as an example written in JavaScript. ##### Sample code @@ -51,8 +49,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new EventHubManagementClient(creds, subscriptionId); - -client.operations.list().then((result) => { +client.clusters.listAvailableClusterRegion().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -61,7 +58,7 @@ client.operations.list().then((result) => { }); ``` -#### browser - Authentication, client creation, and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and listAvailableClusterRegion clusters as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -86,10 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmEventhub.EventHubManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { + client.clusters.listAvailableClusterRegion().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -106,4 +103,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/.\sdk\eventhub\arm-eventhub\/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/eventhub/arm-eventhub/README.png) diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 10060f5652f4..8a4b133fd77b 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -4,10 +4,10 @@ "description": "EventHubManagementClient Library with typescript type definitions for node.js and browser.", "version": "3.3.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,18 +22,18 @@ "types": "./esm/eventHubManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/feature/v4/sdk/eventhub/arm-eventhub", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/arm-eventhub", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/eventhub/arm-eventhub/rollup.config.js b/sdk/eventhub/arm-eventhub/rollup.config.js index bede107e529e..d159db7280eb 100644 --- a/sdk/eventhub/arm-eventhub/rollup.config.js +++ b/sdk/eventhub/arm-eventhub/rollup.config.js @@ -21,15 +21,15 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index 60c29f68416d..0d353f4352ad 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -18,11 +17,15 @@ import { EventHubManagementClientContext } from "./eventHubManagementClientConte class EventHubManagementClient extends EventHubManagementClientContext { // Operation groups - operations: operations.Operations; + clusters: operations.Clusters; namespaces: operations.Namespaces; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + configuration: operations.Configuration; disasterRecoveryConfigs: operations.DisasterRecoveryConfigs; eventHubs: operations.EventHubs; consumerGroups: operations.ConsumerGroups; + operations: operations.Operations; regions: operations.Regions; /** @@ -39,11 +42,15 @@ class EventHubManagementClient extends EventHubManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.EventHubManagementClientOptions) { super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); + this.clusters = new operations.Clusters(this); this.namespaces = new operations.Namespaces(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.configuration = new operations.Configuration(this); this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this); this.eventHubs = new operations.EventHubs(this); this.consumerGroups = new operations.ConsumerGroups(this); + this.operations = new operations.Operations(this); this.regions = new operations.Regions(this); } } diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts index bd2e264f1817..41a3c96fd1de 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,16 +9,16 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-eventhub"; const packageVersion = "3.3.1"; export class EventHubManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the EventHubManagementClient class. @@ -51,7 +50,7 @@ export class EventHubManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2017-04-01'; + this.apiVersion = '2018-01-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts b/sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts new file mode 100644 index 000000000000..214de6ae8a01 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/clustersMappers.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. + */ + +export { + ArmDisasterRecovery, + AuthorizationRule, + AvailableCluster, + AvailableClustersList, + BaseResource, + CaptureDescription, + Cluster, + ClusterListResult, + ClusterSku, + ConnectionState, + ConsumerGroup, + Destination, + EHNamespace, + EHNamespaceIdContainer, + EHNamespaceIdListResult, + Encryption, + ErrorResponse, + Eventhub, + Identity, + IpFilterRule, + KeyVaultProperties, + MessagingRegions, + MessagingRegionsProperties, + NetworkRuleSet, + NWRuleSetIpRules, + NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, + Resource, + Sku, + Subnet, + TrackedResource, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts b/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts new file mode 100644 index 000000000000..8c1941e74211 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ClusterQuotaConfigurationProperties, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts index 09b82cfb47dc..8ddfd210edd6 100644 --- a/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,20 +11,29 @@ export { AuthorizationRule, BaseResource, CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, ConsumerGroupListResult, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, + Identity, + IpFilterRule, + KeyVaultProperties, MessagingRegions, MessagingRegionsProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, Resource, Sku, Subnet, - TrackedResource + TrackedResource, + VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts index 789b8d96c703..504d5c5587a5 100644 --- a/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -16,19 +16,28 @@ export { CaptureDescription, CheckNameAvailabilityParameter, CheckNameAvailabilityResult, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, + Identity, + IpFilterRule, + KeyVaultProperties, MessagingRegions, MessagingRegionsProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, Resource, Sku, Subnet, - TrackedResource + TrackedResource, + VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts index 253f160c7742..c4792a88c7b4 100644 --- a/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,21 +13,30 @@ export { AuthorizationRuleListResult, BaseResource, CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, EventHubListResult, - MessagingPlan, + Identity, + IpFilterRule, + KeyVaultProperties, MessagingRegions, MessagingRegionsProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, RegenerateAccessKeyParameters, Resource, Sku, Subnet, - TrackedResource + TrackedResource, + VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/index.ts b/sdk/eventhub/arm-eventhub/src/models/index.ts index c8d10779d2b4..f178d55b95c3 100644 --- a/sdk/eventhub/arm-eventhub/src/models/index.ts +++ b/sdk/eventhub/arm-eventhub/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,40 +12,153 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * The Resource definition + * Pre-provisioned and readily available Event Hubs Cluster count per region. + */ +export interface AvailableCluster { + /** + * Location fo the Available Cluster + */ + location?: string; +} + +/** + * The response of the List Available Clusters operation. + */ +export interface AvailableClustersList { + /** + * The count of readily available and pre-provisioned Event Hubs Clusters per region. + */ + value?: AvailableCluster[]; +} + +/** + * Error response indicates Event Hub service is not able to process the incoming request. The + * reason is provided in the error message. + */ +export interface ErrorResponse { + /** + * Error code. + */ + code?: string; + /** + * Error message indicating why the operation failed. + */ + message?: string; +} + +/** + * SKU parameters particular to a cluster instance. + */ +export interface ClusterSku { + /** + * The quantity of Event Hubs Cluster Capacity Units contained in this cluster. + */ + capacity?: number; +} + +/** + * The resource definition. */ export interface Resource extends BaseResource { /** - * Resource Id + * Resource ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name + * Resource name. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * Resource type + * Resource type. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * Definition of Resource + * Definition of resource. */ export interface TrackedResource extends Resource { /** - * Resource location + * Resource location. */ location?: string; /** - * Resource tags + * Resource tags. */ tags?: { [propertyName: string]: string }; } +/** + * Single Event Hubs Cluster resource in List or Get operations. + */ +export interface Cluster extends TrackedResource { + /** + * Properties of the cluster SKU. + */ + sku?: ClusterSku; + /** + * The UTC time when the Event Hubs Cluster was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdAt?: string; + /** + * The UTC time when the Event Hubs Cluster was last updated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedAt?: string; + /** + * The metric ID of the cluster resource. Provided by the service and not modifiable by the user. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metricId?: string; + /** + * Status of the Cluster resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * The full ARM ID of an Event Hubs Namespace + */ +export interface EHNamespaceIdContainer { + /** + * id parameter + */ + id?: string; +} + +/** + * The response of the List Namespace IDs operation + */ +export interface EHNamespaceIdListResult { + /** + * Result of the List Namespace IDs operation + */ + value?: EHNamespaceIdContainer[]; +} + +/** + * Single item in a List or Get IpFilterRules operation + */ +export interface IpFilterRule extends Resource { + /** + * IP Mask + */ + ipMask?: string; + /** + * The IP Filter Action. Possible values include: 'Accept', 'Reject' + */ + action?: IPAction; + /** + * IP Filter name + */ + filterName?: string; +} + /** * SKU parameters supplied to the create namespace operation */ @@ -64,6 +177,58 @@ export interface Sku { capacity?: number; } +/** + * Properties to configure Identity for Bring your Own Keys + */ +export interface Identity { + /** + * ObjectId from the KeyVault + */ + principalId?: string; + /** + * TenantId from the KeyVault + */ + tenantId?: string; + /** + * Enumerates the possible value Identity type, which currently supports only 'SystemAssigned'. + * Possible values include: 'SystemAssigned'. Default value: 'SystemAssigned'. + */ + type?: IdentityType; +} + +/** + * Properties to configure keyVault Properties + */ +export interface KeyVaultProperties { + /** + * Name of the Key from KeyVault + */ + keyName?: string; + /** + * Uri of KeyVault + */ + keyVaultUri?: string; + /** + * Key Version + */ + keyVersion?: string; +} + +/** + * Properties to configure Encryption + */ +export interface Encryption { + /** + * Properties of KeyVault + */ + keyVaultProperties?: KeyVaultProperties[]; + /** + * Enumerates the possible value of keySource for Encryption. Possible values include: + * 'Microsoft.KeyVault'. Default value: 'Microsoft.KeyVault'. + */ + keySource?: KeySource; +} + /** * Single Namespace item in List or Get Operation */ @@ -72,11 +237,20 @@ export interface EHNamespace extends TrackedResource { * Properties of sku resource */ sku?: Sku; + /** + * Properties of BYOK Identity description + */ + identity?: Identity; /** * Provisioning state of the Namespace. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Status of the Namespace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; /** * The time the Namespace was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -92,6 +266,10 @@ export interface EHNamespace extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceBusEndpoint?: string; + /** + * Cluster ARM ID of the Namespace. + */ + clusterArmId?: string; /** * Identifier for Azure Insights metrics. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -110,6 +288,184 @@ export interface EHNamespace extends TrackedResource { * Value that indicates whether Kafka is enabled for eventhub namespace. */ kafkaEnabled?: boolean; + /** + * Enabling this property creates a Standard Event Hubs Namespace in regions supported + * availability zones. + */ + zoneRedundant?: boolean; + /** + * Properties of BYOK Encryption description + */ + encryption?: Encryption; +} + +/** + * PrivateEndpoint information. + */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint. + */ + id?: string; +} + +/** + * ConnectionState information. + */ +export interface ConnectionState { + /** + * Status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', + * 'Disconnected' + */ + status?: PrivateLinkConnectionStatus; + /** + * Description of the connection state. + */ + description?: string; +} + +/** + * Properties of the PrivateEndpointConnection. + */ +export interface PrivateEndpointConnection extends Resource { + /** + * The Private Endpoint resource for this Connection. + */ + privateEndpoint?: PrivateEndpoint; + /** + * Details about the state of the connection. + */ + privateLinkServiceConnectionState?: ConnectionState; + /** + * Provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', + * 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + */ + provisioningState?: EndPointProvisioningState; +} + +/** + * Information of the private link resource. + */ +export interface PrivateLinkResource { + /** + * The private link resource group id. + */ + groupId?: string; + /** + * The private link resource required member names. + */ + requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; + /** + * Fully qualified identifier of the resource. + */ + id?: string; + /** + * Name of the resource + */ + name?: string; + /** + * Type of the resource + */ + type?: string; +} + +/** + * Result of the List private link resources operation. + */ +export interface PrivateLinkResourcesListResult { + /** + * A collection of private link resources + */ + value?: PrivateLinkResource[]; + /** + * A link for the next page of private link resources. + */ + nextLink?: 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 }; +} + +/** + * Single item in a List or Get VirtualNetworkRules operation + */ +export interface VirtualNetworkRule extends Resource { + /** + * ARM ID of Virtual Network Subnet + */ + virtualNetworkSubnetId?: string; +} + +/** + * Properties supplied for Subnet + */ +export interface Subnet { + /** + * Resource ID of Virtual Network Subnet + */ + id?: string; +} + +/** + * The response from the List namespace operation. + */ +export interface NWRuleSetIpRules { + /** + * IP Mask + */ + ipMask?: string; + /** + * The IP Filter Action. Possible values include: 'Allow' + */ + action?: NetworkRuleIPAction; +} + +/** + * The response from the List namespace operation. + */ +export interface NWRuleSetVirtualNetworkRules { + /** + * Subnet properties + */ + subnet?: Subnet; + /** + * Value that indicates whether to ignore missing Vnet Service Endpoint + */ + ignoreMissingVnetServiceEndpoint?: boolean; +} + +/** + * Description of topic resource. + */ +export interface NetworkRuleSet extends Resource { + /** + * Value that indicates whether Trusted Service Access is Enabled or not. + */ + trustedServiceAccessEnabled?: boolean; + /** + * Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' + */ + defaultAction?: DefaultAction; + /** + * List VirtualNetwork Rules + */ + virtualNetworkRules?: NWRuleSetVirtualNetworkRules[]; + /** + * List of IpRules + */ + ipRules?: NWRuleSetIpRules[]; } /** @@ -180,100 +536,35 @@ export interface RegenerateAccessKeyParameters { } /** - * Capture storage details for capture description + * Parameter supplied to check Namespace name availability operation */ -export interface Destination { +export interface CheckNameAvailabilityParameter { /** - * Name for capture destination + * Name to check the namespace name availability */ - name?: string; + name: string; +} + +/** + * The Result of the CheckNameAvailability operation + */ +export interface CheckNameAvailabilityResult { /** - * Resource id of the storage account to be used to create the blobs + * 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.** */ - storageAccountResourceId?: string; + readonly message?: string; /** - * Blob container Name + * Value indicating Namespace is availability, true if the Namespace is available; otherwise, + * false. */ - blobContainer?: string; + nameAvailable?: boolean; /** - * 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; -} - -/** - * 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. Possible values include: 'Avro', - * 'AvroDeflate' - */ - 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; -} - -/** - * Single item in List or Get Event Hub operation - */ -export interface Eventhub extends 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 partitionIds?: string[]; - /** - * 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; - /** - * The exact time the message was updated. - * **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. Possible values include: - * 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - * 'Renaming', 'Unknown' - */ - status?: EntityStatus; - /** - * Properties of capture description + * The reason for unavailability of a Namespace. Possible values include: 'None', 'InvalidName', + * 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', + * 'TooManyNamespaceInCurrentSubscription' */ - captureDescription?: CaptureDescription; + reason?: UnavailableReason; } /** @@ -299,35 +590,34 @@ export interface ConsumerGroup extends Resource { } /** - * Parameter supplied to check Namespace name availability operation + * Single item in List or Get Alias(Disaster Recovery configuration) operation */ -export interface CheckNameAvailabilityParameter { +export interface ArmDisasterRecovery extends Resource { /** - * Name to check the namespace name availability + * Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' + * or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name: string; -} - -/** - * The Result of the CheckNameAvailability operation - */ -export interface CheckNameAvailabilityResult { + readonly provisioningState?: ProvisioningStateDR; /** - * 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.** + * ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing */ - readonly message?: string; + partnerNamespace?: string; /** - * Value indicating Namespace is availability, true if the Namespace is available; otherwise, - * false. + * Alternate name specified when alias and namespace names are same. */ - nameAvailable?: boolean; + alternateName?: string; /** - * The reason for unavailability of a Namespace. Possible values include: 'None', 'InvalidName', - * 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', - * 'TooManyNamespaceInCurrentSubscription' + * role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or + * 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - reason?: UnavailableReason; + readonly role?: RoleDisasterRecovery; + /** + * Number of entities pending to be replicated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pendingReplicationOperationsCount?: number; } /** @@ -367,154 +657,126 @@ export interface Operation { } /** - * Error response indicates EventHub service is not able to process the incoming request. The - * reason is provided in the error message. + * Capture storage details for capture description */ -export interface ErrorResponse { +export interface Destination { /** - * Error code. + * Name for capture destination */ - code?: string; + name?: string; /** - * Error message indicating why the operation failed. + * Resource id of the storage account to be used to create the blobs */ - message?: string; + 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; } /** - * Single item in List or Get Alias(Disaster Recovery configuration) operation + * Properties to configure capture description for eventhub */ -export interface ArmDisasterRecovery extends Resource { - /** - * Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' - * or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningStateDR; +export interface CaptureDescription { /** - * ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + * A value that indicates whether capture description is enabled. */ - partnerNamespace?: string; + enabled?: boolean; /** - * Alternate name specified when alias and namespace names are same. + * Enumerates the possible values for the encoding format of capture description. Note: + * 'AvroDeflate' will be deprecated in New API Version. Possible values include: 'Avro', + * 'AvroDeflate' */ - alternateName?: string; + encoding?: EncodingCaptureDescription; /** - * role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or - * 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * 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 */ - readonly role?: RoleDisasterRecovery; + intervalInSeconds?: number; /** - * Number of entities pending to be replicated. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * 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 */ - readonly pendingReplicationOperationsCount?: number; -} - -/** - * An interface representing MessagingRegionsProperties. - */ -export interface MessagingRegionsProperties { + sizeLimitInBytes?: number; /** - * Region code - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Properties of Destination where capture will be stored. (Storage Account, Blob Names) */ - readonly code?: string; + destination?: Destination; /** - * Full name of the region - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A value that indicates whether to Skip Empty Archives */ - readonly fullName?: string; -} - -/** - * Messaging Region - */ -export interface MessagingRegions extends TrackedResource { - properties?: MessagingRegionsProperties; + skipEmptyArchives?: boolean; } /** - * Messaging Plan for the namespace + * Single item in List or Get Event Hub operation */ -export interface MessagingPlan extends TrackedResource { +export interface Eventhub extends Resource { /** - * Sku type + * Current number of shards on the Event Hub. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sku?: number; + readonly partitionIds?: string[]; /** - * Selected event hub unit + * Exact time the Event Hub was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly selectedEventHubUnit?: number; + readonly createdAt?: Date; /** - * The exact time the messaging plan was updated. + * The exact time the message was updated. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly updatedAt?: Date; /** - * revision number - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Number of days to retain the events for this Event Hub, value should be 1 to 7 days */ - readonly revision?: number; -} - -/** - * Properties supplied for Subnet - */ -export interface Subnet { + messageRetentionInDays?: number; /** - * Resource ID of Virtual Network Subnet + * Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. */ - id: string; -} - -/** - * Description of NetWorkRuleSet - IpRules resource. - */ -export interface NWRuleSetIpRules { + partitionCount?: number; /** - * IP Mask + * Enumerates the possible values for the status of the Event Hub. Possible values include: + * 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + * 'Renaming', 'Unknown' */ - ipMask?: string; + status?: EntityStatus; /** - * The IP Filter Action. Possible values include: 'Allow'. Default value: 'Allow'. + * Properties of capture description */ - action?: NetworkRuleIPAction; + captureDescription?: CaptureDescription; } /** - * Description of VirtualNetworkRules - NetworkRules resource. + * Properties of Messaging Region */ -export interface NWRuleSetVirtualNetworkRules { +export interface MessagingRegionsProperties { /** - * Subnet properties + * Region code + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - subnet?: Subnet; + readonly code?: string; /** - * Value that indicates whether to ignore missing VNet Service Endpoint + * Full name of the region + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ignoreMissingVnetServiceEndpoint?: boolean; + readonly fullName?: string; } /** - * Description of NetworkRuleSet resource. + * Messaging Region */ -export interface NetworkRuleSet extends Resource { - /** - * Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' - */ - defaultAction?: DefaultAction; - /** - * List VirtualNetwork Rules - */ - virtualNetworkRules?: NWRuleSetVirtualNetworkRules[]; +export interface MessagingRegions extends TrackedResource { /** - * List of IpRules + * Properties of Messaging Region */ - ipRules?: NWRuleSetIpRules[]; + properties?: MessagingRegionsProperties; } /** @@ -536,7 +798,39 @@ export interface EventHubsListByNamespaceOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface ConsumerGroupsListByEventHubOptionalParams extends msRest.RequestOptionsBase { +export interface EventHubsListByNamespaceNextOptionalParams extends msRest.RequestOptionsBase { + /** + * 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; +} + +/** + * Optional Parameters. + */ +export interface ConsumerGroupsListByEventHubOptionalParams extends msRest.RequestOptionsBase { + /** + * 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; +} + +/** + * Optional Parameters. + */ +export interface ConsumerGroupsListByEventHubNextOptionalParams extends msRest.RequestOptionsBase { /** * 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 @@ -558,16 +852,28 @@ export interface EventHubManagementClientOptions extends AzureServiceClientOptio /** * @interface - * 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. - * @extends Array + * The response of the List Event Hubs Clusters operation. + * @extends Array */ -export interface OperationListResult extends Array { +export interface ClusterListResult extends Array { /** - * 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.** + * Link to the next set of results. Empty unless the value parameter contains an incomplete list + * of Event Hubs Clusters. */ - readonly nextLink?: string; + nextLink?: string; +} + +/** + * @interface + * The response from the List namespace operation. + * @extends Array + */ +export interface IpFilterRuleListResult extends Array { + /** + * Link to the next set of results. Not empty if Value contains an incomplete list of IpFilter + * Rules + */ + nextLink?: string; } /** @@ -582,6 +888,19 @@ export interface EHNamespaceListResult extends Array { nextLink?: string; } +/** + * @interface + * The response from the List namespace operation. + * @extends Array + */ +export interface VirtualNetworkRuleListResult extends Array { + /** + * Link to the next set of results. Not empty if Value contains an incomplete list of + * VirtualNetwork Rules + */ + nextLink?: string; +} + /** * @interface * The response from the List namespace operation. @@ -595,6 +914,18 @@ export interface AuthorizationRuleListResult extends Array { nextLink?: string; } +/** + * @interface + * Result of the list of all private endpoint connections operation. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * A link for the next page of private endpoint connection resources. + */ + nextLink?: string; +} + /** * @interface * The result of the List Alias(Disaster Recovery configuration) operation. @@ -633,6 +964,20 @@ export interface ConsumerGroupListResult extends Array { nextLink?: string; } +/** + * @interface + * 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. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * 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; +} + /** * @interface * The response of the List MessagingRegions operation. @@ -647,6 +992,14 @@ export interface MessagingRegionsListResult extends Array { readonly nextLink?: string; } +/** + * Defines values for IPAction. + * Possible values include: 'Accept', 'Reject' + * @readonly + * @enum {string} + */ +export type IPAction = 'Accept' | 'Reject'; + /** * Defines values for SkuName. * Possible values include: 'Basic', 'Standard' @@ -664,37 +1017,68 @@ export type SkuName = 'Basic' | 'Standard'; export type SkuTier = 'Basic' | 'Standard'; /** - * Defines values for AccessRights. - * Possible values include: 'Manage', 'Send', 'Listen' + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned' * @readonly * @enum {string} */ -export type AccessRights = 'Manage' | 'Send' | 'Listen'; +export type IdentityType = 'SystemAssigned'; /** - * Defines values for KeyType. - * Possible values include: 'PrimaryKey', 'SecondaryKey' + * Defines values for KeySource. + * Possible values include: 'Microsoft.KeyVault' * @readonly * @enum {string} */ -export type KeyType = 'PrimaryKey' | 'SecondaryKey'; +export type KeySource = 'Microsoft.KeyVault'; /** - * Defines values for EntityStatus. - * Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', - * 'Creating', 'Deleting', 'Renaming', 'Unknown' + * Defines values for PrivateLinkConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' * @readonly * @enum {string} */ -export type EntityStatus = 'Active' | 'Disabled' | 'Restoring' | 'SendDisabled' | 'ReceiveDisabled' | 'Creating' | 'Deleting' | 'Renaming' | 'Unknown'; +export type PrivateLinkConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; /** - * Defines values for EncodingCaptureDescription. - * Possible values include: 'Avro', 'AvroDeflate' + * Defines values for EndPointProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' * @readonly * @enum {string} */ -export type EncodingCaptureDescription = 'Avro' | 'AvroDeflate'; +export type EndPointProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; + +/** + * Defines values for NetworkRuleIPAction. + * Possible values include: 'Allow' + * @readonly + * @enum {string} + */ +export type NetworkRuleIPAction = 'Allow'; + +/** + * Defines values for DefaultAction. + * Possible values include: 'Allow', 'Deny' + * @readonly + * @enum {string} + */ +export type DefaultAction = 'Allow' | 'Deny'; + +/** + * Defines values for AccessRights. + * Possible values include: 'Manage', 'Send', 'Listen' + * @readonly + * @enum {string} + */ +export type AccessRights = 'Manage' | 'Send' | 'Listen'; + +/** + * Defines values for KeyType. + * Possible values include: 'PrimaryKey', 'SecondaryKey' + * @readonly + * @enum {string} + */ +export type KeyType = 'PrimaryKey' | 'SecondaryKey'; /** * Defines values for UnavailableReason. @@ -722,25 +1106,266 @@ export type ProvisioningStateDR = 'Accepted' | 'Succeeded' | 'Failed'; export type RoleDisasterRecovery = 'Primary' | 'PrimaryNotReplicating' | 'Secondary'; /** - * Defines values for NetworkRuleIPAction. - * Possible values include: 'Allow' + * Defines values for EncodingCaptureDescription. + * Possible values include: 'Avro', 'AvroDeflate' * @readonly * @enum {string} */ -export type NetworkRuleIPAction = 'Allow'; +export type EncodingCaptureDescription = 'Avro' | 'AvroDeflate'; /** - * Defines values for DefaultAction. - * Possible values include: 'Allow', 'Deny' + * Defines values for EntityStatus. + * Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', + * 'Creating', 'Deleting', 'Renaming', 'Unknown' * @readonly * @enum {string} */ -export type DefaultAction = 'Allow' | 'Deny'; +export type EntityStatus = 'Active' | 'Disabled' | 'Restoring' | 'SendDisabled' | 'ReceiveDisabled' | 'Creating' | 'Deleting' | 'Renaming' | 'Unknown'; + +/** + * Contains response data for the listAvailableClusterRegion operation. + */ +export type ClustersListAvailableClusterRegionResponse = AvailableClustersList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableClustersList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ClustersListByResourceGroupResponse = ClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ClustersGetResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ClustersCreateOrUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ClustersUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the listNamespaces operation. + */ +export type ClustersListNamespacesResponse = EHNamespaceIdListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: EHNamespaceIdListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ClustersBeginCreateOrUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type ClustersBeginUpdateResponse = Cluster & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Cluster; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ClustersListByResourceGroupNextResponse = ClusterListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ClusterListResult; + }; +}; + +/** + * Contains response data for the listIPFilterRules operation. + */ +export type NamespacesListIPFilterRulesResponse = IpFilterRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IpFilterRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdateIpFilterRule operation. + */ +export type NamespacesCreateOrUpdateIpFilterRuleResponse = IpFilterRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IpFilterRule; + }; +}; + +/** + * Contains response data for the getIpFilterRule operation. + */ +export type NamespacesGetIpFilterRuleResponse = IpFilterRule & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IpFilterRule; + }; +}; /** * Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult & { +export type NamespacesListResponse = EHNamespaceListResult & { /** * The underlying HTTP response. */ @@ -753,14 +1378,114 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: EHNamespaceListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByResourceGroup operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type NamespacesListByResourceGroupResponse = EHNamespaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: EHNamespaceListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type NamespacesCreateOrUpdateResponse = EHNamespace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: EHNamespace; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type NamespacesGetResponse = EHNamespace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: EHNamespace; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type NamespacesUpdateResponse = EHNamespace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: EHNamespace; + }; +}; + +/** + * Contains response data for the listVirtualNetworkRules operation. + */ +export type NamespacesListVirtualNetworkRulesResponse = VirtualNetworkRuleListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualNetworkRuleListResult; + }; +}; + +/** + * Contains response data for the createOrUpdateVirtualNetworkRule operation. + */ +export type NamespacesCreateOrUpdateVirtualNetworkRuleResponse = VirtualNetworkRule & { /** * The underlying HTTP response. */ @@ -773,14 +1498,14 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: VirtualNetworkRule; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the getVirtualNetworkRule operation. */ -export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type NamespacesGetVirtualNetworkRuleResponse = VirtualNetworkRule & { /** * The underlying HTTP response. */ @@ -793,14 +1518,14 @@ export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResul /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: VirtualNetworkRule; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdateNetworkRuleSet operation. */ -export type NamespacesListResponse = EHNamespaceListResult & { +export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & { /** * The underlying HTTP response. */ @@ -813,14 +1538,14 @@ export type NamespacesListResponse = EHNamespaceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: NetworkRuleSet; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the getNetworkRuleSet operation. */ -export type NamespacesListByResourceGroupResponse = EHNamespaceListResult & { +export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & { /** * The underlying HTTP response. */ @@ -833,14 +1558,14 @@ export type NamespacesListByResourceGroupResponse = EHNamespaceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: NetworkRuleSet; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listAuthorizationRules operation. */ -export type NamespacesCreateOrUpdateResponse = EHNamespace & { +export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -853,14 +1578,14 @@ export type NamespacesCreateOrUpdateResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdateAuthorizationRule operation. */ -export type NamespacesGetResponse = EHNamespace & { +export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -873,14 +1598,14 @@ export type NamespacesGetResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the update operation. + * Contains response data for the getAuthorizationRule operation. */ -export type NamespacesUpdateResponse = EHNamespace & { +export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -893,14 +1618,14 @@ export type NamespacesUpdateResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the getMessagingPlan operation. + * Contains response data for the listKeys operation. */ -export type NamespacesGetMessagingPlanResponse = MessagingPlan & { +export type NamespacesListKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -913,14 +1638,14 @@ export type NamespacesGetMessagingPlanResponse = MessagingPlan & { /** * The response body as parsed JSON or XML */ - parsedBody: MessagingPlan; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the listAuthorizationRules operation. + * Contains response data for the regenerateKeys operation. */ -export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResult & { +export type NamespacesRegenerateKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -933,14 +1658,14 @@ export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResu /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the createOrUpdateAuthorizationRule operation. + * Contains response data for the checkNameAvailability operation. */ -export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & { +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { /** * The underlying HTTP response. */ @@ -953,14 +1678,14 @@ export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRul /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: CheckNameAvailabilityResult; }; }; /** - * Contains response data for the getAuthorizationRule operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & { +export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & { /** * The underlying HTTP response. */ @@ -973,14 +1698,14 @@ export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & { /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: EHNamespace; }; }; /** - * Contains response data for the listKeys operation. + * Contains response data for the listIPFilterRulesNext operation. */ -export type NamespacesListKeysResponse = AccessKeys & { +export type NamespacesListIPFilterRulesNextResponse = IpFilterRuleListResult & { /** * The underlying HTTP response. */ @@ -993,14 +1718,14 @@ export type NamespacesListKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: IpFilterRuleListResult; }; }; /** - * Contains response data for the regenerateKeys operation. + * Contains response data for the listNext operation. */ -export type NamespacesRegenerateKeysResponse = AccessKeys & { +export type NamespacesListNextResponse = EHNamespaceListResult & { /** * The underlying HTTP response. */ @@ -1013,14 +1738,14 @@ export type NamespacesRegenerateKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: EHNamespaceListResult; }; }; /** - * Contains response data for the createOrUpdateNetworkRuleSet operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & { +export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & { /** * The underlying HTTP response. */ @@ -1033,14 +1758,14 @@ export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & { /** * The response body as parsed JSON or XML */ - parsedBody: NetworkRuleSet; + parsedBody: EHNamespaceListResult; }; }; /** - * Contains response data for the getNetworkRuleSet operation. + * Contains response data for the listVirtualNetworkRulesNext operation. */ -export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & { +export type NamespacesListVirtualNetworkRulesNextResponse = VirtualNetworkRuleListResult & { /** * The underlying HTTP response. */ @@ -1053,14 +1778,14 @@ export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & { /** * The response body as parsed JSON or XML */ - parsedBody: NetworkRuleSet; + parsedBody: VirtualNetworkRuleListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the listAuthorizationRulesNext operation. */ -export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & { +export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1073,14 +1798,14 @@ export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type NamespacesListNextResponse = EHNamespaceListResult & { +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1093,14 +1818,14 @@ export type NamespacesListNextResponse = EHNamespaceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the createOrUpdate operation. */ -export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1113,14 +1838,14 @@ export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listAuthorizationRulesNext operation. + * Contains response data for the get operation. */ -export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1133,14 +1858,14 @@ export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleList /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the listNext operation. */ -export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1153,14 +1878,14 @@ export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvai /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResourcesListResult & { /** * The underlying HTTP response. */ @@ -1173,14 +1898,14 @@ export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecoveryListResult; + parsedBody: PrivateLinkResourcesListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the patch operation. */ -export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery & { +export type ConfigurationPatchResponse = ClusterQuotaConfigurationProperties & { /** * The underlying HTTP response. */ @@ -1193,14 +1918,14 @@ export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecovery; + parsedBody: ClusterQuotaConfigurationProperties; }; }; /** * Contains response data for the get operation. */ -export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { +export type ConfigurationGetResponse = ClusterQuotaConfigurationProperties & { /** * The underlying HTTP response. */ @@ -1213,7 +1938,7 @@ export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecovery; + parsedBody: ClusterQuotaConfigurationProperties; }; }; @@ -1278,9 +2003,29 @@ export type DisasterRecoveryConfigsListKeysResponse = AccessKeys & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the checkNameAvailability operation. */ -export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult & { +export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CheckNameAvailabilityResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult & { /** * The underlying HTTP response. */ @@ -1298,9 +2043,9 @@ export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListRes }; /** - * Contains response data for the listAuthorizationRulesNext operation. + * Contains response data for the createOrUpdate operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { +export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery & { /** * The underlying HTTP response. */ @@ -1313,14 +2058,14 @@ export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = Authoriz /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: ArmDisasterRecovery; }; }; /** - * Contains response data for the listByNamespace operation. + * Contains response data for the get operation. */ -export type EventHubsListByNamespaceResponse = EventHubListResult & { +export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { /** * The underlying HTTP response. */ @@ -1333,14 +2078,14 @@ export type EventHubsListByNamespaceResponse = EventHubListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EventHubListResult; + parsedBody: ArmDisasterRecovery; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listAuthorizationRulesNext operation. */ -export type EventHubsCreateOrUpdateResponse = Eventhub & { +export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1353,14 +2098,14 @@ export type EventHubsCreateOrUpdateResponse = Eventhub & { /** * The response body as parsed JSON or XML */ - parsedBody: Eventhub; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listNext operation. */ -export type EventHubsGetResponse = Eventhub & { +export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult & { /** * The underlying HTTP response. */ @@ -1373,7 +2118,7 @@ export type EventHubsGetResponse = Eventhub & { /** * The response body as parsed JSON or XML */ - parsedBody: Eventhub; + parsedBody: ArmDisasterRecoveryListResult; }; }; @@ -1478,9 +2223,9 @@ export type EventHubsRegenerateKeysResponse = AccessKeys & { }; /** - * Contains response data for the listByNamespaceNext operation. + * Contains response data for the listByNamespace operation. */ -export type EventHubsListByNamespaceNextResponse = EventHubListResult & { +export type EventHubsListByNamespaceResponse = EventHubListResult & { /** * The underlying HTTP response. */ @@ -1497,6 +2242,46 @@ export type EventHubsListByNamespaceNextResponse = EventHubListResult & { }; }; +/** + * Contains response data for the createOrUpdate operation. + */ +export type EventHubsCreateOrUpdateResponse = Eventhub & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Eventhub; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type EventHubsGetResponse = Eventhub & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Eventhub; + }; +}; + /** * Contains response data for the listAuthorizationRulesNext operation. */ @@ -1517,6 +2302,26 @@ export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListR }; }; +/** + * Contains response data for the listByNamespaceNext operation. + */ +export type EventHubsListByNamespaceNextResponse = EventHubListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: EventHubListResult; + }; +}; + /** * Contains response data for the createOrUpdate operation. */ @@ -1597,6 +2402,46 @@ export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult & }; }; +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + /** * Contains response data for the listBySku operation. */ diff --git a/sdk/eventhub/arm-eventhub/src/models/mappers.ts b/sdk/eventhub/arm-eventhub/src/models/mappers.ts index 8b1ee80373e4..78ac513c14ff 100644 --- a/sdk/eventhub/arm-eventhub/src/models/mappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,6 +12,94 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const AvailableCluster: msRest.CompositeMapper = { + serializedName: "AvailableCluster", + type: { + name: "Composite", + className: "AvailableCluster", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableClustersList: msRest.CompositeMapper = { + serializedName: "AvailableClustersList", + type: { + name: "Composite", + className: "AvailableClustersList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableCluster" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterSku: msRest.CompositeMapper = { + serializedName: "ClusterSku", + type: { + name: "Composite", + className: "ClusterSku", + modelProperties: { + name: { + required: true, + isConstant: true, + serializedName: "name", + defaultValue: 'Dedicated', + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -71,77 +159,30 @@ export const TrackedResource: msRest.CompositeMapper = { } }; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - constraints: { - InclusiveMaximum: 20, - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const EHNamespace: msRest.CompositeMapper = { - serializedName: "EHNamespace", +export const Cluster: msRest.CompositeMapper = { + serializedName: "Cluster", type: { name: "Composite", - className: "EHNamespace", + className: "Cluster", modelProperties: { ...TrackedResource.type.modelProperties, sku: { serializedName: "sku", type: { name: "Composite", - className: "Sku" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" + className: "ClusterSku" } }, createdAt: { readOnly: true, serializedName: "properties.createdAt", type: { - name: "DateTime" + name: "String" } }, updatedAt: { readOnly: true, serializedName: "properties.updatedAt", - type: { - name: "DateTime" - } - }, - serviceBusEndpoint: { - readOnly: true, - serializedName: "properties.serviceBusEndpoint", type: { name: "String" } @@ -153,47 +194,47 @@ export const EHNamespace: msRest.CompositeMapper = { name: "String" } }, - isAutoInflateEnabled: { - serializedName: "properties.isAutoInflateEnabled", - type: { - name: "Boolean" - } - }, - maximumThroughputUnits: { - serializedName: "properties.maximumThroughputUnits", - constraints: { - InclusiveMaximum: 20, - InclusiveMinimum: 0 - }, + status: { + readOnly: true, + serializedName: "properties.status", type: { - name: "Number" + name: "String" } - }, - kafkaEnabled: { - serializedName: "properties.kafkaEnabled", + } + } + } +}; + +export const EHNamespaceIdContainer: msRest.CompositeMapper = { + serializedName: "EHNamespaceIdContainer", + type: { + name: "Composite", + className: "EHNamespaceIdContainer", + modelProperties: { + id: { + serializedName: "id", type: { - name: "Boolean" + name: "String" } } } } }; -export const AuthorizationRule: msRest.CompositeMapper = { - serializedName: "AuthorizationRule", +export const EHNamespaceIdListResult: msRest.CompositeMapper = { + serializedName: "EHNamespaceIdListResult", type: { name: "Composite", - className: "AuthorizationRule", + className: "EHNamespaceIdListResult", modelProperties: { - ...Resource.type.modelProperties, - rights: { - required: true, - serializedName: "properties.rights", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "EHNamespaceIdContainer" } } } @@ -202,118 +243,119 @@ export const AuthorizationRule: msRest.CompositeMapper = { } }; -export const AccessKeys: msRest.CompositeMapper = { - serializedName: "AccessKeys", +export const IpFilterRule: msRest.CompositeMapper = { + serializedName: "IpFilterRule", type: { name: "Composite", - className: "AccessKeys", + className: "IpFilterRule", modelProperties: { - primaryConnectionString: { - readOnly: true, - serializedName: "primaryConnectionString", - type: { - name: "String" - } - }, - secondaryConnectionString: { - readOnly: true, - serializedName: "secondaryConnectionString", + ...Resource.type.modelProperties, + ipMask: { + serializedName: "properties.ipMask", type: { name: "String" } }, - aliasPrimaryConnectionString: { - readOnly: true, - serializedName: "aliasPrimaryConnectionString", + action: { + serializedName: "properties.action", type: { name: "String" } }, - aliasSecondaryConnectionString: { - readOnly: true, - serializedName: "aliasSecondaryConnectionString", + filterName: { + serializedName: "properties.filterName", type: { name: "String" } - }, - primaryKey: { - readOnly: true, - serializedName: "primaryKey", + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + required: true, + serializedName: "name", type: { name: "String" } }, - secondaryKey: { - readOnly: true, - serializedName: "secondaryKey", + tier: { + serializedName: "tier", type: { name: "String" } }, - keyName: { - readOnly: true, - serializedName: "keyName", + capacity: { + serializedName: "capacity", + constraints: { + InclusiveMinimum: 0 + }, type: { - name: "String" + name: "Number" } } } } }; -export const RegenerateAccessKeyParameters: msRest.CompositeMapper = { - serializedName: "RegenerateAccessKeyParameters", +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", type: { name: "Composite", - className: "RegenerateAccessKeyParameters", + className: "Identity", modelProperties: { - keyType: { - required: true, - serializedName: "keyType", + principalId: { + serializedName: "principalId", type: { - name: "Enum", - allowedValues: [ - "PrimaryKey", - "SecondaryKey" - ] + name: "String" } }, - key: { - serializedName: "key", + tenantId: { + serializedName: "tenantId", type: { name: "String" } + }, + type: { + serializedName: "type", + defaultValue: 'SystemAssigned', + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned" + ] + } } } } }; -export const Destination: msRest.CompositeMapper = { - serializedName: "Destination", +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultProperties", type: { name: "Composite", - className: "Destination", + className: "KeyVaultProperties", modelProperties: { - name: { - serializedName: "name", + keyName: { + serializedName: "keyName", type: { name: "String" } }, - storageAccountResourceId: { - serializedName: "properties.storageAccountResourceId", + keyVaultUri: { + serializedName: "keyVaultUri", type: { name: "String" } }, - blobContainer: { - serializedName: "properties.blobContainer", - type: { - name: "String" - } - }, - archiveNameFormat: { - serializedName: "properties.archiveNameFormat", + keyVersion: { + serializedName: "keyVersion", type: { name: "String" } @@ -322,57 +364,390 @@ export const Destination: msRest.CompositeMapper = { } }; -export const CaptureDescription: msRest.CompositeMapper = { - serializedName: "CaptureDescription", +export const Encryption: msRest.CompositeMapper = { + serializedName: "Encryption", type: { name: "Composite", - className: "CaptureDescription", + className: "Encryption", modelProperties: { - enabled: { - serializedName: "enabled", + keyVaultProperties: { + serializedName: "keyVaultProperties", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } } }, - encoding: { - serializedName: "encoding", + keySource: { + serializedName: "keySource", + defaultValue: 'Microsoft.KeyVault', type: { name: "Enum", allowedValues: [ - "Avro", - "AvroDeflate" + "Microsoft.KeyVault" ] } + } + } + } +}; + +export const EHNamespace: msRest.CompositeMapper = { + serializedName: "EHNamespace", + type: { + name: "Composite", + className: "EHNamespace", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } }, - intervalInSeconds: { - serializedName: "intervalInSeconds", - constraints: { - InclusiveMaximum: 900, - InclusiveMinimum: 60 - }, + identity: { + serializedName: "identity", type: { - name: "Number" + name: "Composite", + className: "Identity" } }, - sizeLimitInBytes: { - serializedName: "sizeLimitInBytes", + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + createdAt: { + readOnly: true, + serializedName: "properties.createdAt", + type: { + name: "DateTime" + } + }, + updatedAt: { + readOnly: true, + serializedName: "properties.updatedAt", + type: { + name: "DateTime" + } + }, + serviceBusEndpoint: { + readOnly: true, + serializedName: "properties.serviceBusEndpoint", + type: { + name: "String" + } + }, + clusterArmId: { + serializedName: "properties.clusterArmId", + type: { + name: "String" + } + }, + metricId: { + readOnly: true, + serializedName: "properties.metricId", + type: { + name: "String" + } + }, + isAutoInflateEnabled: { + serializedName: "properties.isAutoInflateEnabled", + type: { + name: "Boolean" + } + }, + maximumThroughputUnits: { + serializedName: "properties.maximumThroughputUnits", constraints: { - InclusiveMaximum: 524288000, - InclusiveMinimum: 10485760 + InclusiveMaximum: 20, + InclusiveMinimum: 0 }, type: { name: "Number" } }, - destination: { - serializedName: "destination", + kafkaEnabled: { + serializedName: "properties.kafkaEnabled", + type: { + name: "Boolean" + } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + encryption: { + serializedName: "properties.encryption", type: { name: "Composite", - className: "Destination" + className: "Encryption" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectionState: msRest.CompositeMapper = { + serializedName: "ConnectionState", + type: { + name: "Composite", + className: "ConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" } }, - skipEmptyArchives: { - serializedName: "skipEmptyArchives", + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + groupId: { + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesListResult", + type: { + name: "Composite", + className: "PrivateLinkResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterQuotaConfigurationProperties: msRest.CompositeMapper = { + serializedName: "ClusterQuotaConfigurationProperties", + type: { + name: "Composite", + className: "ClusterQuotaConfigurationProperties", + modelProperties: { + settings: { + serializedName: "settings", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VirtualNetworkRule: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRule", + type: { + name: "Composite", + className: "VirtualNetworkRule", + modelProperties: { + ...Resource.type.modelProperties, + virtualNetworkSubnetId: { + serializedName: "properties.virtualNetworkSubnetId", + type: { + name: "String" + } + } + } + } +}; + +export const Subnet: msRest.CompositeMapper = { + serializedName: "Subnet", + type: { + name: "Composite", + className: "Subnet", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const NWRuleSetIpRules: msRest.CompositeMapper = { + serializedName: "NWRuleSetIpRules", + type: { + name: "Composite", + className: "NWRuleSetIpRules", + modelProperties: { + ipMask: { + serializedName: "ipMask", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + } + } + } +}; + +export const NWRuleSetVirtualNetworkRules: msRest.CompositeMapper = { + serializedName: "NWRuleSetVirtualNetworkRules", + type: { + name: "Composite", + className: "NWRuleSetVirtualNetworkRules", + modelProperties: { + subnet: { + serializedName: "subnet", + type: { + name: "Composite", + className: "Subnet" + } + }, + ignoreMissingVnetServiceEndpoint: { + serializedName: "ignoreMissingVnetServiceEndpoint", type: { name: "Boolean" } @@ -381,108 +756,154 @@ export const CaptureDescription: msRest.CompositeMapper = { } }; -export const Eventhub: msRest.CompositeMapper = { - serializedName: "Eventhub", +export const NetworkRuleSet: msRest.CompositeMapper = { + serializedName: "NetworkRuleSet", type: { name: "Composite", - className: "Eventhub", + className: "NetworkRuleSet", modelProperties: { ...Resource.type.modelProperties, - partitionIds: { + trustedServiceAccessEnabled: { + serializedName: "properties.trustedServiceAccessEnabled", + type: { + name: "Boolean" + } + }, + defaultAction: { + serializedName: "properties.defaultAction", + type: { + name: "String" + } + }, + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NWRuleSetVirtualNetworkRules" + } + } + } + }, + ipRules: { + serializedName: "properties.ipRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NWRuleSetIpRules" + } + } + } + } + } + } +}; + +export const AuthorizationRule: msRest.CompositeMapper = { + serializedName: "AuthorizationRule", + type: { + name: "Composite", + className: "AuthorizationRule", + modelProperties: { + ...Resource.type.modelProperties, + rights: { + required: true, + serializedName: "properties.rights", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AccessKeys: msRest.CompositeMapper = { + serializedName: "AccessKeys", + type: { + name: "Composite", + className: "AccessKeys", + modelProperties: { + primaryConnectionString: { readOnly: true, - serializedName: "properties.partitionIds", + serializedName: "primaryConnectionString", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - createdAt: { + secondaryConnectionString: { readOnly: true, - serializedName: "properties.createdAt", + serializedName: "secondaryConnectionString", type: { - name: "DateTime" + name: "String" } }, - updatedAt: { + aliasPrimaryConnectionString: { readOnly: true, - serializedName: "properties.updatedAt", + serializedName: "aliasPrimaryConnectionString", type: { - name: "DateTime" + name: "String" } }, - messageRetentionInDays: { - serializedName: "properties.messageRetentionInDays", - constraints: { - InclusiveMinimum: 1 - }, + aliasSecondaryConnectionString: { + readOnly: true, + serializedName: "aliasSecondaryConnectionString", type: { - name: "Number" + name: "String" } }, - partitionCount: { - serializedName: "properties.partitionCount", - constraints: { - InclusiveMinimum: 1 - }, + primaryKey: { + readOnly: true, + serializedName: "primaryKey", type: { - name: "Number" + name: "String" } }, - status: { - serializedName: "properties.status", + secondaryKey: { + readOnly: true, + serializedName: "secondaryKey", type: { - name: "Enum", - allowedValues: [ - "Active", - "Disabled", - "Restoring", - "SendDisabled", - "ReceiveDisabled", - "Creating", - "Deleting", - "Renaming", - "Unknown" - ] + name: "String" } }, - captureDescription: { - serializedName: "properties.captureDescription", + keyName: { + readOnly: true, + serializedName: "keyName", type: { - name: "Composite", - className: "CaptureDescription" + name: "String" } } } } }; -export const ConsumerGroup: msRest.CompositeMapper = { - serializedName: "ConsumerGroup", +export const RegenerateAccessKeyParameters: msRest.CompositeMapper = { + serializedName: "RegenerateAccessKeyParameters", type: { name: "Composite", - className: "ConsumerGroup", + className: "RegenerateAccessKeyParameters", modelProperties: { - ...Resource.type.modelProperties, - createdAt: { - readOnly: true, - serializedName: "properties.createdAt", - type: { - name: "DateTime" - } - }, - updatedAt: { - readOnly: true, - serializedName: "properties.updatedAt", + keyType: { + required: true, + serializedName: "keyType", type: { - name: "DateTime" + name: "Enum", + allowedValues: [ + "PrimaryKey", + "SecondaryKey" + ] } }, - userMetadata: { - serializedName: "properties.userMetadata", + key: { + serializedName: "key", type: { name: "String" } @@ -545,6 +966,91 @@ export const CheckNameAvailabilityResult: msRest.CompositeMapper = { } }; +export const ConsumerGroup: msRest.CompositeMapper = { + serializedName: "ConsumerGroup", + type: { + name: "Composite", + className: "ConsumerGroup", + modelProperties: { + ...Resource.type.modelProperties, + createdAt: { + readOnly: true, + serializedName: "properties.createdAt", + type: { + name: "DateTime" + } + }, + updatedAt: { + readOnly: true, + serializedName: "properties.updatedAt", + type: { + name: "DateTime" + } + }, + userMetadata: { + serializedName: "properties.userMetadata", + type: { + name: "String" + } + } + } + } +}; + +export const ArmDisasterRecovery: msRest.CompositeMapper = { + serializedName: "ArmDisasterRecovery", + type: { + name: "Composite", + className: "ArmDisasterRecovery", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "Enum", + allowedValues: [ + "Accepted", + "Succeeded", + "Failed" + ] + } + }, + partnerNamespace: { + serializedName: "properties.partnerNamespace", + type: { + name: "String" + } + }, + alternateName: { + serializedName: "properties.alternateName", + type: { + name: "String" + } + }, + role: { + readOnly: true, + serializedName: "properties.role", + type: { + name: "Enum", + allowedValues: [ + "Primary", + "PrimaryNotReplicating", + "Secondary" + ] + } + }, + pendingReplicationOperationsCount: { + readOnly: true, + serializedName: "properties.pendingReplicationOperationsCount", + type: { + name: "Number" + } + } + } + } +}; + export const OperationDisplay: msRest.CompositeMapper = { serializedName: "Operation_display", type: { @@ -600,76 +1106,172 @@ export const Operation: msRest.CompositeMapper = { } }; -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", +export const Destination: msRest.CompositeMapper = { + serializedName: "Destination", type: { name: "Composite", - className: "ErrorResponse", + className: "Destination", modelProperties: { - code: { - serializedName: "code", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + storageAccountResourceId: { + serializedName: "properties.storageAccountResourceId", + type: { + name: "String" + } + }, + blobContainer: { + serializedName: "properties.blobContainer", + type: { + name: "String" + } + }, + archiveNameFormat: { + serializedName: "properties.archiveNameFormat", + type: { + name: "String" + } + } + } + } +}; + +export const CaptureDescription: msRest.CompositeMapper = { + serializedName: "CaptureDescription", + type: { + name: "Composite", + className: "CaptureDescription", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + encoding: { + serializedName: "encoding", + type: { + name: "Enum", + allowedValues: [ + "Avro", + "AvroDeflate" + ] + } + }, + intervalInSeconds: { + serializedName: "intervalInSeconds", + constraints: { + InclusiveMaximum: 900, + InclusiveMinimum: 60 + }, + type: { + name: "Number" + } + }, + sizeLimitInBytes: { + serializedName: "sizeLimitInBytes", + constraints: { + InclusiveMaximum: 524288000, + InclusiveMinimum: 10485760 + }, + type: { + name: "Number" + } + }, + destination: { + serializedName: "destination", type: { - name: "String" + name: "Composite", + className: "Destination" } }, - message: { - serializedName: "message", + skipEmptyArchives: { + serializedName: "skipEmptyArchives", type: { - name: "String" + name: "Boolean" } } } } }; -export const ArmDisasterRecovery: msRest.CompositeMapper = { - serializedName: "ArmDisasterRecovery", +export const Eventhub: msRest.CompositeMapper = { + serializedName: "Eventhub", type: { name: "Composite", - className: "ArmDisasterRecovery", + className: "Eventhub", modelProperties: { ...Resource.type.modelProperties, - provisioningState: { + partitionIds: { readOnly: true, - serializedName: "properties.provisioningState", + serializedName: "properties.partitionIds", type: { - name: "Enum", - allowedValues: [ - "Accepted", - "Succeeded", - "Failed" - ] + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - partnerNamespace: { - serializedName: "properties.partnerNamespace", + createdAt: { + readOnly: true, + serializedName: "properties.createdAt", type: { - name: "String" + name: "DateTime" } }, - alternateName: { - serializedName: "properties.alternateName", + updatedAt: { + readOnly: true, + serializedName: "properties.updatedAt", type: { - name: "String" + name: "DateTime" } }, - role: { - readOnly: true, - serializedName: "properties.role", + messageRetentionInDays: { + serializedName: "properties.messageRetentionInDays", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + partitionCount: { + serializedName: "properties.partitionCount", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + status: { + serializedName: "properties.status", type: { name: "Enum", allowedValues: [ - "Primary", - "PrimaryNotReplicating", - "Secondary" + "Active", + "Disabled", + "Restoring", + "SendDisabled", + "ReceiveDisabled", + "Creating", + "Deleting", + "Renaming", + "Unknown" ] } }, - pendingReplicationOperationsCount: { - readOnly: true, - serializedName: "properties.pendingReplicationOperationsCount", + captureDescription: { + serializedName: "properties.captureDescription", type: { - name: "Number" + name: "Composite", + className: "CaptureDescription" } } } @@ -718,54 +1320,26 @@ export const MessagingRegions: msRest.CompositeMapper = { } }; -export const MessagingPlan: msRest.CompositeMapper = { - serializedName: "MessagingPlan", +export const ClusterListResult: msRest.CompositeMapper = { + serializedName: "ClusterListResult", type: { name: "Composite", - className: "MessagingPlan", + className: "ClusterListResult", modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - readOnly: true, - serializedName: "properties.sku", - type: { - name: "Number" - } - }, - selectedEventHubUnit: { - readOnly: true, - serializedName: "properties.selectedEventHubUnit", - type: { - name: "Number" - } - }, - updatedAt: { - readOnly: true, - serializedName: "properties.updatedAt", + value: { + serializedName: "", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Cluster" + } + } } }, - revision: { - readOnly: true, - serializedName: "properties.revision", - type: { - name: "Number" - } - } - } - } -}; - -export const Subnet: msRest.CompositeMapper = { - serializedName: "Subnet", - type: { - name: "Composite", - className: "Subnet", - modelProperties: { - id: { - required: true, - serializedName: "id", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -774,21 +1348,26 @@ export const Subnet: msRest.CompositeMapper = { } }; -export const NWRuleSetIpRules: msRest.CompositeMapper = { - serializedName: "NWRuleSetIpRules", +export const IpFilterRuleListResult: msRest.CompositeMapper = { + serializedName: "IpFilterRuleListResult", type: { name: "Composite", - className: "NWRuleSetIpRules", + className: "IpFilterRuleListResult", modelProperties: { - ipMask: { - serializedName: "ipMask", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpFilterRule" + } + } } }, - action: { - serializedName: "action", - defaultValue: 'Allow', + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -797,91 +1376,53 @@ export const NWRuleSetIpRules: msRest.CompositeMapper = { } }; -export const NWRuleSetVirtualNetworkRules: msRest.CompositeMapper = { - serializedName: "NWRuleSetVirtualNetworkRules", - type: { - name: "Composite", - className: "NWRuleSetVirtualNetworkRules", - modelProperties: { - subnet: { - serializedName: "subnet", - type: { - name: "Composite", - className: "Subnet" - } - }, - ignoreMissingVnetServiceEndpoint: { - serializedName: "ignoreMissingVnetServiceEndpoint", - type: { - name: "Boolean" - } - } - } - } -}; - -export const NetworkRuleSet: msRest.CompositeMapper = { - serializedName: "NetworkRuleSet", +export const EHNamespaceListResult: msRest.CompositeMapper = { + serializedName: "EHNamespaceListResult", type: { name: "Composite", - className: "NetworkRuleSet", + className: "EHNamespaceListResult", modelProperties: { - ...Resource.type.modelProperties, - defaultAction: { - serializedName: "properties.defaultAction", - type: { - name: "String" - } - }, - virtualNetworkRules: { - serializedName: "properties.virtualNetworkRules", + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "NWRuleSetVirtualNetworkRules" + className: "EHNamespace" } } } }, - ipRules: { - serializedName: "properties.ipRules", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NWRuleSetIpRules" - } - } + name: "String" } } } } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const VirtualNetworkRuleListResult: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRuleListResult", type: { name: "Composite", - className: "OperationListResult", + className: "VirtualNetworkRuleListResult", modelProperties: { value: { - readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "VirtualNetworkRule" } } } }, nextLink: { - readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -891,11 +1432,11 @@ export const OperationListResult: msRest.CompositeMapper = { } }; -export const EHNamespaceListResult: msRest.CompositeMapper = { - serializedName: "EHNamespaceListResult", +export const AuthorizationRuleListResult: msRest.CompositeMapper = { + serializedName: "AuthorizationRuleListResult", type: { name: "Composite", - className: "EHNamespaceListResult", + className: "AuthorizationRuleListResult", modelProperties: { value: { serializedName: "", @@ -904,7 +1445,7 @@ export const EHNamespaceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EHNamespace" + className: "AuthorizationRule" } } } @@ -919,11 +1460,11 @@ export const EHNamespaceListResult: msRest.CompositeMapper = { } }; -export const AuthorizationRuleListResult: msRest.CompositeMapper = { - serializedName: "AuthorizationRuleListResult", +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", type: { name: "Composite", - className: "AuthorizationRuleListResult", + className: "PrivateEndpointConnectionListResult", modelProperties: { value: { serializedName: "", @@ -932,7 +1473,7 @@ export const AuthorizationRuleListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AuthorizationRule" + className: "PrivateEndpointConnection" } } } @@ -1032,6 +1573,36 @@ export const ConsumerGroupListResult: msRest.CompositeMapper = { } }; +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const MessagingRegionsListResult: msRest.CompositeMapper = { serializedName: "MessagingRegionsListResult", type: { diff --git a/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts b/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts index 9d58d74dc72c..7028056dbdea 100644 --- a/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -15,21 +15,32 @@ export { CaptureDescription, CheckNameAvailabilityParameter, CheckNameAvailabilityResult, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, EHNamespaceListResult, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, + Identity, + IpFilterRule, + IpFilterRuleListResult, + KeyVaultProperties, MessagingRegions, MessagingRegionsProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, RegenerateAccessKeyParameters, Resource, Sku, Subnet, - TrackedResource + TrackedResource, + VirtualNetworkRule, + VirtualNetworkRuleListResult } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts index b8de8606cf9d..3e8e33c6f2bd 100644 --- a/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/eventhub/arm-eventhub/src/models/parameters.ts b/sdk/eventhub/arm-eventhub/src/models/parameters.ts index f3cc023b3e66..4633fb81222a 100644 --- a/sdk/eventhub/arm-eventhub/src/models/parameters.ts +++ b/sdk/eventhub/arm-eventhub/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -57,6 +56,20 @@ export const authorizationRuleName: msRest.OperationURLParameter = { } } }; +export const clusterName: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + constraints: { + MaxLength: 50, + MinLength: 6 + }, + type: { + name: "String" + } + } +}; export const consumerGroupName: msRest.OperationURLParameter = { parameterPath: "consumerGroupName", mapper: { @@ -76,6 +89,20 @@ export const eventHubName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "eventHubName", + constraints: { + MaxLength: 256, + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const ipFilterRuleName: msRest.OperationURLParameter = { + parameterPath: "ipFilterRuleName", + mapper: { + required: true, + serializedName: "ipFilterRuleName", constraints: { MinLength: 1 }, @@ -109,6 +136,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -179,3 +216,16 @@ export const top: msRest.OperationQueryParameter = { } } }; +export const virtualNetworkRuleName: msRest.OperationURLParameter = { + parameterPath: "virtualNetworkRuleName", + mapper: { + required: true, + serializedName: "virtualNetworkRuleName", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; diff --git a/sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..e5cf5c93bc9e --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ArmDisasterRecovery, + AuthorizationRule, + BaseResource, + CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, + ConsumerGroup, + Destination, + EHNamespace, + Encryption, + ErrorResponse, + Eventhub, + Identity, + IpFilterRule, + KeyVaultProperties, + MessagingRegions, + MessagingRegionsProperties, + NetworkRuleSet, + NWRuleSetIpRules, + NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + Resource, + Sku, + Subnet, + TrackedResource, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts b/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..be5115bf1832 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorResponse, + PrivateLinkResource, + PrivateLinkResourcesListResult +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts index c1fafeae471f..a1f6d31284e2 100644 --- a/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,20 +11,29 @@ export { AuthorizationRule, BaseResource, CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, + Identity, + IpFilterRule, + KeyVaultProperties, MessagingRegions, MessagingRegionsListResult, MessagingRegionsProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, Resource, Sku, Subnet, - TrackedResource + TrackedResource, + VirtualNetworkRule } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts new file mode 100644 index 000000000000..079bf59deea6 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts @@ -0,0 +1,488 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/clustersMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a Clusters. */ +export class Clusters { + private readonly client: EventHubManagementClientContext; + + /** + * Create a Clusters. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * @param [options] The optional parameters + * @returns Promise + */ + listAvailableClusterRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listAvailableClusterRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listAvailableClusterRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAvailableClusterRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listAvailableClusterRegionOperationSpec, + callback) as Promise; + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets the resource description of the specified Event Hubs Cluster. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an instance of an Event Hubs Cluster. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,clusterName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters The properties of the Event Hubs Cluster which should be updated. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,clusterName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes an existing Event Hubs Cluster. This operation is idempotent. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + listNamespaces(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param callback The callback + */ + listNamespaces(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param options The optional parameters + * @param callback The callback + */ + listNamespaces(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNamespaces(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + listNamespacesOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an instance of an Event Hubs Cluster. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating a eventhub cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters The properties of the Event Hubs Cluster which should be updated. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes an existing Event Hubs Cluster. This operation is idempotent. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listAvailableClusterRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableClustersList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNamespacesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EHNamespaceIdListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/configuration.ts b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts new file mode 100644 index 000000000000..b72580d1d44c --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts @@ -0,0 +1,160 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/configurationMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a Configuration. */ +export class Configuration { + private readonly client: EventHubManagementClientContext; + + /** + * Create a Configuration. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * Replace all specified Event Hubs Cluster settings with those contained in the request body. + * Leaves the settings not specified in the request body unmodified. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating an Event Hubs Cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating an Event Hubs Cluster resource. + * @param callback The callback + */ + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating an Event Hubs Cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + patchOperationSpec, + callback) as Promise; + } + + /** + * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas + * and settings imposed on the cluster. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const patchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ClusterQuotaConfigurationProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ClusterQuotaConfigurationProperties + }, + 201: { + bodyMapper: Mappers.ClusterQuotaConfigurationProperties + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterQuotaConfigurationProperties + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts index fe20df49c3b8..9f956fc6add8 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -194,7 +193,7 @@ export class ConsumerGroups { * @param [options] The optional parameters * @returns Promise */ - listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByEventHubNext(nextPageLink: string, options?: Models.ConsumerGroupsListByEventHubNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -205,8 +204,8 @@ export class ConsumerGroups { * @param options The optional parameters * @param callback The callback */ - listByEventHubNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByEventHubNext(nextPageLink: string, options: Models.ConsumerGroupsListByEventHubNextOptionalParams, callback: msRest.ServiceCallback): void; + listByEventHubNext(nextPageLink: string, options?: Models.ConsumerGroupsListByEventHubNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -341,6 +340,11 @@ const listByEventHubNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 1e51ac33ae15..2ca08a202166 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,238 +26,245 @@ export class DisasterRecoveryConfigs { } /** - * Check the give Namespace name availability. + * 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 parameters Parameters to check availability of the given Alias name + * @param alias The Disaster Recovery configuration name * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise; + listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters to check availability of the given Alias name + * @param alias The Disaster Recovery configuration name * @param callback The callback */ - checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void; + listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param parameters Parameters to check availability of the given Alias name + * @param alias The Disaster Recovery configuration name * @param options The optional parameters * @param callback The callback */ - checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, - parameters, + alias, options }, - checkNameAvailabilityOperationSpec, - callback) as Promise; + listAuthorizationRulesOperationSpec, + callback) as Promise; } /** - * Gets all Alias(Disaster Recovery configurations) + * 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 optional parameters - * @returns Promise + * @returns Promise */ - list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** * @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 callback The callback */ - list(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; /** * @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 optional parameters * @param callback The callback */ - list(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, + alias, + authorizationRuleName, options }, - listOperationSpec, - callback) as Promise; + getAuthorizationRuleOperationSpec, + callback) as Promise; } /** - * Creates or updates a new Alias(Disaster Recovery configuration) + * 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 parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @param authorizationRuleName The authorization rule name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options?: msRest.RequestOptionsBase): Promise; + listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name - * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @param authorizationRuleName The authorization rule name. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name - * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) + * @param authorizationRuleName The authorization rule name. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, alias, - parameters, + authorizationRuleName, options }, - createOrUpdateOperationSpec, - callback) as Promise; + listKeysOperationSpec, + callback) as Promise; } /** - * Deletes an Alias(Disaster Recovery configuration) + * Check the give Namespace name availability. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name + * @param parameters Parameters to check availability of the given Alias name * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; + checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name + * @param parameters Parameters to check availability of the given Alias name * @param callback The callback */ - deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; + checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name + * @param parameters Parameters to check availability of the given Alias name * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(resourceGroupName: string, namespaceName: string, parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, - alias, + parameters, options }, - deleteMethodOperationSpec, - callback); + checkNameAvailabilityOperationSpec, + callback) as Promise; } /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary 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 optional parameters - * @returns Promise + * @returns Promise */ - get(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param alias The Disaster Recovery configuration name * @param callback The callback */ - get(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; /** * @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 optional parameters * @param callback The callback */ - get(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, - alias, options }, - getOperationSpec, - callback) as Promise; + listOperationSpec, + callback) as Promise; } /** - * This operation disables the Disaster Recovery and stops replicating changes from primary to - * secondary namespaces + * Creates or updates a new Alias(Disaster Recovery configuration) * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) * @param callback The callback */ - breakPairing(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name + * @param parameters Parameters required to create an Alias(Disaster Recovery configuration) * @param options The optional parameters * @param callback The callback */ - breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, namespaceName: string, alias: string, parameters: Models.ArmDisasterRecovery, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, alias, + parameters, options }, - breakPairingOperationSpec, - callback); + createOrUpdateOperationSpec, + callback) as Promise; } /** - * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + * Deletes an Alias(Disaster Recovery configuration) * @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 optional parameters * @returns Promise */ - failOver(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name * @param callback The callback */ - failOver(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name @@ -266,8 +272,8 @@ export class DisasterRecoveryConfigs { * @param options The optional parameters * @param callback The callback */ - failOver(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - failOver(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -275,26 +281,26 @@ export class DisasterRecoveryConfigs { alias, options }, - failOverOperationSpec, + deleteMethodOperationSpec, callback); } /** - * Gets a list of authorization rules for a Namespace. + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary 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 optional parameters - * @returns Promise + * @returns Promise */ - listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param alias The Disaster Recovery configuration name * @param callback The callback */ - listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name @@ -302,8 +308,8 @@ export class DisasterRecoveryConfigs { * @param options The optional parameters * @param callback The callback */ - listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAuthorizationRules(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -311,156 +317,150 @@ export class DisasterRecoveryConfigs { alias, options }, - listAuthorizationRulesOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * This operation disables the Disaster Recovery and stops replicating changes from primary to + * secondary namespaces * @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 optional parameters - * @returns Promise + * @returns Promise */ - getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; + breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; /** * @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 callback The callback */ - getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; + breakPairing(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; /** * @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 optional parameters * @param callback The callback */ - getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAuthorizationRule(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + breakPairing(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, alias, - authorizationRuleName, options }, - getAuthorizationRuleOperationSpec, - callback) as Promise; + breakPairingOperationSpec, + callback); } /** - * Gets the primary and secondary connection strings for the Namespace. + * Invokes GEO DR failover and reconfigure the alias to point to the secondary 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 optional parameters - * @returns Promise + * @returns Promise */ - listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; + failOver(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase): Promise; /** * @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 callback The callback */ - listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; + failOver(resourceGroupName: string, namespaceName: string, alias: string, callback: msRest.ServiceCallback): void; /** * @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 optional parameters * @param callback The callback */ - listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeys(resourceGroupName: string, namespaceName: string, alias: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + failOver(resourceGroupName: string, namespaceName: string, alias: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + failOver(resourceGroupName: string, namespaceName: string, alias: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, alias, - authorizationRuleName, options }, - listKeysOperationSpec, - callback) as Promise; + failOverOperationSpec, + callback); } /** - * Gets all Alias(Disaster Recovery configurations) + * Gets a list of authorization rules for a Namespace. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listAuthorizationRulesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAuthorizationRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listAuthorizationRulesNextOperationSpec, + callback) as Promise; } /** - * Gets a list of authorization rules for a Namespace. + * Gets all Alias(Disaster Recovery configurations) * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listAuthorizationRulesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listAuthorizationRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listAuthorizationRulesNextOperationSpec, - callback) as Promise; + listNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", +const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules", urlParameters: [ - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName + Parameters.namespaceName, + Parameters.alias, + Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion @@ -468,16 +468,9 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CheckNameAvailabilityParameter, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -486,12 +479,14 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { +const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.alias, + Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -502,7 +497,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecoveryListResult + bodyMapper: Mappers.AuthorizationRule }, default: { bodyMapper: Mappers.ErrorResponse @@ -511,13 +506,14 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.alias, + Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -526,18 +522,10 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ArmDisasterRecovery, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecovery + bodyMapper: Mappers.AccessKeys }, - 201: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -545,14 +533,13 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", urlParameters: [ + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.namespaceName, - Parameters.alias, - Parameters.subscriptionId + Parameters.namespaceName ], queryParameters: [ Parameters.apiVersion @@ -560,8 +547,17 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CheckNameAvailabilityParameter, + required: true + } + }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResult + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -569,13 +565,12 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.alias, Parameters.subscriptionId ], queryParameters: [ @@ -586,7 +581,7 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecovery + bodyMapper: Mappers.ArmDisasterRecoveryListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -595,9 +590,9 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const breakPairingOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -610,8 +605,18 @@ const breakPairingOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ArmDisasterRecovery, + required: true + } + }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.ArmDisasterRecovery + }, + 201: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -619,9 +624,9 @@ const breakPairingOperationSpec: msRest.OperationSpec = { serializer }; -const failOverOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -643,9 +648,9 @@ const failOverOperationSpec: msRest.OperationSpec = { serializer }; -const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -660,7 +665,7 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.ArmDisasterRecovery }, default: { bodyMapper: Mappers.ErrorResponse @@ -669,14 +674,13 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { serializer }; -const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}", +const breakPairingOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.alias, - Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -686,9 +690,7 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.AuthorizationRule - }, + 200: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -696,14 +698,13 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { serializer }; -const listKeysOperationSpec: msRest.OperationSpec = { +const failOverOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.alias, - Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -713,9 +714,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.AccessKeys - }, + 200: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -723,19 +722,22 @@ const listKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecoveryListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -744,19 +746,22 @@ const listNextOperationSpec: msRest.OperationSpec = { serializer }; -const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.ArmDisasterRecoveryListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts index ffd4672511f1..7dbc79f9308e 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,216 +26,240 @@ export class 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 optional parameters - * @returns Promise + * @returns Promise */ - listByNamespace(resourceGroupName: string, namespaceName: string, options?: Models.EventHubsListByNamespaceOptionalParams): Promise; + listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param eventHubName The Event Hub name * @param callback The callback */ - listByNamespace(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void; /** * @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 optional parameters * @param callback The callback */ - listByNamespace(resourceGroupName: string, namespaceName: string, options: Models.EventHubsListByNamespaceOptionalParams, callback: msRest.ServiceCallback): void; - listByNamespace(resourceGroupName: string, namespaceName: string, options?: Models.EventHubsListByNamespaceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, + eventHubName, options }, - listByNamespaceOperationSpec, - callback) as Promise; + listAuthorizationRulesOperationSpec, + callback) as Promise; } /** - * Creates or updates a new Event Hub as a nested resource within a Namespace. + * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the + * AuthorizationRule will take a few seconds to take effect. * @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 authorizationRuleName The authorization rule name. + * @param parameters The shared access AuthorizationRule. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options?: msRest.RequestOptionsBase): Promise; + createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options?: msRest.RequestOptionsBase): Promise; /** * @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 authorizationRuleName The authorization rule name. + * @param parameters The shared access AuthorizationRule. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, callback: msRest.ServiceCallback): void; + createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, callback: msRest.ServiceCallback): void; /** * @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 authorizationRuleName The authorization rule name. + * @param parameters The shared access AuthorizationRule. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, parameters, options }, - createOrUpdateOperationSpec, - callback) as Promise; + createOrUpdateAuthorizationRuleOperationSpec, + callback) as Promise; } /** - * Deletes an Event Hub from the specified Namespace and resource group. + * Gets an AuthorizationRule for an Event Hub by rule name. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise; + getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param callback The callback */ - deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void; + getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, options }, - deleteMethodOperationSpec, - callback); + getAuthorizationRuleOperationSpec, + callback) as Promise; } /** - * Gets an Event Hubs description for the specified Event Hub. + * Deletes an Event Hub AuthorizationRule. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise; + deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param callback The callback */ - get(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void; + deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, options }, - getOperationSpec, - callback) as Promise; + deleteAuthorizationRuleOperationSpec, + callback); } /** - * Gets the authorization rules for an Event Hub. + * Gets the ACS and SAS connection strings for the 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 authorizationRuleName The authorization rule name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise; + listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param callback The callback */ - listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name + * @param authorizationRuleName The authorization rule name. * @param options The optional parameters * @param callback The callback */ - listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAuthorizationRules(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, options }, - listAuthorizationRulesOperationSpec, - callback) as Promise; + listKeysOperationSpec, + callback) as Promise; } /** - * Creates or updates an AuthorizationRule for the specified Event Hub. + * Regenerates the ACS and SAS connection strings for the 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 authorizationRuleName The authorization rule name. - * @param parameters The shared access AuthorizationRule. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys + * (PrimaryKey/SecondaryKey). * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options?: msRest.RequestOptionsBase): Promise; + regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. - * @param parameters The shared access AuthorizationRule. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys + * (PrimaryKey/SecondaryKey). * @param callback The callback */ - createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. - * @param parameters The shared access AuthorizationRule. + * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys + * (PrimaryKey/SecondaryKey). * @param options The optional parameters * @param callback The callback */ - createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.AuthorizationRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -246,255 +269,231 @@ export class EventHubs { parameters, options }, - createOrUpdateAuthorizationRuleOperationSpec, - callback) as Promise; + regenerateKeysOperationSpec, + callback) as Promise; } /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * 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 authorizationRuleName The authorization rule name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; + listByNamespace(resourceGroupName: string, namespaceName: string, options?: Models.EventHubsListByNamespaceOptionalParams): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. * @param callback The callback */ - getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; + listByNamespace(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name - * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. * @param options The optional parameters * @param callback The callback */ - getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByNamespace(resourceGroupName: string, namespaceName: string, options: Models.EventHubsListByNamespaceOptionalParams, callback: msRest.ServiceCallback): void; + listByNamespace(resourceGroupName: string, namespaceName: string, options?: Models.EventHubsListByNamespaceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, - eventHubName, - authorizationRuleName, options }, - getAuthorizationRuleOperationSpec, - callback) as Promise; + listByNamespaceOperationSpec, + callback) as Promise; } /** - * Deletes an Event Hub AuthorizationRule. + * 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 authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to create an Event Hub resource. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to create an Event Hub resource. * @param callback The callback */ - deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. + * @param parameters Parameters supplied to create an Event Hub resource. * @param options The optional parameters * @param callback The callback */ - deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteAuthorizationRule(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, namespaceName: string, eventHubName: string, parameters: Models.Eventhub, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, - authorizationRuleName, + parameters, options }, - deleteAuthorizationRuleOperationSpec, - callback); + createOrUpdateOperationSpec, + callback) as Promise; } /** - * Gets the ACS and SAS connection strings for the Event Hub. + * 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 authorizationRuleName The authorization rule name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. * @param callback The callback */ - listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. * @param options The optional parameters * @param callback The callback */ - listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, - authorizationRuleName, options }, - listKeysOperationSpec, - callback) as Promise; + deleteMethodOperationSpec, + callback); } /** - * Regenerates the ACS and SAS connection strings for the Event Hub. + * 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 authorizationRuleName The authorization rule name. - * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys - * (PrimaryKey/SecondaryKey). * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. - * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys - * (PrimaryKey/SecondaryKey). * @param callback The callback */ - regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, eventHubName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name - * @param authorizationRuleName The authorization rule name. - * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys - * (PrimaryKey/SecondaryKey). * @param options The optional parameters * @param callback The callback */ - regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - regenerateKeys(resourceGroupName: string, namespaceName: string, eventHubName: string, authorizationRuleName: string, parameters: Models.RegenerateAccessKeyParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, namespaceName: string, eventHubName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, eventHubName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, eventHubName, - authorizationRuleName, - parameters, options }, - regenerateKeysOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * Gets all the Event Hubs in a Namespace. + * Gets the authorization rules for an Event Hub. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByNamespaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listAuthorizationRulesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByNamespaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAuthorizationRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listByNamespaceNextOperationSpec, - callback) as Promise; + listAuthorizationRulesNextOperationSpec, + callback) as Promise; } /** - * Gets the authorization rules for an Event Hub. + * Gets all the Event Hubs in a Namespace. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByNamespaceNext(nextPageLink: string, options?: Models.EventHubsListByNamespaceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listAuthorizationRulesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByNamespaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listAuthorizationRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAuthorizationRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByNamespaceNext(nextPageLink: string, options: Models.EventHubsListByNamespaceNextOptionalParams, callback: msRest.ServiceCallback): void; + listByNamespaceNext(nextPageLink: string, options?: Models.EventHubsListByNamespaceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listAuthorizationRulesNextOperationSpec, - callback) as Promise; + listByNamespaceNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listByNamespaceOperationSpec: msRest.OperationSpec = { +const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.eventHubName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion, - Parameters.skip, - Parameters.top + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.EventHubListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -503,13 +502,14 @@ const listByNamespaceOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, + Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -521,13 +521,13 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.Eventhub, + ...Mappers.AuthorizationRule, required: true } }, responses: { 200: { - bodyMapper: Mappers.Eventhub + bodyMapper: Mappers.AuthorizationRule }, default: { bodyMapper: Mappers.ErrorResponse @@ -536,13 +536,14 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", +const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, + Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -552,8 +553,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.AuthorizationRule + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -561,13 +563,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", +const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, + Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -577,9 +580,8 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.Eventhub - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -587,13 +589,14 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules", +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, + Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -604,7 +607,7 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.AccessKeys }, default: { bodyMapper: Mappers.ErrorResponse @@ -613,9 +616,9 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", +const regenerateKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -632,13 +635,13 @@ const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.AuthorizationRule, + ...Mappers.RegenerateAccessKeyParameters, required: true } }, responses: { 200: { - bodyMapper: Mappers.AuthorizationRule + bodyMapper: Mappers.AccessKeys }, default: { bodyMapper: Mappers.ErrorResponse @@ -647,25 +650,25 @@ const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { serializer }; -const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { +const listByNamespaceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, - Parameters.eventHubName, - Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skip, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRule + bodyMapper: Mappers.EventHubListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -674,14 +677,13 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { serializer }; -const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, - Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -690,9 +692,17 @@ const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Eventhub, + required: true + } + }, responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.Eventhub + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -700,14 +710,13 @@ const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { serializer }; -const listKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/ListKeys", +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, - Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -717,9 +726,8 @@ const listKeysOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.AccessKeys - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -727,14 +735,13 @@ const listKeysOperationSpec: msRest.OperationSpec = { serializer }; -const regenerateKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, Parameters.eventHubName, - Parameters.authorizationRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -743,16 +750,9 @@ const regenerateKeysOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RegenerateAccessKeyParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.AccessKeys + bodyMapper: Mappers.Eventhub }, default: { bodyMapper: Mappers.ErrorResponse @@ -761,19 +761,22 @@ const regenerateKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listByNamespaceNextOperationSpec: msRest.OperationSpec = { +const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.EventHubListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -782,19 +785,24 @@ const listByNamespaceNextOperationSpec: msRest.OperationSpec = { serializer }; -const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { +const listByNamespaceNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.EventHubListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/eventhub/arm-eventhub/src/operations/index.ts b/sdk/eventhub/arm-eventhub/src/operations/index.ts index 8c9523f44191..5209f6bd1d2b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/index.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/index.ts @@ -1,16 +1,19 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ -export * from "./operations"; +export * from "./clusters"; export * from "./namespaces"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./configuration"; export * from "./disasterRecoveryConfigs"; export * from "./eventHubs"; export * from "./consumerGroups"; +export * from "./operations"; export * from "./regions"; diff --git a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts index 99a8372ff15f..72a4ada1aa84 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -28,31 +27,147 @@ export class Namespaces { } /** - * Check the give Namespace name availability. - * @param parameters Parameters to check availability of the given Namespace name + * Gets a list of IP Filter rules for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise; + listIPFilterRules(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param parameters Parameters to check availability of the given Namespace name + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name * @param callback The callback */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void; + listIPFilterRules(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; /** - * @param parameters Parameters to check availability of the given Namespace name + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name * @param options The optional parameters * @param callback The callback */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listIPFilterRules(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listIPFilterRules(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + resourceGroupName, + namespaceName, + options + }, + listIPFilterRulesOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an IpFilterRule for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdateIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, parameters: Models.IpFilterRule, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @param callback The callback + */ + createOrUpdateIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, parameters: Models.IpFilterRule, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param parameters The Namespace IpFilterRule. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdateIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, parameters: Models.IpFilterRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, parameters: Models.IpFilterRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + ipFilterRuleName, parameters, options }, - checkNameAvailabilityOperationSpec, - callback) as Promise; + createOrUpdateIpFilterRuleOperationSpec, + callback) as Promise; + } + + /** + * Deletes an IpFilterRule for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param callback The callback + */ + deleteIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param options The optional parameters + * @param callback The callback + */ + deleteIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + ipFilterRuleName, + options + }, + deleteIpFilterRuleOperationSpec, + callback); + } + + /** + * Gets an IpFilterRule for a Namespace by rule name. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param [options] The optional parameters + * @returns Promise + */ + getIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param callback The callback + */ + getIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param ipFilterRuleName The IP Filter Rule name. + * @param options The optional parameters + * @param callback The callback + */ + getIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getIpFilterRule(resourceGroupName: string, namespaceName: string, ipFilterRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + ipFilterRuleName, + options + }, + getIpFilterRuleOperationSpec, + callback) as Promise; } /** @@ -204,35 +319,215 @@ export class Namespaces { } /** - * Gets messaging plan for specified namespace. + * Gets a list of VirtualNetwork rules for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param [options] The optional parameters + * @returns Promise + */ + listVirtualNetworkRules(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param callback The callback + */ + listVirtualNetworkRules(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The optional parameters + * @param callback The callback + */ + listVirtualNetworkRules(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVirtualNetworkRules(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + options + }, + listVirtualNetworkRulesOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an VirtualNetworkRule for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param parameters The Namespace VirtualNetworkRule. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdateVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param parameters The Namespace VirtualNetworkRule. + * @param callback The callback + */ + createOrUpdateVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param parameters The Namespace VirtualNetworkRule. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdateVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, parameters: Models.VirtualNetworkRule, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + virtualNetworkRuleName, + parameters, + options + }, + createOrUpdateVirtualNetworkRuleOperationSpec, + callback) as Promise; + } + + /** + * Deletes an VirtualNetworkRule for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param callback The callback + */ + deleteVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param options The optional parameters + * @param callback The callback + */ + deleteVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + virtualNetworkRuleName, + options + }, + deleteVirtualNetworkRuleOperationSpec, + callback); + } + + /** + * Gets an VirtualNetworkRule for a Namespace by rule name. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param [options] The optional parameters + * @returns Promise + */ + getVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param callback The callback + */ + getVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param virtualNetworkRuleName The Virtual Network Rule name. + * @param options The optional parameters + * @param callback The callback + */ + getVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getVirtualNetworkRule(resourceGroupName: string, namespaceName: string, virtualNetworkRuleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + virtualNetworkRuleName, + options + }, + getVirtualNetworkRuleOperationSpec, + callback) as Promise; + } + + /** + * Create or update NetworkRuleSet for a Namespace. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters The Namespace IpFilterRule. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getMessagingPlan(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters The Namespace IpFilterRule. * @param callback The callback */ - getMessagingPlan(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name + * @param parameters The Namespace IpFilterRule. * @param options The optional parameters * @param callback The callback */ - getMessagingPlan(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getMessagingPlan(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, namespaceName, + parameters, options }, - getMessagingPlanOperationSpec, - callback) as Promise; + createOrUpdateNetworkRuleSetOperationSpec, + callback) as Promise; + } + + /** + * Gets NetworkRuleSet for a Namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param [options] The optional parameters + * @returns Promise + */ + getNetworkRuleSet(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param callback The callback + */ + getNetworkRuleSet(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The optional parameters + * @param callback The callback + */ + getNetworkRuleSet(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getNetworkRuleSet(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + options + }, + getNetworkRuleSetOperationSpec, + callback) as Promise; } /** @@ -456,71 +751,31 @@ export class Namespaces { } /** - * Create or update NetworkRuleSet for a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * Check the give Namespace name availability. + * @param parameters Parameters to check availability of the given Namespace name * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, options?: msRest.RequestOptionsBase): Promise; + checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * @param parameters Parameters to check availability of the given Namespace name * @param callback The callback */ - createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, callback: msRest.ServiceCallback): void; + checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. + * @param parameters Parameters to check availability of the given Namespace name * @param options The optional parameters * @param callback The callback */ - createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateNetworkRuleSet(resourceGroupName: string, namespaceName: string, parameters: Models.NetworkRuleSet, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, - namespaceName, parameters, options }, - createOrUpdateNetworkRuleSetOperationSpec, - callback) as Promise; - } - - /** - * Gets NetworkRuleSet for a Namespace. - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param [options] The optional parameters - * @returns Promise - */ - getNetworkRuleSet(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param callback The callback - */ - getNetworkRuleSet(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param options The optional parameters - * @param callback The callback - */ - getNetworkRuleSet(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getNetworkRuleSet(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - namespaceName, - options - }, - getNetworkRuleSetOperationSpec, - callback) as Promise; + checkNameAvailabilityOperationSpec, + callback) as Promise; } /** @@ -563,6 +818,34 @@ export class Namespaces { options); } + /** + * Gets a list of IP Filter rules for a Namespace. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listIPFilterRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listIPFilterRulesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listIPFilterRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listIPFilterRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listIPFilterRulesNextOperationSpec, + callback) as Promise; + } + /** * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -619,6 +902,34 @@ export class Namespaces { callback) as Promise; } + /** + * Gets a list of VirtualNetwork rules for a Namespace. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listVirtualNetworkRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listVirtualNetworkRulesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listVirtualNetworkRulesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVirtualNetworkRulesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listVirtualNetworkRulesNextOperationSpec, + callback) as Promise; + } + /** * Gets a list of authorization rules for a Namespace. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -648,12 +959,73 @@ export class Namespaces { } } -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNameAvailability", +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listIPFilterRulesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IpFilterRuleListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateIpFilterRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.ipFilterRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.IpFilterRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.IpFilterRule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteIpFilterRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}", urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.ipFilterRuleName, Parameters.subscriptionId ], queryParameters: [ @@ -662,16 +1034,34 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CheckNameAvailabilityParameter, - required: true + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse } }, + serializer +}; + +const getIpFilterRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/ipfilterrules/{ipFilterRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.ipFilterRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult + bodyMapper: Mappers.IpFilterRule }, default: { bodyMapper: Mappers.ErrorResponse @@ -791,9 +1181,150 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const getMessagingPlanOperationSpec: msRest.OperationSpec = { +const listVirtualNetworkRulesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateVirtualNetworkRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.virtualNetworkRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.VirtualNetworkRule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteVirtualNetworkRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.virtualNetworkRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getVirtualNetworkRuleOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.virtualNetworkRuleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateNetworkRuleSetOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.NetworkRuleSet, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.NetworkRuleSet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getNetworkRuleSetOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/messagingplan", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -807,7 +1338,7 @@ const getMessagingPlanOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.MessagingPlan + bodyMapper: Mappers.NetworkRuleSet }, default: { bodyMapper: Mappers.ErrorResponse @@ -818,7 +1349,7 @@ const getMessagingPlanOperationSpec: msRest.OperationSpec = { const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -843,7 +1374,7 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -876,7 +1407,7 @@ const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -901,7 +1432,7 @@ const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -927,7 +1458,7 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -953,7 +1484,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { const regenerateKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -984,12 +1515,10 @@ const regenerateKeysOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateNetworkRuleSetOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability", urlParameters: [ - Parameters.resourceGroupName, - Parameters.namespaceName, Parameters.subscriptionId ], queryParameters: [ @@ -1001,38 +1530,13 @@ const createOrUpdateNetworkRuleSetOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.NetworkRuleSet, + ...Mappers.CheckNameAvailabilityParameter, required: true } }, responses: { 200: { - bodyMapper: Mappers.NetworkRuleSet - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getNetworkRuleSetOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.namespaceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.NetworkRuleSet + bodyMapper: Mappers.CheckNameAvailabilityResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -1102,6 +1606,30 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { serializer }; +const listIPFilterRulesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IpFilterRuleListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -1109,6 +1637,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -1130,6 +1661,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -1144,6 +1678,30 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { serializer }; +const listVirtualNetworkRulesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -1151,6 +1709,9 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/operations.ts b/sdk/eventhub/arm-eventhub/src/operations/operations.ts index 6597c772dd23..04688b62c243 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/operations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..1518d6270332 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts @@ -0,0 +1,341 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: EventHubManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param callback The callback + */ + list(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates PrivateEndpointConnections of service namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to + * namespace resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to + * namespace resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to + * namespace resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + privateEndpointConnectionName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the + * namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,namespaceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a description for the specified Private Endpoint Connection name. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the + * namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + namespaceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts b/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..86327d9ad2ae --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: EventHubManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * Gets lists of resources that supports Privatelinks. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/regions.ts b/sdk/eventhub/arm-eventhub/src/operations/regions.ts index ef0fb7026bd9..f9b4938d0b59 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/regions.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/regions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -116,6 +115,9 @@ const listBySkuNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/tsconfig.json b/sdk/eventhub/arm-eventhub/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true