While reading this HTTP POST between Postman and EventHub, I was directed to this: https://docs.microsoft.com/en-us/rest/api/eventhub/generate-sas-token#java
I don't know what resourceUri
, keyName
, and key to use. Do I use the full URL for the eventHub
?
Maybe somebody here could clarify where to get these three parameters.
CodePudding user response:
But I don't know what
resourceUri
,keyName
, and key to use. Do I use the full url for theeventHub
?
You can get these three parameters from the azure portal as shown in the below screenshot:
--> Goto your EventHub Namespace -->shared access policies--> Select default shared access policy(RootManageSharedAccessKey)-->copy Connection string–primary key
.
These are the parameters we need to pass to that method for generating the SAS token.
Endpoint=sb://mmxxxxxxxdows.net/;
SharedAccessKeyName=RootManageSharedAccessKey;
SharedAccessKey=K4Qxxxxxxxxxxxx9o=