简体   繁体   中英

What are the proper arguments for the generation of a SAS token to connect to Azure eventhub?

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.

But I don't know what resourceUri , keyName , and key to use. Do I use the full url for the eventHub ?

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=

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM