Opération de redémarrage d’une ressource.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart?api-version=2024-03-01
Paramètres URI
Nom |
Dans |
Obligatoire |
Type |
Description |
resourceGroupName
|
path |
True
|
string
|
Nom du groupe de ressources. Le nom ne respecte pas la casse.
|
resourceName
|
path |
True
|
string
|
Nom de la ressource.
Modèle d’expression régulière: ^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$
|
subscriptionId
|
path |
True
|
string
uuid
|
ID de l’abonnement cible. La valeur doit être un UUID.
|
api-version
|
query |
True
|
string
|
Version de l’API à utiliser pour cette opération.
|
Réponses
Nom |
Type |
Description |
202 Accepted
|
|
Accepté. La réponse indique que l’opération de redémarrage est effectuée en arrière-plan.
En-têtes
Location: string
|
204 No Content
|
|
Réussite. La réponse indique que l’opération a réussi et qu’aucun contenu ne sera retourné.
|
Other Status Codes
|
ErrorResponse
|
Réponse d’erreur décrivant la raison de l’échec de l’opération.
|
Sécurité
azure_auth
Flux OAuth2 Azure Active Directory
Type:
oauth2
Flux:
implicit
URL d’autorisation:
https://login.microsoftonline.com/common/oauth2/authorize
Étendues
Nom |
Description |
user_impersonation
|
Emprunter l’identité de votre compte d’utilisateur
|
Exemples
WebPubSub_Restart
Exemple de requête
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SignalRService/webPubSub/myWebPubSubService/restart?api-version=2024-03-01
/**
* Samples for WebPubSub Restart.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Restart.
* json
*/
/**
* Sample code: WebPubSub_Restart.
*
* @param manager Entry point to WebPubSubManager.
*/
public static void webPubSubRestart(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) {
manager.webPubSubs().restart("myResourceGroup", "myWebPubSubService", 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.webpubsub import WebPubSubManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-webpubsub
# USAGE
python web_pub_sub_restart.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 = WebPubSubManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
client.web_pub_sub.begin_restart(
resource_group_name="myResourceGroup",
resource_name="myWebPubSubService",
).result()
# x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Restart.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 armwebpubsub_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/webpubsub/armwebpubsub"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Restart.json
func ExampleClient_BeginRestart() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armwebpubsub.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginRestart(ctx, "myResourceGroup", "myWebPubSubService", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { WebPubSubManagementClient } = require("@azure/arm-webpubsub");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Operation to restart a resource.
*
* @summary Operation to restart a resource.
* x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Restart.json
*/
async function webPubSubRestart() {
const subscriptionId =
process.env["WEB-PUBSUB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["WEB-PUBSUB_RESOURCE_GROUP"] || "myResourceGroup";
const resourceName = "myWebPubSubService";
const credential = new DefaultAzureCredential();
const client = new WebPubSubManagementClient(credential, subscriptionId);
const result = await client.webPubSub.beginRestartAndWait(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
Exemple de réponse
Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationStatus...
Définitions
ErrorAdditionalInfo
Informations supplémentaires sur l’erreur de gestion des ressources.
Nom |
Type |
Description |
info
|
object
|
Informations supplémentaires
|
type
|
string
|
Type d’informations supplémentaires.
|
ErrorDetail
Détail de l’erreur.
Nom |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Informations supplémentaires sur l’erreur.
|
code
|
string
|
Code d'erreur.
|
details
|
ErrorDetail[]
|
Détails de l’erreur.
|
message
|
string
|
Message d’erreur.
|
target
|
string
|
Cible d’erreur.
|
ErrorResponse
Réponse d’erreur