Reverta o plano de controlo do núcleo de pacotes especificado para a versão anterior, "rollbackVersion". Não são possíveis várias reversões consecutivas. Esta ação pode causar uma indisponibilidade do serviço.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback?api-version=2024-04-01
Parâmetros do URI
Name |
Em |
Necessário |
Tipo |
Description |
packetCoreControlPlaneName
|
path |
True
|
string
|
O nome do plano de controlo do núcleo do pacote.
Padrão Regex: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos. O nome não é sensível a maiúsculas e minúsculas.
|
subscriptionId
|
path |
True
|
string
uuid
|
O ID da subscrição de destino. O valor tem de ser um UUID.
|
api-version
|
query |
True
|
string
|
A versão da API a utilizar para esta operação.
|
Respostas
Name |
Tipo |
Description |
200 OK
|
AsyncOperationStatus
|
Operação assíncrona concluída.
|
202 Accepted
|
|
Aceite. Devolve um URI de operação que pode ser consultado para encontrar o estado atual da operação.
|
Other Status Codes
|
ErrorResponse
|
Resposta de erro que descreve a razão pela qual a operação falhou.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Tipo:
oauth2
Fluxo:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Âmbitos
Name |
Description |
user_impersonation
|
representar a sua conta de utilizador
|
Exemplos
Rollback packet core control plane
Pedido de amostra
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
Resposta da amostra
{
"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
Definições
AsyncOperationStatus
O estado atual de uma operação assíncrona.
Name |
Tipo |
Description |
endTime
|
string
|
A hora de fim da operação.
|
error
|
ErrorDetail
|
Se estiver presente, detalhes do erro de operação.
|
id
|
string
|
ID completamente qualificado para a operação assíncrona.
|
name
|
string
|
Nome da operação assíncrona.
|
percentComplete
|
number
|
Percentagem da operação concluída.
|
properties
|
object
|
Propriedades devolvidas pelo fornecedor de recursos numa operação com êxito
|
resourceId
|
string
|
ID completamente qualificado para o recurso ao qual este estado de operação assíncrona está relacionado.
|
startTime
|
string
|
A hora de início da operação.
|
status
|
string
|
O estado da operação.
|
ErrorAdditionalInfo
Informações adicionais sobre o erro de gestão de recursos.
Name |
Tipo |
Description |
info
|
object
|
As informações adicionais.
|
type
|
string
|
O tipo de informação adicional.
|
ErrorDetail
O detalhe do erro.
Name |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
As informações adicionais do erro.
|
code
|
string
|
O código de erro.
|
details
|
ErrorDetail[]
|
Os detalhes do erro.
|
message
|
string
|
A mensagem de erro.
|
target
|
string
|
O destino do erro.
|
ErrorResponse
Resposta a erros
Name |
Tipo |
Description |
error
|
ErrorDetail
|
O objeto de erro.
|