Vraťte zadanou řídicí rovinu jádra paketu na předchozí verzi rollbackVersion. Více po sobě jdoucích vrácení zpět není možné. Tato akce může způsobit výpadek služby.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback?api-version=2024-04-01
Parametry identifikátoru URI
Name |
V |
Vyžadováno |
Typ |
Description |
packetCoreControlPlaneName
|
path |
True
|
string
|
Název řídicí roviny jádra paketu.
Vzor regulárního výrazu: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$
|
resourceGroupName
|
path |
True
|
string
|
Název skupiny prostředků. V názvu se rozlišují malá a velká písmena.
|
subscriptionId
|
path |
True
|
string
uuid
|
ID cílového předplatného. Hodnota musí být UUID.
|
api-version
|
query |
True
|
string
|
Verze rozhraní API, která se má použít pro tuto operaci.
|
Odpovědi
Name |
Typ |
Description |
200 OK
|
AsyncOperationStatus
|
Asynchronní operace byla dokončena.
|
202 Accepted
|
|
Přijata. Vrátí identifikátor URI operace, na který je možné dotazovat, aby se zjistil aktuální stav operace.
|
Other Status Codes
|
ErrorResponse
|
Chybová odpověď popisující, proč operace selhala.
|
Zabezpečení
azure_auth
Tok Azure Active Directory OAuth2.
Typ:
oauth2
Tok:
implicit
URL autorizace:
https://login.microsoftonline.com/common/oauth2/authorize
Rozsahy
Name |
Description |
user_impersonation
|
zosobnění uživatelského účtu
|
Příklady
Rollback packet core control plane
Ukázkový požadavek
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
Ukázková odpověď
{
"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
Definice
AsyncOperationStatus
Aktuální stav asynchronní operace.
Name |
Typ |
Description |
endTime
|
string
|
Čas ukončení operace.
|
error
|
ErrorDetail
|
Pokud je k dispozici, podrobnosti o chybě operace.
|
id
|
string
|
Plně kvalifikované ID asynchronní operace.
|
name
|
string
|
Název asynchronní operace.
|
percentComplete
|
number
|
Procento dokončené operace
|
properties
|
object
|
Vlastnosti vrácené poskytovatelem prostředků při úspěšné operaci
|
resourceId
|
string
|
Plně kvalifikované ID prostředku, ke kterému se vztahuje stav asynchronní operace.
|
startTime
|
string
|
Čas zahájení operace.
|
status
|
string
|
Stav operace.
|
ErrorAdditionalInfo
Další informace o chybě správy prostředků
Name |
Typ |
Description |
info
|
object
|
Další informace.
|
type
|
string
|
Typ další informace.
|
ErrorDetail
Podrobnosti o chybě
Name |
Typ |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Další informace o chybě.
|
code
|
string
|
Kód chyby
|
details
|
ErrorDetail[]
|
Podrobnosti o chybě.
|
message
|
string
|
Chybová zpráva
|
target
|
string
|
Cíl chyby.
|
ErrorResponse
Chybová odpověď