Restaurer le plan de contrôle de cœur de paquet spécifié à la version précédente, « rollbackVersion ». Plusieurs restaurations consécutives ne sont pas possibles. Cette action peut entraîner une panne de service.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback?api-version=2024-04-01
Paramètres URI
Nom |
Dans |
Obligatoire |
Type |
Description |
packetCoreControlPlaneName
|
path |
True
|
string
|
Nom du plan de contrôle du cœur de paquet.
Modèle d’expression régulière: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$
|
resourceGroupName
|
path |
True
|
string
|
Nom du groupe de ressources. Le nom ne respecte pas la casse.
|
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 |
200 OK
|
AsyncOperationStatus
|
Opération asynchrone terminée.
|
202 Accepted
|
|
Accepté. Retourne un URI d’opération qui peut être interrogé pour rechercher l’état actuel de l’opération.
|
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
Rollback packet core control plane
Exemple de requête
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/rollback?api-version=2024-04-01
/**
* Samples for PacketCoreControlPlanes Rollback.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/
* PacketCoreControlPlaneRollback.json
*/
/**
* Sample code: Rollback packet core control plane.
*
* @param manager Entry point to MobileNetworkManager.
*/
public static void
rollbackPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) {
manager.packetCoreControlPlanes().rollback("rg1", "TestPacketCoreCP", 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.mobilenetwork import MobileNetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-mobilenetwork
# USAGE
python packet_core_control_plane_rollback.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 = MobileNetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.packet_core_control_planes.begin_rollback(
resource_group_name="rg1",
packet_core_control_plane_name="TestPacketCoreCP",
).result()
print(response)
# x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCoreControlPlaneRollback.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 armmobilenetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mobilenetwork/armmobilenetwork/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d88c94b22a8efdd47c0cadfe6d8d489107db2b23/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCoreControlPlaneRollback.json
func ExamplePacketCoreControlPlanesClient_BeginRollback() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmobilenetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPacketCoreControlPlanesClient().BeginRollback(ctx, "rg1", "TestPacketCoreCP", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{
// Name: to.Ptr("testOperation"),
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()),
// ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()),
// Status: to.Ptr("Succeeded"),
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MobileNetworkManagementClient } = require("@azure/arm-mobilenetwork");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage.
*
* @summary Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive rollbacks are not possible. This action may cause a service outage.
* x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-04-01/examples/PacketCoreControlPlaneRollback.json
*/
async function rollbackPacketCoreControlPlane() {
const subscriptionId =
process.env["MOBILENETWORK_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["MOBILENETWORK_RESOURCE_GROUP"] || "rg1";
const packetCoreControlPlaneName = "TestPacketCoreCP";
const credential = new DefaultAzureCredential();
const client = new MobileNetworkManagementClient(credential, subscriptionId);
const result = await client.packetCoreControlPlanes.beginRollbackAndWait(
resourceGroupName,
packetCoreControlPlaneName,
);
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
{
"id": "/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation",
"name": "testOperation",
"status": "Succeeded",
"startTime": "2021-08-19T03:36:07.000Z",
"endTime": "2021-08-19T03:38:07.000Z"
}
Azure-AsyncOperation: https://management.azure.com/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation?api-version=2024-04-01
Définitions
AsyncOperationStatus
Status actuelle d’une opération asynchrone.
Nom |
Type |
Description |
endTime
|
string
|
Heure de fin de l'opération.
|
error
|
ErrorDetail
|
Le cas échéant, détails de l’erreur d’opération.
|
id
|
string
|
ID complet pour l’opération asynchrone.
|
name
|
string
|
Nom de l’opération asynchrone.
|
percentComplete
|
number
|
Pourcentage de l’opération terminée.
|
properties
|
object
|
Propriétés retournées par le fournisseur de ressources lors d’une opération réussie
|
resourceId
|
string
|
ID complet pour la ressource à laquelle cette opération asynchrone status se rapporte.
|
startTime
|
string
|
Heure de début de l'opération.
|
status
|
string
|
État de l’opération
|
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