diff --git a/sdk/eventhub/arm-eventhub/LICENSE.txt b/sdk/eventhub/arm-eventhub/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/eventhub/arm-eventhub/LICENSE.txt +++ b/sdk/eventhub/arm-eventhub/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md index 1bebe8ce0919..80922b8e35c8 100644 --- a/sdk/eventhub/arm-eventhub/README.md +++ b/sdk/eventhub/arm-eventhub/README.md @@ -1,11 +1,11 @@ ## Azure EventHubManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for EventHubManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for EventHubManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-eventhub @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. +#### nodejs - Authentication, client creation, and listAvailableClusterRegion clusters as an example written in JavaScript. ##### Sample code @@ -51,8 +49,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new EventHubManagementClient(creds, subscriptionId); - -client.operations.list().then((result) => { +client.clusters.listAvailableClusterRegion().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -61,7 +58,7 @@ client.operations.list().then((result) => { }); ``` -#### browser - Authentication, client creation, and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and listAvailableClusterRegion clusters as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -86,10 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmEventhub.EventHubManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { + client.clusters.listAvailableClusterRegion().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -106,4 +103,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/.\sdk\eventhub\arm-eventhub\/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/eventhub/arm-eventhub/README.png) diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 10060f5652f4..a6958b02d56c 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -2,12 +2,12 @@ "name": "@azure/arm-eventhub", "author": "Microsoft Corporation", "description": "EventHubManagementClient Library with typescript type definitions for node.js and browser.", - "version": "3.3.1", + "version": "4.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,18 +22,18 @@ "types": "./esm/eventHubManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/feature/v4/sdk/eventhub/arm-eventhub", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/arm-eventhub", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/eventhub/arm-eventhub/rollup.config.js b/sdk/eventhub/arm-eventhub/rollup.config.js index bede107e529e..d159db7280eb 100644 --- a/sdk/eventhub/arm-eventhub/rollup.config.js +++ b/sdk/eventhub/arm-eventhub/rollup.config.js @@ -21,15 +21,15 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index 60c29f68416d..631e78f8bd67 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -18,12 +17,15 @@ import { EventHubManagementClientContext } from "./eventHubManagementClientConte class EventHubManagementClient extends EventHubManagementClientContext { // Operation groups - operations: operations.Operations; + clusters: operations.Clusters; + configuration: operations.Configuration; namespaces: operations.Namespaces; - disasterRecoveryConfigs: operations.DisasterRecoveryConfigs; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + operations: operations.Operations; eventHubs: operations.EventHubs; + disasterRecoveryConfigs: operations.DisasterRecoveryConfigs; consumerGroups: operations.ConsumerGroups; - regions: operations.Regions; /** * Initializes a new instance of the EventHubManagementClient class. @@ -39,12 +41,15 @@ class EventHubManagementClient extends EventHubManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.EventHubManagementClientOptions) { super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); + this.clusters = new operations.Clusters(this); + this.configuration = new operations.Configuration(this); this.namespaces = new operations.Namespaces(this); - this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.operations = new operations.Operations(this); this.eventHubs = new operations.EventHubs(this); + this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this); this.consumerGroups = new operations.ConsumerGroups(this); - this.regions = new operations.Regions(this); } } diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts index bd2e264f1817..5044f2bbfe83 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,16 +9,16 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-eventhub"; -const packageVersion = "3.3.1"; +const packageVersion = "4.0.0"; export class EventHubManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the EventHubManagementClient class. @@ -51,7 +50,7 @@ export class EventHubManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2017-04-01'; + this.apiVersion = '2021-06-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts b/sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts new file mode 100644 index 000000000000..7a799b246370 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/clustersMappers.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ArmDisasterRecovery, + AuthorizationRule, + AvailableCluster, + AvailableClustersList, + BaseResource, + CaptureDescription, + Cluster, + ClusterListResult, + ClusterSku, + ConnectionState, + ConsumerGroup, + Destination, + EHNamespace, + EHNamespaceIdContainer, + EHNamespaceIdListResult, + Encryption, + ErrorResponse, + Eventhub, + Identity, + KeyVaultProperties, + NetworkRuleSet, + NWRuleSetIpRules, + NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, + Resource, + Sku, + Subnet, + SystemData, + TrackedResource, + UserAssignedIdentity, + UserAssignedIdentityProperties +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts b/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts new file mode 100644 index 000000000000..8c1941e74211 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/configurationMappers.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ClusterQuotaConfigurationProperties, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts index 09b82cfb47dc..51f0891b9749 100644 --- a/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/consumerGroupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,20 +11,28 @@ export { AuthorizationRule, BaseResource, CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, ConsumerGroupListResult, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, - MessagingRegions, - MessagingRegionsProperties, + Identity, + KeyVaultProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, Resource, Sku, Subnet, - TrackedResource + SystemData, + TrackedResource, + UserAssignedIdentity, + UserAssignedIdentityProperties } 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..f1c6d8bb81f8 100644 --- a/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/disasterRecoveryConfigsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -16,19 +16,27 @@ export { CaptureDescription, CheckNameAvailabilityParameter, CheckNameAvailabilityResult, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, - MessagingRegions, - MessagingRegionsProperties, + Identity, + KeyVaultProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, Resource, Sku, Subnet, - TrackedResource + SystemData, + TrackedResource, + UserAssignedIdentity, + UserAssignedIdentityProperties } 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..75ff6dcc3354 100644 --- a/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/eventHubsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -13,21 +13,29 @@ export { AuthorizationRuleListResult, BaseResource, CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, EventHubListResult, - MessagingPlan, - MessagingRegions, - MessagingRegionsProperties, + Identity, + KeyVaultProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, RegenerateAccessKeyParameters, Resource, Sku, Subnet, - TrackedResource + SystemData, + TrackedResource, + UserAssignedIdentity, + UserAssignedIdentityProperties } 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..5cacf8c93e4c 100644 --- a/sdk/eventhub/arm-eventhub/src/models/index.ts +++ b/sdk/eventhub/arm-eventhub/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,58 +12,342 @@ 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; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The type of identity that last modified the resource. + */ + lastModifiedAt?: Date; +} + +/** + * 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 system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * The 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[]; +} + +/** + * 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 }; +} + /** * SKU parameters supplied to the create namespace operation */ export interface Sku { /** - * Name of this SKU. Possible values include: 'Basic', 'Standard' + * Name of this SKU. Possible values include: 'Basic', 'Standard', 'Premium' */ name: SkuName; /** - * The billing tier of this particular SKU. Possible values include: 'Basic', 'Standard' + * The billing tier of this particular SKU. Possible values include: 'Basic', 'Standard', + * 'Premium' */ tier?: SkuTier; /** - * The Event Hubs throughput units, value should be 0 to 20 throughput units. + * The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 + * throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 + * premium units. */ capacity?: number; } +/** + * Recognized Dictionary value. + */ +export interface UserAssignedIdentity { + /** + * Principal Id of user assigned identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * Client Id of user assigned identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + +/** + * Properties to configure Identity for Bring your Own Keys + */ +export interface Identity { + /** + * ObjectId from the KeyVault + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * TenantId from the KeyVault + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * Type of managed service identity. Possible values include: 'SystemAssigned', 'UserAssigned', + * 'SystemAssigned, UserAssigned', 'None' + */ + type?: ManagedServiceIdentityType; + /** + * Properties for User Assigned Identities + */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** + * An interface representing UserAssignedIdentityProperties. + */ +export interface UserAssignedIdentityProperties { + /** + * ARM ID of user Identity selected for encryption + */ + userAssignedIdentity?: string; +} + +/** + * 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; + identity?: UserAssignedIdentityProperties; +} + +/** + * 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; + /** + * Enable Infrastructure Encryption (Double Encryption) + */ + requireInfrastructureEncryption?: boolean; +} + +/** + * 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; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + /** * Single Namespace item in List or Get Operation */ @@ -72,11 +356,25 @@ export interface EHNamespace extends TrackedResource { * Properties of sku resource */ sku?: Sku; + /** + * Properties of BYOK Identity description + */ + identity?: Identity; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; /** * Provisioning state of the Namespace. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; + /** + * Status of the Namespace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; /** * The time the Namespace was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -92,6 +390,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,73 +412,103 @@ export interface EHNamespace extends TrackedResource { * Value that indicates whether Kafka is enabled for eventhub namespace. */ kafkaEnabled?: boolean; -} - -/** - * Single item in a List or Get AuthorizationRule operation - */ -export interface AuthorizationRule extends Resource { /** - * The rights associated with the rule. + * Enabling this property creates a Standard Event Hubs Namespace in regions supported + * availability zones. */ - rights: AccessRights[]; + zoneRedundant?: boolean; + /** + * Properties of BYOK Encryption description + */ + encryption?: Encryption; + /** + * List of private endpoint connections. + */ + privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * This property disables SAS authentication for the Event Hubs namespace. + */ + disableLocalAuth?: boolean; } /** - * Namespace/EventHub Connection String + * Information of the private link resource. */ -export interface AccessKeys { +export interface PrivateLinkResource { /** - * Primary connection string of the created namespace AuthorizationRule. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The private link resource group id. */ - readonly primaryConnectionString?: string; + groupId?: string; /** - * Secondary connection string of the created namespace AuthorizationRule. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The private link resource required member names. */ - readonly secondaryConnectionString?: string; + requiredMembers?: string[]; /** - * Primary connection string of the alias if GEO DR is enabled - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The private link resource Private link DNS zone name. */ - readonly aliasPrimaryConnectionString?: string; + requiredZoneNames?: string[]; /** - * Secondary connection string of the alias if GEO DR is enabled - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Fully qualified identifier of the resource. */ - readonly aliasSecondaryConnectionString?: string; + id?: string; /** - * A base64-encoded 256-bit primary key for signing and validating the SAS token. + * 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; +} + +/** + * The object that represents the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft.EventHub * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly primaryKey?: string; + readonly provider?: string; /** - * A base64-encoded 256-bit primary key for signing and validating the SAS token. + * Resource on which the operation is performed: Invoice, etc. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly secondaryKey?: string; + readonly resource?: string; /** - * A string that describes the AuthorizationRule. + * Operation type: Read, write, delete, etc. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly keyName?: string; + readonly operation?: string; } /** - * Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to - * be reset. + * A Event Hub REST API operation */ -export interface RegenerateAccessKeyParameters { +export interface Operation { /** - * The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' + * Operation name: {provider}/{resource}/{operation} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - keyType: KeyType; + readonly name?: string; /** - * Optional, if the key value provided, is set for KeyType or autogenerated Key value set for - * keyType + * The object that represents the operation. */ - key?: string; + display?: OperationDisplay; } /** @@ -274,28 +606,11 @@ export interface Eventhub extends Resource { * Properties of capture description */ captureDescription?: CaptureDescription; -} - -/** - * Single item in List or Get Consumer group operation - */ -export interface ConsumerGroup extends Resource { - /** - * Exact time the message was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly createdAt?: Date; - /** - * The exact time the message was updated. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly updatedAt?: Date; - /** - * User Metadata is a placeholder to store user-defined string data with maximum length 1024. - * e.g. it can be used to store descriptive data, such as list of teams and their contact - * information also user-defined configuration settings can be stored. - */ - userMetadata?: string; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -331,196 +646,246 @@ export interface CheckNameAvailabilityResult { } /** - * The object that represents the operation. + * Single item in List or Get Alias(Disaster Recovery configuration) operation */ -export interface OperationDisplay { +export interface ArmDisasterRecovery extends Resource { /** - * Service provider: Microsoft.EventHub + * 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 provider?: string; + readonly provisioningState?: ProvisioningStateDR; /** - * Resource on which the operation is performed: Invoice, etc. + * ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + */ + partnerNamespace?: string; + /** + * Alternate name specified when alias and namespace names are same. + */ + alternateName?: string; + /** + * 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.** */ - readonly resource?: string; + readonly role?: RoleDisasterRecovery; /** - * Operation type: Read, write, delete, etc. + * Number of entities pending to be replicated. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly operation?: string; + readonly pendingReplicationOperationsCount?: number; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** - * A Event Hub REST API operation + * Properties supplied for Subnet */ -export interface Operation { +export interface Subnet { /** - * Operation name: {provider}/{resource}/{operation} - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Resource ID of Virtual Network Subnet */ - readonly name?: string; + id?: string; +} + +/** + * The response from the List namespace operation. + */ +export interface NWRuleSetIpRules { /** - * The object that represents the operation. + * IP Mask */ - display?: OperationDisplay; + ipMask?: string; + /** + * The IP Filter Action. Possible values include: 'Allow' + */ + action?: NetworkRuleIPAction; } /** - * Error response indicates EventHub service is not able to process the incoming request. The - * reason is provided in the error message. + * The response from the List namespace operation. */ -export interface ErrorResponse { +export interface NWRuleSetVirtualNetworkRules { /** - * Error code. + * Subnet properties */ - code?: string; + subnet?: Subnet; /** - * Error message indicating why the operation failed. + * Value that indicates whether to ignore missing Vnet Service Endpoint */ - message?: string; + ignoreMissingVnetServiceEndpoint?: boolean; } /** - * Single item in List or Get Alias(Disaster Recovery configuration) operation + * Description of topic resource. */ -export interface ArmDisasterRecovery extends Resource { +export interface NetworkRuleSet 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.** + * Value that indicates whether Trusted Service Access is Enabled or not. */ - readonly provisioningState?: ProvisioningStateDR; + trustedServiceAccessEnabled?: boolean; /** - * ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing + * Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' */ - partnerNamespace?: string; + defaultAction?: DefaultAction; /** - * Alternate name specified when alias and namespace names are same. + * List VirtualNetwork Rules */ - alternateName?: string; + virtualNetworkRules?: NWRuleSetVirtualNetworkRules[]; /** - * 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.** + * List of IpRules */ - readonly role?: RoleDisasterRecovery; + ipRules?: NWRuleSetIpRules[]; /** - * Number of entities pending to be replicated. + * This determines if traffic is allowed over public network. By default it is enabled. Possible + * values include: 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccess?: PublicNetworkAccessFlag; + /** + * The system meta data relating to this resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly pendingReplicationOperationsCount?: number; + readonly systemData?: SystemData; } /** - * An interface representing MessagingRegionsProperties. + * Single item in a List or Get AuthorizationRule operation */ -export interface MessagingRegionsProperties { +export interface AuthorizationRule extends Resource { /** - * Region code - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The rights associated with the rule. */ - readonly code?: string; + rights: AccessRights[]; /** - * Full name of the region + * The system meta data relating to this resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly fullName?: string; + readonly systemData?: SystemData; } /** - * Messaging Region - */ -export interface MessagingRegions extends TrackedResource { - properties?: MessagingRegionsProperties; -} - -/** - * Messaging Plan for the namespace + * Namespace/EventHub Connection String */ -export interface MessagingPlan extends TrackedResource { +export interface AccessKeys { /** - * Sku type + * Primary connection string of the created namespace AuthorizationRule. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly sku?: number; + readonly primaryConnectionString?: string; /** - * Selected event hub unit + * Secondary connection string of the created namespace AuthorizationRule. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly selectedEventHubUnit?: number; + readonly secondaryConnectionString?: string; /** - * The exact time the messaging plan was updated. + * Primary connection string of the alias if GEO DR is enabled * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly updatedAt?: Date; + readonly aliasPrimaryConnectionString?: string; + /** + * Secondary connection string of the alias if GEO DR is enabled + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly aliasSecondaryConnectionString?: string; + /** + * A base64-encoded 256-bit primary key for signing and validating the SAS token. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly primaryKey?: string; + /** + * A base64-encoded 256-bit primary key for signing and validating the SAS token. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secondaryKey?: string; /** - * revision number + * A string that describes the AuthorizationRule. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly revision?: number; + readonly keyName?: string; } /** - * Properties supplied for Subnet + * Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to + * be reset. */ -export interface Subnet { +export interface RegenerateAccessKeyParameters { /** - * Resource ID of Virtual Network Subnet + * The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' + */ + keyType: KeyType; + /** + * Optional, if the key value provided, is set for KeyType or autogenerated Key value set for + * keyType */ - id: string; + key?: string; } /** - * Description of NetWorkRuleSet - IpRules resource. + * Single item in List or Get Consumer group operation */ -export interface NWRuleSetIpRules { +export interface ConsumerGroup extends Resource { /** - * IP Mask + * Exact time the message was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - ipMask?: string; + readonly createdAt?: Date; /** - * The IP Filter Action. Possible values include: 'Allow'. Default value: 'Allow'. + * The exact time the message was updated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - action?: NetworkRuleIPAction; + readonly updatedAt?: Date; + /** + * User Metadata is a placeholder to store user-defined string data with maximum length 1024. + * e.g. it can be used to store descriptive data, such as list of teams and their contact + * information also user-defined configuration settings can be stored. + */ + userMetadata?: string; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** - * Description of VirtualNetworkRules - NetworkRules resource. + * Optional Parameters. */ -export interface NWRuleSetVirtualNetworkRules { +export interface EventHubsListByNamespaceOptionalParams extends msRest.RequestOptionsBase { /** - * Subnet properties + * Skip is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skip parameter + * that specifies a starting point to use for subsequent calls. */ - subnet?: Subnet; + skip?: number; /** - * Value that indicates whether to ignore missing VNet Service Endpoint + * May be used to limit the number of results to the most recent N usageDetails. */ - ignoreMissingVnetServiceEndpoint?: boolean; + top?: number; } /** - * Description of NetworkRuleSet resource. + * Optional Parameters. */ -export interface NetworkRuleSet extends Resource { - /** - * Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' - */ - defaultAction?: DefaultAction; +export interface EventHubsListByNamespaceNextOptionalParams extends msRest.RequestOptionsBase { /** - * List VirtualNetwork Rules + * Skip is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skip parameter + * that specifies a starting point to use for subsequent calls. */ - virtualNetworkRules?: NWRuleSetVirtualNetworkRules[]; + skip?: number; /** - * List of IpRules + * May be used to limit the number of results to the most recent N usageDetails. */ - ipRules?: NWRuleSetIpRules[]; + top?: number; } /** * Optional Parameters. */ -export interface EventHubsListByNamespaceOptionalParams extends msRest.RequestOptionsBase { +export interface ConsumerGroupsListByEventHubOptionalParams extends msRest.RequestOptionsBase { /** * Skip is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skip parameter @@ -536,7 +901,7 @@ export interface EventHubsListByNamespaceOptionalParams extends msRest.RequestOp /** * Optional Parameters. */ -export interface ConsumerGroupsListByEventHubOptionalParams extends msRest.RequestOptionsBase { +export interface ConsumerGroupsListByEventHubNextOptionalParams extends msRest.RequestOptionsBase { /** * Skip is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skip parameter @@ -558,16 +923,15 @@ 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; } /** @@ -597,13 +961,25 @@ export interface AuthorizationRuleListResult extends Array { /** * @interface - * The result of the List Alias(Disaster Recovery configuration) operation. - * @extends Array + * Result of the list of all private endpoint connections operation. + * @extends Array */ -export interface ArmDisasterRecoveryListResult extends Array { +export interface PrivateEndpointConnectionListResult extends Array { /** - * Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster - * Recovery configuration) + * A link for the next page of private endpoint connection resources. + */ + 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; @@ -621,6 +997,20 @@ export interface EventHubListResult extends Array { nextLink?: string; } +/** + * @interface + * The result of the List Alias(Disaster Recovery configuration) operation. + * @extends Array + */ +export interface ArmDisasterRecoveryListResult extends Array { + /** + * Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster + * Recovery configuration) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * @interface * The result to the List Consumer Group operation. @@ -634,59 +1024,61 @@ export interface ConsumerGroupListResult extends Array { } /** - * @interface - * The response of the List MessagingRegions operation. - * @extends Array + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} */ -export interface MessagingRegionsListResult extends Array { - /** - * Link to the next set of results. Not empty if Value contains incomplete list of - * MessagingRegions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; -} +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; /** * Defines values for SkuName. - * Possible values include: 'Basic', 'Standard' + * Possible values include: 'Basic', 'Standard', 'Premium' * @readonly * @enum {string} */ -export type SkuName = 'Basic' | 'Standard'; +export type SkuName = 'Basic' | 'Standard' | 'Premium'; /** * Defines values for SkuTier. - * Possible values include: 'Basic', 'Standard' + * Possible values include: 'Basic', 'Standard', 'Premium' * @readonly * @enum {string} */ -export type SkuTier = 'Basic' | 'Standard'; +export type SkuTier = 'Basic' | 'Standard' | 'Premium'; /** - * Defines values for AccessRights. - * Possible values include: 'Manage', 'Send', 'Listen' + * Defines values for ManagedServiceIdentityType. + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * @readonly * @enum {string} */ -export type AccessRights = 'Manage' | 'Send' | 'Listen'; +export type ManagedServiceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; /** - * 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 EndPointProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' + * @readonly + * @enum {string} + */ +export type EndPointProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; /** * Defines values for EncodingCaptureDescription. @@ -696,6 +1088,15 @@ export type EntityStatus = 'Active' | 'Disabled' | 'Restoring' | 'SendDisabled' */ export type EncodingCaptureDescription = 'Avro' | 'AvroDeflate'; +/** + * Defines values for EntityStatus. + * Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', + * 'Creating', 'Deleting', 'Renaming', 'Unknown' + * @readonly + * @enum {string} + */ +export type EntityStatus = 'Active' | 'Disabled' | 'Restoring' | 'SendDisabled' | 'ReceiveDisabled' | 'Creating' | 'Deleting' | 'Renaming' | 'Unknown'; + /** * Defines values for UnavailableReason. * Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', @@ -738,9 +1139,333 @@ export type NetworkRuleIPAction = 'Allow'; export type DefaultAction = 'Allow' | 'Deny'; /** - * Contains response data for the list operation. + * Defines values for PublicNetworkAccessFlag. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessFlag = 'Enabled' | 'Disabled'; + +/** + * 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'; + +/** + * 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 listBySubscription operation. + */ +export type ClustersListBySubscriptionResponse = 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 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 listBySubscriptionNext operation. + */ +export type ClustersListBySubscriptionNextResponse = 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 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 patch operation. + */ +export type ConfigurationPatchResponse = ClusterQuotaConfigurationProperties & { + /** + * 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: ClusterQuotaConfigurationProperties; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ConfigurationGetResponse = ClusterQuotaConfigurationProperties & { + /** + * 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: ClusterQuotaConfigurationProperties; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type NamespacesListResponse = 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 listByResourceGroup operation. + */ +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 OperationsListResponse = OperationListResult & { +export type NamespacesCreateOrUpdateResponse = EHNamespace & { /** * The underlying HTTP response. */ @@ -753,14 +1478,14 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: EHNamespace; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type NamespacesGetResponse = EHNamespace & { /** * The underlying HTTP response. */ @@ -773,14 +1498,14 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: EHNamespace; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the update operation. */ -export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type NamespacesUpdateResponse = EHNamespace & { /** * The underlying HTTP response. */ @@ -793,14 +1518,14 @@ export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResul /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: EHNamespace; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdateNetworkRuleSet operation. */ -export type NamespacesListResponse = EHNamespaceListResult & { +export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & { /** * The underlying HTTP response. */ @@ -813,14 +1538,14 @@ export type NamespacesListResponse = EHNamespaceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: NetworkRuleSet; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the getNetworkRuleSet operation. */ -export type NamespacesListByResourceGroupResponse = EHNamespaceListResult & { +export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & { /** * The underlying HTTP response. */ @@ -833,14 +1558,14 @@ export type NamespacesListByResourceGroupResponse = EHNamespaceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: NetworkRuleSet; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listAuthorizationRules operation. */ -export type NamespacesCreateOrUpdateResponse = EHNamespace & { +export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -853,14 +1578,14 @@ export type NamespacesCreateOrUpdateResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdateAuthorizationRule operation. */ -export type NamespacesGetResponse = EHNamespace & { +export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -873,14 +1598,14 @@ export type NamespacesGetResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the update operation. + * Contains response data for the getAuthorizationRule operation. */ -export type NamespacesUpdateResponse = EHNamespace & { +export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -893,14 +1618,14 @@ export type NamespacesUpdateResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the getMessagingPlan operation. + * Contains response data for the listKeys operation. */ -export type NamespacesGetMessagingPlanResponse = MessagingPlan & { +export type NamespacesListKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -913,14 +1638,14 @@ export type NamespacesGetMessagingPlanResponse = MessagingPlan & { /** * The response body as parsed JSON or XML */ - parsedBody: MessagingPlan; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the listAuthorizationRules operation. + * Contains response data for the regenerateKeys operation. */ -export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResult & { +export type NamespacesRegenerateKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -933,14 +1658,14 @@ export type NamespacesListAuthorizationRulesResponse = AuthorizationRuleListResu /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the createOrUpdateAuthorizationRule operation. + * Contains response data for the checkNameAvailability operation. */ -export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & { +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { /** * The underlying HTTP response. */ @@ -953,14 +1678,14 @@ export type NamespacesCreateOrUpdateAuthorizationRuleResponse = AuthorizationRul /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: CheckNameAvailabilityResult; }; }; /** - * Contains response data for the getAuthorizationRule operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & { +export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & { /** * The underlying HTTP response. */ @@ -973,14 +1698,14 @@ export type NamespacesGetAuthorizationRuleResponse = AuthorizationRule & { /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: EHNamespace; }; }; /** - * Contains response data for the listKeys operation. + * Contains response data for the listNext operation. */ -export type NamespacesListKeysResponse = AccessKeys & { +export type NamespacesListNextResponse = EHNamespaceListResult & { /** * The underlying HTTP response. */ @@ -993,14 +1718,14 @@ export type NamespacesListKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: EHNamespaceListResult; }; }; /** - * Contains response data for the regenerateKeys operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type NamespacesRegenerateKeysResponse = AccessKeys & { +export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & { /** * The underlying HTTP response. */ @@ -1013,14 +1738,14 @@ export type NamespacesRegenerateKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: EHNamespaceListResult; }; }; /** - * Contains response data for the createOrUpdateNetworkRuleSet operation. + * Contains response data for the listAuthorizationRulesNext operation. */ -export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & { +export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1033,14 +1758,14 @@ export type NamespacesCreateOrUpdateNetworkRuleSetResponse = NetworkRuleSet & { /** * The response body as parsed JSON or XML */ - parsedBody: NetworkRuleSet; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the getNetworkRuleSet operation. + * Contains response data for the list operation. */ -export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & { +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1053,14 +1778,14 @@ export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & { /** * The response body as parsed JSON or XML */ - parsedBody: NetworkRuleSet; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the createOrUpdate operation. */ -export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & { +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1073,14 +1798,14 @@ export type NamespacesBeginCreateOrUpdateResponse = EHNamespace & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespace; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type NamespacesListNextResponse = EHNamespaceListResult & { +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -1093,14 +1818,14 @@ export type NamespacesListNextResponse = EHNamespaceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: PrivateEndpointConnection; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listNext operation. */ -export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & { +export type PrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionListResult & { /** * The underlying HTTP response. */ @@ -1113,14 +1838,14 @@ export type NamespacesListByResourceGroupNextResponse = EHNamespaceListResult & /** * The response body as parsed JSON or XML */ - parsedBody: EHNamespaceListResult; + parsedBody: PrivateEndpointConnectionListResult; }; }; /** - * Contains response data for the listAuthorizationRulesNext operation. + * Contains response data for the get operation. */ -export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { +export type PrivateLinkResourcesGetResponse = PrivateLinkResourcesListResult & { /** * The underlying HTTP response. */ @@ -1133,14 +1858,14 @@ export type NamespacesListAuthorizationRulesNextResponse = AuthorizationRuleList /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: PrivateLinkResourcesListResult; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the list operation. */ -export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1153,14 +1878,14 @@ export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvai /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1173,14 +1898,14 @@ export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecoveryListResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByNamespace operation. */ -export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery & { +export type EventHubsListByNamespaceResponse = EventHubListResult & { /** * The underlying HTTP response. */ @@ -1193,14 +1918,14 @@ export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecovery; + parsedBody: EventHubListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the createOrUpdate operation. */ -export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { +export type EventHubsCreateOrUpdateResponse = Eventhub & { /** * The underlying HTTP response. */ @@ -1213,14 +1938,14 @@ export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecovery; + parsedBody: Eventhub; }; }; /** - * Contains response data for the listAuthorizationRules operation. + * Contains response data for the get operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesResponse = AuthorizationRuleListResult & { +export type EventHubsGetResponse = Eventhub & { /** * The underlying HTTP response. */ @@ -1233,14 +1958,14 @@ export type DisasterRecoveryConfigsListAuthorizationRulesResponse = Authorizatio /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: Eventhub; }; }; /** - * Contains response data for the getAuthorizationRule operation. + * Contains response data for the listAuthorizationRules operation. */ -export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationRule & { +export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1253,14 +1978,14 @@ export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationR /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the listKeys operation. + * Contains response data for the createOrUpdateAuthorizationRule operation. */ -export type DisasterRecoveryConfigsListKeysResponse = AccessKeys & { +export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -1273,14 +1998,14 @@ export type DisasterRecoveryConfigsListKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getAuthorizationRule operation. */ -export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult & { +export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -1293,14 +2018,14 @@ export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListRes /** * The response body as parsed JSON or XML */ - parsedBody: ArmDisasterRecoveryListResult; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the listAuthorizationRulesNext operation. + * Contains response data for the listKeys operation. */ -export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { +export type EventHubsListKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -1313,14 +2038,14 @@ export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = Authoriz /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the listByNamespace operation. + * Contains response data for the regenerateKeys operation. */ -export type EventHubsListByNamespaceResponse = EventHubListResult & { +export type EventHubsRegenerateKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -1333,14 +2058,14 @@ export type EventHubsListByNamespaceResponse = EventHubListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EventHubListResult; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByNamespaceNext operation. */ -export type EventHubsCreateOrUpdateResponse = Eventhub & { +export type EventHubsListByNamespaceNextResponse = EventHubListResult & { /** * The underlying HTTP response. */ @@ -1353,14 +2078,14 @@ export type EventHubsCreateOrUpdateResponse = Eventhub & { /** * The response body as parsed JSON or XML */ - parsedBody: Eventhub; + parsedBody: EventHubListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listAuthorizationRulesNext operation. */ -export type EventHubsGetResponse = Eventhub & { +export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1373,14 +2098,14 @@ export type EventHubsGetResponse = Eventhub & { /** * The response body as parsed JSON or XML */ - parsedBody: Eventhub; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the listAuthorizationRules operation. + * Contains response data for the checkNameAvailability operation. */ -export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResult & { +export type DisasterRecoveryConfigsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { /** * The underlying HTTP response. */ @@ -1393,14 +2118,14 @@ export type EventHubsListAuthorizationRulesResponse = AuthorizationRuleListResul /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: CheckNameAvailabilityResult; }; }; /** - * Contains response data for the createOrUpdateAuthorizationRule operation. + * Contains response data for the list operation. */ -export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule & { +export type DisasterRecoveryConfigsListResponse = ArmDisasterRecoveryListResult & { /** * The underlying HTTP response. */ @@ -1413,14 +2138,14 @@ export type EventHubsCreateOrUpdateAuthorizationRuleResponse = AuthorizationRule /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: ArmDisasterRecoveryListResult; }; }; /** - * Contains response data for the getAuthorizationRule operation. + * Contains response data for the createOrUpdate operation. */ -export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule & { +export type DisasterRecoveryConfigsCreateOrUpdateResponse = ArmDisasterRecovery & { /** * The underlying HTTP response. */ @@ -1433,14 +2158,14 @@ export type EventHubsGetAuthorizationRuleResponse = AuthorizationRule & { /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRule; + parsedBody: ArmDisasterRecovery; }; }; /** - * Contains response data for the listKeys operation. + * Contains response data for the get operation. */ -export type EventHubsListKeysResponse = AccessKeys & { +export type DisasterRecoveryConfigsGetResponse = ArmDisasterRecovery & { /** * The underlying HTTP response. */ @@ -1453,14 +2178,14 @@ export type EventHubsListKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: ArmDisasterRecovery; }; }; /** - * Contains response data for the regenerateKeys operation. + * Contains response data for the listAuthorizationRules operation. */ -export type EventHubsRegenerateKeysResponse = AccessKeys & { +export type DisasterRecoveryConfigsListAuthorizationRulesResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1473,14 +2198,14 @@ export type EventHubsRegenerateKeysResponse = AccessKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: AccessKeys; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the listByNamespaceNext operation. + * Contains response data for the getAuthorizationRule operation. */ -export type EventHubsListByNamespaceNextResponse = EventHubListResult & { +export type DisasterRecoveryConfigsGetAuthorizationRuleResponse = AuthorizationRule & { /** * The underlying HTTP response. */ @@ -1493,14 +2218,14 @@ export type EventHubsListByNamespaceNextResponse = EventHubListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: EventHubListResult; + parsedBody: AuthorizationRule; }; }; /** - * Contains response data for the listAuthorizationRulesNext operation. + * Contains response data for the listKeys operation. */ -export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { +export type DisasterRecoveryConfigsListKeysResponse = AccessKeys & { /** * The underlying HTTP response. */ @@ -1513,14 +2238,14 @@ export type EventHubsListAuthorizationRulesNextResponse = AuthorizationRuleListR /** * The response body as parsed JSON or XML */ - parsedBody: AuthorizationRuleListResult; + parsedBody: AccessKeys; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listNext operation. */ -export type ConsumerGroupsCreateOrUpdateResponse = ConsumerGroup & { +export type DisasterRecoveryConfigsListNextResponse = ArmDisasterRecoveryListResult & { /** * The underlying HTTP response. */ @@ -1533,14 +2258,14 @@ export type ConsumerGroupsCreateOrUpdateResponse = ConsumerGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: ConsumerGroup; + parsedBody: ArmDisasterRecoveryListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listAuthorizationRulesNext operation. */ -export type ConsumerGroupsGetResponse = ConsumerGroup & { +export type DisasterRecoveryConfigsListAuthorizationRulesNextResponse = AuthorizationRuleListResult & { /** * The underlying HTTP response. */ @@ -1553,14 +2278,14 @@ export type ConsumerGroupsGetResponse = ConsumerGroup & { /** * The response body as parsed JSON or XML */ - parsedBody: ConsumerGroup; + parsedBody: AuthorizationRuleListResult; }; }; /** - * Contains response data for the listByEventHub operation. + * Contains response data for the createOrUpdate operation. */ -export type ConsumerGroupsListByEventHubResponse = ConsumerGroupListResult & { +export type ConsumerGroupsCreateOrUpdateResponse = ConsumerGroup & { /** * The underlying HTTP response. */ @@ -1573,14 +2298,14 @@ export type ConsumerGroupsListByEventHubResponse = ConsumerGroupListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ConsumerGroupListResult; + parsedBody: ConsumerGroup; }; }; /** - * Contains response data for the listByEventHubNext operation. + * Contains response data for the get operation. */ -export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult & { +export type ConsumerGroupsGetResponse = ConsumerGroup & { /** * The underlying HTTP response. */ @@ -1593,14 +2318,14 @@ export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult & /** * The response body as parsed JSON or XML */ - parsedBody: ConsumerGroupListResult; + parsedBody: ConsumerGroup; }; }; /** - * Contains response data for the listBySku operation. + * Contains response data for the listByEventHub operation. */ -export type RegionsListBySkuResponse = MessagingRegionsListResult & { +export type ConsumerGroupsListByEventHubResponse = ConsumerGroupListResult & { /** * The underlying HTTP response. */ @@ -1613,14 +2338,14 @@ export type RegionsListBySkuResponse = MessagingRegionsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: MessagingRegionsListResult; + parsedBody: ConsumerGroupListResult; }; }; /** - * Contains response data for the listBySkuNext operation. + * Contains response data for the listByEventHubNext operation. */ -export type RegionsListBySkuNextResponse = MessagingRegionsListResult & { +export type ConsumerGroupsListByEventHubNextResponse = ConsumerGroupListResult & { /** * The underlying HTTP response. */ @@ -1633,6 +2358,6 @@ export type RegionsListBySkuNextResponse = MessagingRegionsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: MessagingRegionsListResult; + parsedBody: ConsumerGroupListResult; }; }; diff --git a/sdk/eventhub/arm-eventhub/src/models/mappers.ts b/sdk/eventhub/arm-eventhub/src/models/mappers.ts index 8b1ee80373e4..3a570027fe69 100644 --- a/sdk/eventhub/arm-eventhub/src/models/mappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,6 +12,140 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const AvailableCluster: msRest.CompositeMapper = { + serializedName: "AvailableCluster", + type: { + name: "Composite", + className: "AvailableCluster", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableClustersList: msRest.CompositeMapper = { + serializedName: "AvailableClustersList", + type: { + name: "Composite", + className: "AvailableClustersList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableCluster" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterSku: msRest.CompositeMapper = { + serializedName: "ClusterSku", + type: { + name: "Composite", + className: "ClusterSku", + modelProperties: { + name: { + required: true, + isConstant: true, + serializedName: "name", + defaultValue: 'Dedicated', + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + constraints: { + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -71,6 +205,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" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + 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 ClusterQuotaConfigurationProperties: msRest.CompositeMapper = { + serializedName: "ClusterQuotaConfigurationProperties", + type: { + name: "Composite", + className: "ClusterQuotaConfigurationProperties", + modelProperties: { + settings: { + serializedName: "settings", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -93,7 +340,6 @@ export const Sku: msRest.CompositeMapper = { capacity: { serializedName: "capacity", constraints: { - InclusiveMaximum: 20, InclusiveMinimum: 0 }, type: { @@ -104,6 +350,244 @@ export const Sku: msRest.CompositeMapper = { } }; +export const UserAssignedIdentity: msRest.CompositeMapper = { + serializedName: "UserAssignedIdentity", + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + clientId: { + readOnly: true, + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "UserAssignedIdentity" + } + } + } + } + } + } +}; + +export const UserAssignedIdentityProperties: msRest.CompositeMapper = { + serializedName: "userAssignedIdentityProperties", + type: { + name: "Composite", + className: "UserAssignedIdentityProperties", + modelProperties: { + userAssignedIdentity: { + serializedName: "userAssignedIdentity", + type: { + name: "String" + } + } + } + } +}; + +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" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "UserAssignedIdentityProperties" + } + } + } + } +}; + +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" + ] + } + }, + requireInfrastructureEncryption: { + serializedName: "requireInfrastructureEncryption", + type: { + name: "Boolean" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectionState: msRest.CompositeMapper = { + serializedName: "ConnectionState", + type: { + name: "Composite", + className: "ConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + export const EHNamespace: msRest.CompositeMapper = { serializedName: "EHNamespace", type: { @@ -118,6 +602,21 @@ export const EHNamespace: msRest.CompositeMapper = { className: "Sku" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -125,6 +624,13 @@ export const EHNamespace: msRest.CompositeMapper = { name: "String" } }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, createdAt: { readOnly: true, serializedName: "properties.createdAt", @@ -146,6 +652,12 @@ export const EHNamespace: msRest.CompositeMapper = { name: "String" } }, + clusterArmId: { + serializedName: "properties.clusterArmId", + type: { + name: "String" + } + }, metricId: { readOnly: true, serializedName: "properties.metricId", @@ -161,10 +673,6 @@ export const EHNamespace: msRest.CompositeMapper = { }, maximumThroughputUnits: { serializedName: "properties.maximumThroughputUnits", - constraints: { - InclusiveMaximum: 20, - InclusiveMinimum: 0 - }, type: { name: "Number" } @@ -174,85 +682,149 @@ export const EHNamespace: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "Encryption" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + type: { + name: "Boolean" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + groupId: { + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } } } } }; -export const AuthorizationRule: msRest.CompositeMapper = { - serializedName: "AuthorizationRule", +export const PrivateLinkResourcesListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesListResult", type: { name: "Composite", - className: "AuthorizationRule", + className: "PrivateLinkResourcesListResult", modelProperties: { - ...Resource.type.modelProperties, - rights: { - required: true, - serializedName: "properties.rights", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "PrivateLinkResource" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const AccessKeys: msRest.CompositeMapper = { - serializedName: "AccessKeys", +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", type: { name: "Composite", - className: "AccessKeys", + className: "OperationDisplay", modelProperties: { - primaryConnectionString: { - readOnly: true, - serializedName: "primaryConnectionString", - type: { - name: "String" - } - }, - secondaryConnectionString: { - readOnly: true, - serializedName: "secondaryConnectionString", - type: { - name: "String" - } - }, - aliasPrimaryConnectionString: { - readOnly: true, - serializedName: "aliasPrimaryConnectionString", - type: { - name: "String" - } - }, - aliasSecondaryConnectionString: { - readOnly: true, - serializedName: "aliasSecondaryConnectionString", - type: { - name: "String" - } - }, - primaryKey: { + provider: { readOnly: true, - serializedName: "primaryKey", + serializedName: "provider", type: { name: "String" } }, - secondaryKey: { + resource: { readOnly: true, - serializedName: "secondaryKey", + serializedName: "resource", type: { name: "String" } }, - keyName: { + operation: { readOnly: true, - serializedName: "keyName", + serializedName: "operation", type: { name: "String" } @@ -261,27 +833,24 @@ export const AccessKeys: msRest.CompositeMapper = { } }; -export const RegenerateAccessKeyParameters: msRest.CompositeMapper = { - serializedName: "RegenerateAccessKeyParameters", +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", type: { name: "Composite", - className: "RegenerateAccessKeyParameters", + className: "Operation", modelProperties: { - keyType: { - required: true, - serializedName: "keyType", + name: { + readOnly: true, + serializedName: "name", type: { - name: "Enum", - allowedValues: [ - "PrimaryKey", - "SecondaryKey" - ] + name: "String" } }, - key: { - serializedName: "key", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } } } @@ -346,20 +915,12 @@ export const CaptureDescription: msRest.CompositeMapper = { }, intervalInSeconds: { serializedName: "intervalInSeconds", - constraints: { - InclusiveMaximum: 900, - InclusiveMinimum: 60 - }, type: { name: "Number" } }, sizeLimitInBytes: { serializedName: "sizeLimitInBytes", - constraints: { - InclusiveMaximum: 524288000, - InclusiveMinimum: 10485760 - }, type: { name: "Number" } @@ -455,36 +1016,13 @@ export const Eventhub: msRest.CompositeMapper = { name: "Composite", className: "CaptureDescription" } - } - } - } -}; - -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: { + systemData: { readOnly: true, - serializedName: "properties.updatedAt", - type: { - name: "DateTime" - } - }, - userMetadata: { - serializedName: "properties.userMetadata", + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } @@ -545,83 +1083,6 @@ export const CheckNameAvailabilityResult: msRest.CompositeMapper = { } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - readOnly: true, - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - readOnly: true, - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - readOnly: true, - serializedName: "operation", - type: { - name: "String" - } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - } - } - } -}; - -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 ArmDisasterRecovery: msRest.CompositeMapper = { serializedName: "ArmDisasterRecovery", type: { @@ -639,118 +1100,45 @@ export const ArmDisasterRecovery: msRest.CompositeMapper = { "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 MessagingRegionsProperties: msRest.CompositeMapper = { - serializedName: "MessagingRegions_properties", - type: { - name: "Composite", - className: "MessagingRegionsProperties", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - fullName: { - readOnly: true, - serializedName: "fullName", - type: { - name: "String" - } - } - } - } -}; - -export const MessagingRegions: msRest.CompositeMapper = { - serializedName: "MessagingRegions", - type: { - name: "Composite", - className: "MessagingRegions", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + } + }, + partnerNamespace: { + serializedName: "properties.partnerNamespace", type: { - name: "Composite", - className: "MessagingRegionsProperties" + name: "String" } - } - } - } -}; - -export const MessagingPlan: msRest.CompositeMapper = { - serializedName: "MessagingPlan", - type: { - name: "Composite", - className: "MessagingPlan", - modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - readOnly: true, - serializedName: "properties.sku", + }, + alternateName: { + serializedName: "properties.alternateName", type: { - name: "Number" + name: "String" } }, - selectedEventHubUnit: { + role: { readOnly: true, - serializedName: "properties.selectedEventHubUnit", + serializedName: "properties.role", type: { - name: "Number" + name: "Enum", + allowedValues: [ + "Primary", + "PrimaryNotReplicating", + "Secondary" + ] } }, - updatedAt: { + pendingReplicationOperationsCount: { readOnly: true, - serializedName: "properties.updatedAt", + serializedName: "properties.pendingReplicationOperationsCount", type: { - name: "DateTime" + name: "Number" } }, - revision: { + systemData: { readOnly: true, - serializedName: "properties.revision", + serializedName: "systemData", type: { - name: "Number" + name: "Composite", + className: "SystemData" } } } @@ -764,7 +1152,6 @@ export const Subnet: msRest.CompositeMapper = { className: "Subnet", modelProperties: { id: { - required: true, serializedName: "id", type: { name: "String" @@ -788,7 +1175,6 @@ export const NWRuleSetIpRules: msRest.CompositeMapper = { }, action: { serializedName: "action", - defaultValue: 'Allow', type: { name: "String" } @@ -827,6 +1213,12 @@ export const NetworkRuleSet: msRest.CompositeMapper = { className: "NetworkRuleSet", modelProperties: { ...Resource.type.modelProperties, + trustedServiceAccessEnabled: { + serializedName: "properties.trustedServiceAccessEnabled", + type: { + name: "Boolean" + } + }, defaultAction: { serializedName: "properties.defaultAction", type: { @@ -856,32 +1248,201 @@ export const NetworkRuleSet: msRest.CompositeMapper = { } } } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const AuthorizationRule: msRest.CompositeMapper = { + serializedName: "AuthorizationRule", type: { name: "Composite", - className: "OperationListResult", + className: "AuthorizationRule", modelProperties: { - value: { + ...Resource.type.modelProperties, + rights: { + required: true, + serializedName: "properties.rights", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const AccessKeys: msRest.CompositeMapper = { + serializedName: "AccessKeys", + type: { + name: "Composite", + className: "AccessKeys", + modelProperties: { + primaryConnectionString: { + readOnly: true, + serializedName: "primaryConnectionString", + type: { + name: "String" + } + }, + secondaryConnectionString: { + readOnly: true, + serializedName: "secondaryConnectionString", + type: { + name: "String" + } + }, + aliasPrimaryConnectionString: { + readOnly: true, + serializedName: "aliasPrimaryConnectionString", + type: { + name: "String" + } + }, + aliasSecondaryConnectionString: { + readOnly: true, + serializedName: "aliasSecondaryConnectionString", + type: { + name: "String" + } + }, + primaryKey: { + readOnly: true, + serializedName: "primaryKey", + type: { + name: "String" + } + }, + secondaryKey: { + readOnly: true, + serializedName: "secondaryKey", + type: { + name: "String" + } + }, + keyName: { + readOnly: true, + serializedName: "keyName", + type: { + name: "String" + } + } + } + } +}; + +export const RegenerateAccessKeyParameters: msRest.CompositeMapper = { + serializedName: "RegenerateAccessKeyParameters", + type: { + name: "Composite", + className: "RegenerateAccessKeyParameters", + modelProperties: { + keyType: { + required: true, + serializedName: "keyType", + type: { + name: "Enum", + allowedValues: [ + "PrimaryKey", + "SecondaryKey" + ] + } + }, + key: { + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +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" + } + }, + systemData: { readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ClusterListResult: msRest.CompositeMapper = { + serializedName: "ClusterListResult", + type: { + name: "Composite", + className: "ClusterListResult", + modelProperties: { + value: { serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "Cluster" } } } }, nextLink: { - readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -947,11 +1508,11 @@ export const AuthorizationRuleListResult: msRest.CompositeMapper = { } }; -export const ArmDisasterRecoveryListResult: msRest.CompositeMapper = { - serializedName: "ArmDisasterRecoveryListResult", +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", type: { name: "Composite", - className: "ArmDisasterRecoveryListResult", + className: "PrivateEndpointConnectionListResult", modelProperties: { value: { serializedName: "", @@ -960,7 +1521,36 @@ export const ArmDisasterRecoveryListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ArmDisasterRecovery" + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +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" } } } @@ -1004,11 +1594,11 @@ export const EventHubListResult: msRest.CompositeMapper = { } }; -export const ConsumerGroupListResult: msRest.CompositeMapper = { - serializedName: "ConsumerGroupListResult", +export const ArmDisasterRecoveryListResult: msRest.CompositeMapper = { + serializedName: "ArmDisasterRecoveryListResult", type: { name: "Composite", - className: "ConsumerGroupListResult", + className: "ArmDisasterRecoveryListResult", modelProperties: { value: { serializedName: "", @@ -1017,12 +1607,13 @@ export const ConsumerGroupListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ConsumerGroup" + className: "ArmDisasterRecovery" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -1032,11 +1623,11 @@ export const ConsumerGroupListResult: msRest.CompositeMapper = { } }; -export const MessagingRegionsListResult: msRest.CompositeMapper = { - serializedName: "MessagingRegionsListResult", +export const ConsumerGroupListResult: msRest.CompositeMapper = { + serializedName: "ConsumerGroupListResult", type: { name: "Composite", - className: "MessagingRegionsListResult", + className: "ConsumerGroupListResult", modelProperties: { value: { serializedName: "", @@ -1045,13 +1636,12 @@ export const MessagingRegionsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "MessagingRegions" + className: "ConsumerGroup" } } } }, nextLink: { - readOnly: true, serializedName: "nextLink", type: { name: "String" diff --git a/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts b/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts index 9d58d74dc72c..1516ae824548 100644 --- a/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/namespacesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -15,21 +15,29 @@ export { CaptureDescription, CheckNameAvailabilityParameter, CheckNameAvailabilityResult, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, EHNamespaceListResult, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, - MessagingRegions, - MessagingRegionsProperties, + Identity, + KeyVaultProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, RegenerateAccessKeyParameters, Resource, Sku, Subnet, - TrackedResource + SystemData, + TrackedResource, + UserAssignedIdentity, + UserAssignedIdentityProperties } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts index b8de8606cf9d..3e8e33c6f2bd 100644 --- a/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/eventhub/arm-eventhub/src/models/parameters.ts b/sdk/eventhub/arm-eventhub/src/models/parameters.ts index f3cc023b3e66..4983ad87de26 100644 --- a/sdk/eventhub/arm-eventhub/src/models/parameters.ts +++ b/sdk/eventhub/arm-eventhub/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -57,6 +56,20 @@ export const authorizationRuleName: msRest.OperationURLParameter = { } } }; +export const clusterName: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + constraints: { + MaxLength: 50, + MinLength: 6 + }, + type: { + name: "String" + } + } +}; export const consumerGroupName: msRest.OperationURLParameter = { parameterPath: "consumerGroupName", mapper: { @@ -77,6 +90,7 @@ export const eventHubName: msRest.OperationURLParameter = { required: true, serializedName: "eventHubName", constraints: { + MaxLength: 256, MinLength: 1 }, type: { @@ -109,6 +123,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: { @@ -139,20 +163,6 @@ export const skip: msRest.OperationQueryParameter = { } } }; -export const sku: msRest.OperationURLParameter = { - parameterPath: "sku", - mapper: { - required: true, - serializedName: "sku", - constraints: { - MaxLength: 50, - MinLength: 1 - }, - type: { - name: "String" - } - } -}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts b/sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts similarity index 56% rename from sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts rename to sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts index c1fafeae471f..2fa3ea5348a6 100644 --- a/sdk/eventhub/arm-eventhub/src/models/regionsMappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/privateEndpointConnectionsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,20 +11,28 @@ export { AuthorizationRule, BaseResource, CaptureDescription, + Cluster, + ClusterSku, + ConnectionState, ConsumerGroup, Destination, EHNamespace, + Encryption, ErrorResponse, Eventhub, - MessagingPlan, - MessagingRegions, - MessagingRegionsListResult, - MessagingRegionsProperties, + Identity, + KeyVaultProperties, NetworkRuleSet, NWRuleSetIpRules, NWRuleSetVirtualNetworkRules, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, Resource, Sku, Subnet, - TrackedResource + SystemData, + TrackedResource, + UserAssignedIdentity, + UserAssignedIdentityProperties } from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts b/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..be5115bf1832 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ErrorResponse, + PrivateLinkResource, + PrivateLinkResourcesListResult +} from "../models/mappers"; diff --git a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts new file mode 100644 index 000000000000..cb0ed9cb3473 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts @@ -0,0 +1,587 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/clustersMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a Clusters. */ +export class Clusters { + private readonly client: EventHubManagementClientContext; + + /** + * Create a Clusters. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * @param [options] The optional parameters + * @returns Promise + */ + listAvailableClusterRegion(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listAvailableClusterRegion(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listAvailableClusterRegion(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAvailableClusterRegion(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listAvailableClusterRegionOperationSpec, + callback) as Promise; + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + 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 + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(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 + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listAvailableClusterRegionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableClustersList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNamespacesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.EHNamespaceIdListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/configuration.ts b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts new file mode 100644 index 000000000000..b72580d1d44c --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/configuration.ts @@ -0,0 +1,160 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/configurationMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a Configuration. */ +export class Configuration { + private readonly client: EventHubManagementClientContext; + + /** + * Create a Configuration. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * Replace all specified Event Hubs Cluster settings with those contained in the request body. + * Leaves the settings not specified in the request body unmodified. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating an Event Hubs Cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating an Event Hubs Cluster resource. + * @param callback The callback + */ + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param parameters Parameters for creating an Event Hubs Cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + patch(resourceGroupName: string, clusterName: string, parameters: Models.ClusterQuotaConfigurationProperties, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + patchOperationSpec, + callback) as Promise; + } + + /** + * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas + * and settings imposed on the cluster. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const patchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ClusterQuotaConfigurationProperties, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ClusterQuotaConfigurationProperties + }, + 201: { + bodyMapper: Mappers.ClusterQuotaConfigurationProperties + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterQuotaConfigurationProperties + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts index fe20df49c3b8..9f956fc6add8 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/consumerGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -194,7 +193,7 @@ export class ConsumerGroups { * @param [options] The optional parameters * @returns Promise */ - listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByEventHubNext(nextPageLink: string, options?: Models.ConsumerGroupsListByEventHubNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -205,8 +204,8 @@ export class ConsumerGroups { * @param options The optional parameters * @param callback The callback */ - listByEventHubNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByEventHubNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByEventHubNext(nextPageLink: string, options: Models.ConsumerGroupsListByEventHubNextOptionalParams, callback: msRest.ServiceCallback): void; + listByEventHubNext(nextPageLink: string, options?: Models.ConsumerGroupsListByEventHubNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -341,6 +340,11 @@ const listByEventHubNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 1e51ac33ae15..7abe5ea8d4a0 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -456,7 +455,7 @@ export class DisasterRecoveryConfigs { const serializer = new msRest.Serializer(Mappers); const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -645,7 +644,7 @@ const failOverOperationSpec: msRest.OperationSpec = { const listAuthorizationRulesOperationSpec: 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}/authorizationRules", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -671,7 +670,7 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -698,7 +697,7 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: 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}/authorizationRules/{authorizationRuleName}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -730,6 +729,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -751,6 +753,9 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts index ffd4672511f1..00e7bcdd700a 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/eventHubs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -207,7 +206,8 @@ export class EventHubs { } /** - * Creates or updates an AuthorizationRule for the specified Event Hub. + * 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 @@ -423,7 +423,7 @@ export class EventHubs { * @param [options] The optional parameters * @returns Promise */ - listByNamespaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByNamespaceNext(nextPageLink: string, options?: Models.EventHubsListByNamespaceNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -434,8 +434,8 @@ export class EventHubs { * @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 { + listByNamespaceNext(nextPageLink: string, options: Models.EventHubsListByNamespaceNextOptionalParams, callback: msRest.ServiceCallback): void; + listByNamespaceNext(nextPageLink: string, options?: Models.EventHubsListByNamespaceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -702,7 +702,7 @@ const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/ListKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -768,6 +768,11 @@ const listByNamespaceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.top + ], headerParameters: [ Parameters.acceptLanguage ], @@ -789,6 +794,9 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/index.ts b/sdk/eventhub/arm-eventhub/src/operations/index.ts index 8c9523f44191..85d2082e35e3 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/index.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/index.ts @@ -1,16 +1,18 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ -export * from "./operations"; +export * from "./clusters"; +export * from "./configuration"; export * from "./namespaces"; -export * from "./disasterRecoveryConfigs"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./operations"; export * from "./eventHubs"; +export * from "./disasterRecoveryConfigs"; export * from "./consumerGroups"; -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..08be611d71df 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/namespaces.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,34 +26,6 @@ export class Namespaces { this.client = client; } - /** - * Check the give Namespace name availability. - * @param parameters Parameters to check availability of the given Namespace name - * @param [options] The optional parameters - * @returns Promise - */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters Parameters to check availability of the given Namespace name - * @param callback The callback - */ - checkNameAvailability(parameters: Models.CheckNameAvailabilityParameter, callback: msRest.ServiceCallback): void; - /** - * @param parameters Parameters to check availability of the given 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 { - return this.client.sendOperationRequest( - { - parameters, - options - }, - checkNameAvailabilityOperationSpec, - callback) as Promise; - } - /** * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * @param [options] The optional parameters @@ -204,35 +175,71 @@ export class Namespaces { } /** - * Gets messaging plan for specified namespace. + * 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 +463,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; } /** @@ -650,9 +617,9 @@ export class Namespaces { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNameAvailability", +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces", urlParameters: [ Parameters.subscriptionId ], @@ -662,16 +629,9 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CheckNameAvailabilityParameter, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult + bodyMapper: Mappers.EHNamespaceListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -680,10 +640,11 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces", urlParameters: [ + Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ @@ -703,11 +664,12 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", urlParameters: [ Parameters.resourceGroupName, + Parameters.namespaceName, Parameters.subscriptionId ], queryParameters: [ @@ -718,7 +680,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.EHNamespaceListResult + bodyMapper: Mappers.EHNamespace }, default: { bodyMapper: Mappers.ErrorResponse @@ -727,8 +689,8 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", urlParameters: [ Parameters.resourceGroupName, @@ -741,6 +703,13 @@ const getOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.EHNamespace, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.EHNamespace @@ -748,6 +717,7 @@ const getOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.EHNamespace }, + 202: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -755,9 +725,9 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", +const createOrUpdateNetworkRuleSetOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -772,18 +742,14 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.EHNamespace, + ...Mappers.NetworkRuleSet, required: true } }, responses: { 200: { - bodyMapper: Mappers.EHNamespace - }, - 201: { - bodyMapper: Mappers.EHNamespace + bodyMapper: Mappers.NetworkRuleSet }, - 202: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -791,9 +757,9 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const getMessagingPlanOperationSpec: msRest.OperationSpec = { +const getNetworkRuleSetOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/messagingplan", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -807,7 +773,7 @@ const getMessagingPlanOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.MessagingPlan + bodyMapper: Mappers.NetworkRuleSet }, default: { bodyMapper: Mappers.ErrorResponse @@ -818,7 +784,7 @@ const getMessagingPlanOperationSpec: msRest.OperationSpec = { const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -843,7 +809,7 @@ const listAuthorizationRulesOperationSpec: msRest.OperationSpec = { const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -876,7 +842,7 @@ const createOrUpdateAuthorizationRuleOperationSpec: msRest.OperationSpec = { const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -901,7 +867,7 @@ const deleteAuthorizationRuleOperationSpec: msRest.OperationSpec = { const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -927,7 +893,7 @@ const getAuthorizationRuleOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -953,7 +919,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { const regenerateKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.namespaceName, @@ -984,12 +950,10 @@ const regenerateKeysOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateNetworkRuleSetOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default", +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability", urlParameters: [ - Parameters.resourceGroupName, - Parameters.namespaceName, Parameters.subscriptionId ], queryParameters: [ @@ -1001,38 +965,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 @@ -1109,6 +1048,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -1130,6 +1072,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -1151,6 +1096,9 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/operations.ts b/sdk/eventhub/arm-eventhub/src/operations/operations.ts index 6597c772dd23..04688b62c243 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/operations.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..1518d6270332 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/privateEndpointConnections.ts @@ -0,0 +1,341 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: EventHubManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param callback The callback + */ + list(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates PrivateEndpointConnections of service namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to + * namespace resource. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to + * namespace resource. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to + * namespace resource. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + privateEndpointConnectionName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the + * namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,namespaceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a description for the specified Private Endpoint Connection name. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing namespace. This operation also removes all associated resources under the + * namespace. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param privateEndpointConnectionName The PrivateEndpointConnection name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, namespaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + namespaceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts b/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..86327d9ad2ae --- /dev/null +++ b/sdk/eventhub/arm-eventhub/src/operations/privateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: EventHubManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {EventHubManagementClientContext} client Reference to the service client. + */ + constructor(client: EventHubManagementClientContext) { + this.client = client; + } + + /** + * Gets lists of resources that supports Privatelinks. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + namespaceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.namespaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/eventhub/arm-eventhub/src/operations/regions.ts b/sdk/eventhub/arm-eventhub/src/operations/regions.ts deleted file mode 100644 index ef0fb7026bd9..000000000000 --- a/sdk/eventhub/arm-eventhub/src/operations/regions.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/regionsMappers"; -import * as Parameters from "../models/parameters"; -import { EventHubManagementClientContext } from "../eventHubManagementClientContext"; - -/** Class representing a Regions. */ -export class Regions { - private readonly client: EventHubManagementClientContext; - - /** - * Create a Regions. - * @param {EventHubManagementClientContext} client Reference to the service client. - */ - constructor(client: EventHubManagementClientContext) { - this.client = client; - } - - /** - * Gets the available Regions for a given sku - * @param sku The sku type. - * @param [options] The optional parameters - * @returns Promise - */ - listBySku(sku: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param sku The sku type. - * @param callback The callback - */ - listBySku(sku: string, callback: msRest.ServiceCallback): void; - /** - * @param sku The sku type. - * @param options The optional parameters - * @param callback The callback - */ - listBySku(sku: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySku(sku: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - sku, - options - }, - listBySkuOperationSpec, - callback) as Promise; - } - - /** - * Gets the available Regions for a given sku - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySkuNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySkuNext(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 - */ - listBySkuNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySkuNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySkuNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listBySkuOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventHub/sku/{sku}/regions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.sku - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MessagingRegionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySkuNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MessagingRegionsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; 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