你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

EventGridSasBuilder.GenerateSas(AzureKeyCredential) Method

Definition

Generates a shared access signature that can be used to authenticate with a topic. The signature can be used as the input to the AzureSasCredential(String) constructor. This credential can then be passed to the EventGridPublisherClient(Uri, AzureSasCredential, EventGridPublisherClientOptions) constructor.

public string GenerateSas(Azure.AzureKeyCredential key);
member this.GenerateSas : Azure.AzureKeyCredential -> string
Public Function GenerateSas (key As AzureKeyCredential) As String

Parameters

key
AzureKeyCredential

The AzureKeyCredential to use to authenticate with the service when generating the shared access signature.

Returns

A shared access signature that can be used to authenticate with an Event Grid topic.

Applies to