Rufen Sie die Zugriffsschlüssel der Ressource ab.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys?api-version=2023-02-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe, die die Ressource enthält. Dieser Wert kann über die Azure-Ressourcen-Manager-API oder das Portal abgerufen werden.
|
resourceName
|
path |
True
|
string
|
Der Name der Ressource.
|
subscriptionId
|
path |
True
|
string
|
Ruft die Abonnement-ID ab, die das Microsoft Azure-Abonnement eindeutig identifiziert. Die Abonnement-ID ist Teil des URI für jeden Dienstaufruf.
|
api-version
|
query |
True
|
string
|
Client-API-Version.
|
Antworten
Name |
Typ |
Beschreibung |
200 OK
|
SignalRKeys
|
Erfolg. Die Antwort beschreibt die Zugriffsschlüssel der Ressource.
|
Other Status Codes
|
ErrorResponse
|
Fehlerantwort mit Beschreibung des Grunds für den Fehler.
|
Sicherheit
azure_auth
Azure Active Directory-OAuth2-Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel Ihres Benutzerkontos
|
Beispiele
SignalR_ListKeys
Sample Request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SignalRService/signalR/mySignalRService/listKeys?api-version=2023-02-01
/** Samples for SignalR ListKeys. */
public final class Main {
/*
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListKeys.json
*/
/**
* Sample code: SignalR_ListKeys.
*
* @param manager Entry point to SignalRManager.
*/
public static void signalRListKeys(com.azure.resourcemanager.signalr.SignalRManager manager) {
manager
.signalRs()
.listKeysWithResponse("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.signalr import SignalRManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-signalr
# USAGE
python signal_r_list_keys.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SignalRManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.signal_r.list_keys(
resource_group_name="myResourceGroup",
resource_name="mySignalRService",
)
print(response)
# x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListKeys.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsignalr_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/signalr/armsignalr"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListKeys.json
func ExampleClient_ListKeys() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsignalr.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().ListKeys(ctx, "myResourceGroup", "mySignalRService", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Keys = armsignalr.Keys{
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SignalRManagementClient } = require("@azure/arm-signalr");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the access keys of the resource.
*
* @summary Get the access keys of the resource.
* x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/SignalR_ListKeys.json
*/
async function signalRListKeys() {
const subscriptionId =
process.env["SIGNALR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["SIGNALR_RESOURCE_GROUP"] || "myResourceGroup";
const resourceName = "mySignalRService";
const credential = new DefaultAzureCredential();
const client = new SignalRManagementClient(credential, subscriptionId);
const result = await client.signalR.listKeys(resourceGroupName, resourceName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Definitionen
ErrorAdditionalInfo
Zusätzliche Informationen zum Ressourcenverwaltungsfehler.
Name |
Typ |
Beschreibung |
info
|
object
|
Zusätzliche Informationen.
|
type
|
string
|
Typ der zusätzlichen Informationen.
|
ErrorDetail
Die Fehlerdetails.
Name |
Typ |
Beschreibung |
additionalInfo
|
ErrorAdditionalInfo[]
|
Die zusätzlichen Fehlerinformationen.
|
code
|
string
|
Der Fehlercode.
|
details
|
ErrorDetail[]
|
Die Fehlerdetails.
|
message
|
string
|
Die Fehlermeldung.
|
target
|
string
|
Das Fehlerziel.
|
ErrorResponse
Fehlerantwort
Name |
Typ |
Beschreibung |
error
|
ErrorDetail
|
Das Fehlerobjekt.
|
SignalRKeys
Eine -Klasse stellt die Zugriffsschlüssel der Ressource dar.
Name |
Typ |
Beschreibung |
primaryConnectionString
|
string
|
Verbindungszeichenfolge, die über den primaryKey erstellt wurde
|
primaryKey
|
string
|
Der primäre Zugriffsschlüssel.
|
secondaryConnectionString
|
string
|
Verbindungszeichenfolge, die über den secondaryKey erstellt wurde
|
secondaryKey
|
string
|
Der sekundäre Zugriffsschlüssel.
|