From f217d5562dbde1d1baae0a40e62671dc6f0e474c Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 10 Sep 2020 07:30:20 +0000 Subject: [PATCH] Generated from f69510cef189b74f05f0a26e815a096faccbc386 --- sdk/eventhub/arm-eventhub/LICENSE.txt | 2 +- sdk/eventhub/arm-eventhub/README.md | 14 +- sdk/eventhub/arm-eventhub/package.json | 20 +- sdk/eventhub/arm-eventhub/rollup.config.js | 2 +- .../src/eventHubManagementClient.ts | 12 +- .../src/eventHubManagementClientContext.ts | 2 - .../src/models/clustersMappers.ts | 43 + .../src/models/configurationMappers.ts | 12 + .../src/models/consumerGroupsMappers.ts | 13 +- .../models/disasterRecoveryConfigsMappers.ts | 13 +- .../src/models/eventHubsMappers.ts | 13 +- sdk/eventhub/arm-eventhub/src/models/index.ts | 1438 +++++++++++++---- .../arm-eventhub/src/models/mappers.ts | 1184 ++++++++++---- .../src/models/namespacesMappers.ts | 15 +- .../arm-eventhub/src/models/parameters.ts | 67 +- .../privateEndpointConnectionsMappers.ts | 39 + .../src/models/privateLinkResourcesMappers.ts | 13 + .../arm-eventhub/src/models/regionsMappers.ts | 13 +- .../arm-eventhub/src/operations/clusters.ts | 486 ++++++ .../src/operations/configuration.ts | 161 ++ .../src/operations/consumerGroups.ts | 8 +- .../src/operations/disasterRecoveryConfigs.ts | 390 ++--- .../arm-eventhub/src/operations/eventHubs.ts | 405 ++--- .../arm-eventhub/src/operations/index.ts | 6 +- .../arm-eventhub/src/operations/namespaces.ts | 813 ++++++++-- .../arm-eventhub/src/operations/operations.ts | 2 +- .../operations/privateEndpointConnections.ts | 339 ++++ .../src/operations/privateLinkResources.ts | 87 + .../arm-eventhub/src/operations/regions.ts | 2 +- sdk/eventhub/arm-eventhub/tsconfig.json | 2 +- 30 files changed, 4420 insertions(+), 1196 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..ea8fb1516028 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) 2020 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 fe5d41679544..4176bef6e92a 100644 --- a/sdk/eventhub/arm-eventhub/README.md +++ b/sdk/eventhub/arm-eventhub/README.md @@ -15,12 +15,13 @@ npm install @azure/arm-eventhub ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - Authentication, client creation and listAvailableClusterRegion clusters as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -34,7 +35,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new EventHubManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { + client.clusters.listAvailableClusterRegion().then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,7 +44,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### 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. ##### Install @azure/ms-rest-browserauth @@ -77,7 +78,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmEventhub.EventHubManagementClient(res.creds, subscriptionId); - client.operations.list().then((result) => { + client.clusters.listAvailableClusterRegion().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Feventhub%2Farm-eventhub%2FREADME.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 ae01a90bb580..5c190d6c8c20 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -4,9 +4,9 @@ "description": "EventHubManagementClient Library with typescript type definitions for node.js and browser.", "version": "3.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/eventHubManagementClient.js", "types": "./esm/eventHubManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "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/master/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..88ae3daf1473 100644 --- a/sdk/eventhub/arm-eventhub/rollup.config.js +++ b/sdk/eventhub/arm-eventhub/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, 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 259d5c8b7d79..ec968474018d 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -17,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; /** @@ -33,11 +37,15 @@ class EventHubManagementClient extends EventHubManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, 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 c88d00f4595d..ff5641da8be9 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts @@ -18,7 +18,6 @@ const packageVersion = "3.2.0"; export class EventHubManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; - apiVersion?: string; /** * Initializes a new instance of the EventHubManagementClient class. @@ -45,7 +44,6 @@ export class EventHubManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2017-04-01'; 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..a138da49a8e4 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + 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..f2625eb8d09b --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + 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..44028694be75 100644 --- a/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts @@ -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..850555f5fd49 100644 --- a/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts @@ -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..b7acf36d407a 100644 --- a/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts @@ -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..00cf905c4815 100644 --- a/sdk/eventhub/arm-eventhub/src/models/index.ts +++ b/sdk/eventhub/arm-eventhub/src/models/index.ts @@ -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,6 +237,10 @@ 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.** @@ -92,6 +261,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 +283,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 +531,35 @@ export interface RegenerateAccessKeyParameters { } /** - * Capture storage details for capture description + * Parameter supplied to check Namespace name availability operation */ -export interface Destination { - /** - * Name for capture destination - */ - name?: string; - /** - * Resource id of the storage account to be used to create the blobs - */ - storageAccountResourceId?: string; - /** - * Blob container Name - */ - blobContainer?: string; +export interface CheckNameAvailabilityParameter { /** - * 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 + * Name to check the namespace name availability */ - archiveNameFormat?: string; + name: string; } /** - * Properties to configure capture description for eventhub + * The Result of the CheckNameAvailability operation */ -export interface CaptureDescription { +export interface CheckNameAvailabilityResult { /** - * 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. + * The detailed info regarding the reason associated with the Namespace. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly 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; + readonly message?: string; /** - * Enumerates the possible values for the status of the Event Hub. Possible values include: - * 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - * 'Renaming', 'Unknown' + * Value indicating Namespace is availability, true if the Namespace is available; otherwise, + * false. */ - status?: EntityStatus; + nameAvailable?: boolean; /** - * 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 +585,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 +652,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; } /** @@ -558,33 +815,58 @@ 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 of the List Namespace operation - * @extends Array + * The response from the List namespace operation. + * @extends Array */ -export interface EHNamespaceListResult extends Array { +export interface IpFilterRuleListResult extends Array { /** - * Link to the next set of results. Not empty if Value contains incomplete list of namespaces. + * Link to the next set of results. Not empty if Value contains an incomplete list of IpFilter + * Rules */ nextLink?: string; } /** * @interface - * The response from the List namespace operation. + * The response of the List Namespace operation + * @extends Array + */ +export interface EHNamespaceListResult extends Array { + /** + * Link to the next set of results. Not empty if Value contains incomplete list of namespaces. + */ + 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. * @extends Array */ export interface AuthorizationRuleListResult extends Array { @@ -595,6 +877,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 +927,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 +955,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 +980,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 +1069,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 +1341,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 +1461,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 +1481,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 +1501,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 +1521,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 +1541,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 +1561,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 +1581,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 +1601,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 +1621,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 +1641,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 +1661,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 +1681,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 +1701,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 +1721,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 +1741,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 +1761,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 +1781,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 +1801,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 +1821,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 +1841,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 +1861,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 +1881,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 +1901,7 @@ export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecovery; + parsedBody: ClusterQuotaConfigurationProperties; }; }; @@ -1278,9 +1966,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 +2006,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 +2021,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 +2041,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 +2061,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 +2081,7 @@ export type EventHubsGetResponse = Eventhub & { /** * The response body as parsed JSON or XML */ - parsedBody: Eventhub; + parsedBody: ArmDisasterRecoveryListResult; }; }; @@ -1478,9 +2186,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 +2205,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 +2265,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 +2365,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..2e29dcdfeab8 100644 --- a/sdk/eventhub/arm-eventhub/src/models/mappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/mappers.ts @@ -12,6 +12,95 @@ 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: { + InclusiveMaximum: 32, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -71,6 +160,119 @@ export const TrackedResource: msRest.CompositeMapper = { } }; +export const Cluster: msRest.CompositeMapper = { + serializedName: "Cluster", + type: { + name: "Composite", + className: "Cluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ClusterSku" + } + }, + createdAt: { + readOnly: true, + serializedName: "properties.createdAt", + type: { + name: "String" + } + }, + updatedAt: { + readOnly: true, + serializedName: "properties.updatedAt", + type: { + name: "String" + } + }, + metricId: { + readOnly: true, + serializedName: "properties.metricId", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + +export const EHNamespaceIdContainer: msRest.CompositeMapper = { + serializedName: "EHNamespaceIdContainer", + type: { + name: "Composite", + className: "EHNamespaceIdContainer", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const EHNamespaceIdListResult: msRest.CompositeMapper = { + serializedName: "EHNamespaceIdListResult", + type: { + name: "Composite", + className: "EHNamespaceIdListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EHNamespaceIdContainer" + } + } + } + } + } + } +}; + +export const IpFilterRule: msRest.CompositeMapper = { + serializedName: "IpFilterRule", + type: { + name: "Composite", + className: "IpFilterRule", + modelProperties: { + ...Resource.type.modelProperties, + ipMask: { + serializedName: "properties.ipMask", + type: { + name: "String" + } + }, + action: { + serializedName: "properties.action", + type: { + name: "String" + } + }, + filterName: { + serializedName: "properties.filterName", + type: { + name: "String" + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -104,6 +306,98 @@ export const Sku: msRest.CompositeMapper = { } }; +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + defaultValue: 'SystemAssigned', + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned" + ] + } + } + } + } +}; + +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyName: { + serializedName: "keyName", + type: { + name: "String" + } + }, + keyVaultUri: { + serializedName: "keyVaultUri", + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const Encryption: msRest.CompositeMapper = { + serializedName: "Encryption", + type: { + name: "Composite", + className: "Encryption", + modelProperties: { + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } + } + }, + keySource: { + serializedName: "keySource", + defaultValue: 'Microsoft.KeyVault', + type: { + name: "Enum", + allowedValues: [ + "Microsoft.KeyVault" + ] + } + } + } + } +}; + export const EHNamespace: msRest.CompositeMapper = { serializedName: "EHNamespace", type: { @@ -118,6 +412,13 @@ export const EHNamespace: msRest.CompositeMapper = { className: "Sku" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -146,6 +447,12 @@ export const EHNamespace: msRest.CompositeMapper = { name: "String" } }, + clusterArmId: { + serializedName: "properties.clusterArmId", + type: { + name: "String" + } + }, metricId: { readOnly: true, serializedName: "properties.metricId", @@ -174,85 +481,141 @@ export const EHNamespace: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "Encryption" + } } } } }; -export const AuthorizationRule: msRest.CompositeMapper = { - serializedName: "AuthorizationRule", +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", type: { name: "Composite", - className: "AuthorizationRule", + className: "PrivateEndpoint", modelProperties: { - ...Resource.type.modelProperties, - rights: { - required: true, - serializedName: "properties.rights", + id: { + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const AccessKeys: msRest.CompositeMapper = { - serializedName: "AccessKeys", +export const ConnectionState: msRest.CompositeMapper = { + serializedName: "ConnectionState", type: { name: "Composite", - className: "AccessKeys", + className: "ConnectionState", modelProperties: { - primaryConnectionString: { - readOnly: true, - serializedName: "primaryConnectionString", + status: { + serializedName: "status", type: { name: "String" } }, - secondaryConnectionString: { - readOnly: true, - serializedName: "secondaryConnectionString", + 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" + } }, - aliasPrimaryConnectionString: { - readOnly: true, - serializedName: "aliasPrimaryConnectionString", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "String" + name: "Composite", + className: "ConnectionState" } }, - aliasSecondaryConnectionString: { - readOnly: true, - serializedName: "aliasSecondaryConnectionString", + 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" } }, - primaryKey: { - readOnly: true, - serializedName: "primaryKey", + 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" } }, - secondaryKey: { - readOnly: true, - serializedName: "secondaryKey", + name: { + serializedName: "name", type: { name: "String" } }, - keyName: { - readOnly: true, - serializedName: "keyName", + type: { + serializedName: "type", type: { name: "String" } @@ -261,25 +624,26 @@ export const AccessKeys: msRest.CompositeMapper = { } }; -export const RegenerateAccessKeyParameters: msRest.CompositeMapper = { - serializedName: "RegenerateAccessKeyParameters", +export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesListResult", type: { name: "Composite", - className: "RegenerateAccessKeyParameters", + className: "PrivateLinkResourcesListResult", modelProperties: { - keyType: { - required: true, - serializedName: "keyType", + value: { + serializedName: "value", type: { - name: "Enum", - allowedValues: [ - "PrimaryKey", - "SecondaryKey" - ] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } } }, - key: { - serializedName: "key", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -288,32 +652,74 @@ export const RegenerateAccessKeyParameters: msRest.CompositeMapper = { } }; -export const Destination: msRest.CompositeMapper = { - serializedName: "Destination", +export const ClusterQuotaConfigurationProperties: msRest.CompositeMapper = { + serializedName: "ClusterQuotaConfigurationProperties", type: { name: "Composite", - className: "Destination", + className: "ClusterQuotaConfigurationProperties", modelProperties: { - name: { - serializedName: "name", + 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" } - }, - storageAccountResourceId: { - serializedName: "properties.storageAccountResourceId", + } + } + } +}; + +export const Subnet: msRest.CompositeMapper = { + serializedName: "Subnet", + type: { + name: "Composite", + className: "Subnet", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } - }, - blobContainer: { - serializedName: "properties.blobContainer", + } + } + } +}; + +export const NWRuleSetIpRules: msRest.CompositeMapper = { + serializedName: "NWRuleSetIpRules", + type: { + name: "Composite", + className: "NWRuleSetIpRules", + modelProperties: { + ipMask: { + serializedName: "ipMask", type: { name: "String" } }, - archiveNameFormat: { - serializedName: "properties.archiveNameFormat", + action: { + serializedName: "action", type: { name: "String" } @@ -322,167 +728,177 @@ export const Destination: msRest.CompositeMapper = { } }; -export const CaptureDescription: msRest.CompositeMapper = { - serializedName: "CaptureDescription", +export const NWRuleSetVirtualNetworkRules: msRest.CompositeMapper = { + serializedName: "NWRuleSetVirtualNetworkRules", type: { name: "Composite", - className: "CaptureDescription", + className: "NWRuleSetVirtualNetworkRules", modelProperties: { - enabled: { - serializedName: "enabled", + subnet: { + serializedName: "subnet", type: { - name: "Boolean" + name: "Composite", + className: "Subnet" } }, - encoding: { - serializedName: "encoding", + ignoreMissingVnetServiceEndpoint: { + serializedName: "ignoreMissingVnetServiceEndpoint", type: { - name: "Enum", - allowedValues: [ - "Avro", - "AvroDeflate" - ] + name: "Boolean" } - }, - intervalInSeconds: { - serializedName: "intervalInSeconds", - constraints: { - InclusiveMaximum: 900, - InclusiveMinimum: 60 - }, + } + } + } +}; + +export const NetworkRuleSet: msRest.CompositeMapper = { + serializedName: "NetworkRuleSet", + type: { + name: "Composite", + className: "NetworkRuleSet", + modelProperties: { + ...Resource.type.modelProperties, + trustedServiceAccessEnabled: { + serializedName: "properties.trustedServiceAccessEnabled", type: { - name: "Number" + name: "Boolean" } }, - sizeLimitInBytes: { - serializedName: "sizeLimitInBytes", - constraints: { - InclusiveMaximum: 524288000, - InclusiveMinimum: 10485760 - }, + defaultAction: { + serializedName: "properties.defaultAction", type: { - name: "Number" + name: "String" } }, - destination: { - serializedName: "destination", + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", type: { - name: "Composite", - className: "Destination" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NWRuleSetVirtualNetworkRules" + } + } } }, - skipEmptyArchives: { - serializedName: "skipEmptyArchives", + ipRules: { + serializedName: "properties.ipRules", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NWRuleSetIpRules" + } + } } } } } }; -export const Eventhub: msRest.CompositeMapper = { - serializedName: "Eventhub", +export const AuthorizationRule: msRest.CompositeMapper = { + serializedName: "AuthorizationRule", type: { name: "Composite", - className: "Eventhub", + className: "AuthorizationRule", modelProperties: { ...Resource.type.modelProperties, - partitionIds: { + 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 +961,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 +1101,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 +1315,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 +1343,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 +1371,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 +1427,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 +1440,7 @@ export const EHNamespaceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "EHNamespace" + className: "AuthorizationRule" } } } @@ -919,11 +1455,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 +1468,7 @@ export const AuthorizationRuleListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "AuthorizationRule" + className: "PrivateEndpointConnection" } } } @@ -1032,6 +1568,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..80d1f477cd47 100644 --- a/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts @@ -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/parameters.ts b/sdk/eventhub/arm-eventhub/src/models/parameters.ts index f3cc023b3e66..21578fa1e724 100644 --- a/sdk/eventhub/arm-eventhub/src/models/parameters.ts +++ b/sdk/eventhub/arm-eventhub/src/models/parameters.ts @@ -34,11 +34,25 @@ export const alias: msRest.OperationURLParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, + isConstant: true, serializedName: "api-version", + defaultValue: '2018-01-01-preview', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-04-01', type: { name: "String" } @@ -57,6 +71,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 +104,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 +151,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 +231,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..0fea661bdb93 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + 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..abbf6824dd8c --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + 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..8b3ad176d945 100644 --- a/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts @@ -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..e2f4cc1679fe --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts @@ -0,0 +1,486 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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 + ], + 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..382937544149 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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..51f097f7b0cb 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts @@ -230,7 +230,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -264,7 +264,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -290,7 +290,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -316,7 +316,7 @@ const listByEventHubOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.skip, Parameters.top ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 1e51ac33ae15..8e646ea086d9 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -27,238 +27,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 +273,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 +282,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 +309,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,173 +318,160 @@ 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 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CheckNameAvailabilityParameter, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -486,23 +480,25 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecoveryListResult + bodyMapper: Mappers.AuthorizationRule }, default: { bodyMapper: Mappers.ErrorResponse @@ -511,33 +507,26 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], 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,23 +534,31 @@ 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 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CheckNameAvailabilityParameter, + required: true + } + }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResult + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -569,24 +566,23 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecovery + bodyMapper: Mappers.ArmDisasterRecoveryListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -595,9 +591,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, @@ -605,13 +601,23 @@ const breakPairingOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ArmDisasterRecovery, + required: true + } + }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.ArmDisasterRecovery + }, + 201: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -619,9 +625,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, @@ -629,7 +635,7 @@ const failOverOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -643,9 +649,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, @@ -653,14 +659,14 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.ArmDisasterRecovery }, default: { bodyMapper: Mappers.ErrorResponse @@ -669,26 +675,23 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.AuthorizationRule - }, + 200: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -696,26 +699,23 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.AccessKeys - }, + 200: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -723,7 +723,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -735,7 +735,7 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ArmDisasterRecoveryListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -744,7 +744,7 @@ const listNextOperationSpec: msRest.OperationSpec = { serializer }; -const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -756,7 +756,7 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { ], 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..599e54c2d240 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts @@ -27,216 +27,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 +270,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?: 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; + 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | 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.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.EventHubListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -503,17 +503,18 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -521,13 +522,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,24 +537,26 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.AuthorizationRule + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -561,25 +564,25 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.Eventhub - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -587,24 +590,25 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRuleListResult + bodyMapper: Mappers.AccessKeys }, default: { bodyMapper: Mappers.ErrorResponse @@ -613,9 +617,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, @@ -624,7 +628,7 @@ const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -632,13 +636,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 +651,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.apiVersion1, + Parameters.skip, + Parameters.top ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.AuthorizationRule + bodyMapper: Mappers.EventHubListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -674,25 +678,32 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Eventhub, + required: true + } + }, responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.Eventhub + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -700,26 +711,24 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.AccessKeys - }, + 200: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -727,32 +736,24 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.RegenerateAccessKeyParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.AccessKeys + bodyMapper: Mappers.Eventhub }, default: { bodyMapper: Mappers.ErrorResponse @@ -761,7 +762,7 @@ const regenerateKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listByNamespaceNextOperationSpec: msRest.OperationSpec = { +const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -773,7 +774,7 @@ const listByNamespaceNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.EventHubListResult + bodyMapper: Mappers.AuthorizationRuleListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -782,7 +783,7 @@ const listByNamespaceNextOperationSpec: msRest.OperationSpec = { serializer }; -const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { +const listByNamespaceNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -794,7 +795,7 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { ], 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..65e61e15d98e 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/index.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/index.ts @@ -8,9 +8,13 @@ * 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..51d93efa1d0b 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts @@ -28,31 +28,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 +320,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 +752,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 +819,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 +903,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,16 +960,44 @@ 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.apiVersion0 + ], + 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 + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -665,13 +1005,64 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.CheckNameAvailabilityParameter, + ...Mappers.IpFilterRule, required: true } }, responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult + 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: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + 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.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IpFilterRule }, default: { bodyMapper: Mappers.ErrorResponse @@ -687,7 +1078,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -711,7 +1102,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -736,7 +1127,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -764,7 +1155,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -791,23 +1182,164 @@ 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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}/messagingplan", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, + Parameters.virtualNetworkRuleName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.MessagingPlan + 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.apiVersion0 + ], + 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}/networkRuleSets/default", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.NetworkRuleSet }, default: { bodyMapper: Mappers.ErrorResponse @@ -818,14 +1350,14 @@ 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, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -843,7 +1375,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, @@ -851,7 +1383,7 @@ const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -876,7 +1408,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, @@ -884,7 +1416,7 @@ const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -901,7 +1433,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, @@ -909,7 +1441,7 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -927,7 +1459,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, @@ -935,7 +1467,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -953,7 +1485,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, @@ -961,7 +1493,7 @@ const regenerateKeysOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -984,16 +1516,14 @@ 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: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -1001,38 +1531,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 @@ -1050,7 +1555,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -1086,7 +1591,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -1102,6 +1607,27 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { serializer }; +const listIPFilterRulesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.IpFilterRuleListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -1144,6 +1670,27 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { serializer }; +const listVirtualNetworkRulesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", diff --git a/sdk/eventhub/arm-eventhub/src/operations/operations.ts b/sdk/eventhub/arm-eventhub/src/operations/operations.ts index 6597c772dd23..3771a25aeef7 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/operations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/operations.ts @@ -85,7 +85,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.EventHub/operations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], 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..7b453e4dcf31 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts @@ -0,0 +1,339 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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.apiVersion0 + ], + 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 + ], + 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..d2bb8545f800 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as 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.apiVersion0 + ], + 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..94231aa5d139 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/regions.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/regions.ts @@ -93,7 +93,7 @@ const listBySkuOperationSpec: msRest.OperationSpec = { Parameters.sku ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], 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