Typescript. I use "@azure/arm-eventhub": "^3.2.0", and want to
import { EventHubManagementClient, EventHubManagementClientOptionalParams } from @azure/arm-eventhub;
return 'Module "@azure/arm-eventhub"
has no exported member 'EventHubManagementClientOptionalParams'.'**
but I checked the doc,
https://learn.microsoft.com/en-us/javascript/api/@azure/arm-eventhub/eventhubmanagementclient?view=azure-node-latest#@azure-arm-eventhub-eventhubmanagementclient-constructor
https://learn.microsoft.com/en-us/javascript/api/@azure/arm-eventhub/eventhubmanagementclientoptionalparams?view=azure-node-latest
the constructor of Eventhubmanagementclient has Eventhubmanagementclientoptionalparams and Eventhubmanagementclientoptionalparams is from arm-eventhub.
I try to use them to config the TLS version 1.2 like this:
import { EventHubManagementClient, EventHubManagementClientOptionalParams } from '@azure/arm-eventhub';
const clientOptions: EventHubManagementClientOptionalParams = {
pipeline: {
minimumTlsVersion: 'TLSv1_2'
}
};
const client = new EventHubManagementClient(credentials as any, Config.ArmSubscribtionId, clientOptions);
The doc page you referenced is for the latest version of
@azure/arm-eventhub
, which is at 5.1.0 currently.v3.2.0 has been deprecated. It does have a different API, for example, the constructor looks like this (from https://www.npmjs.com/package/@azure/arm-eventhub/v/3.2.0?activeTab=code)