Reverta o plano de controle do núcleo de pacotes especificado para a versão anterior, "rollbackVersion". Várias reversões consecutivas não são possíveis. Essa ação pode causar uma interrupção de serviço.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback?api-version=2024-04-01
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
packetCoreControlPlaneName
|
path |
True
|
string
|
O nome do plano de controle do núcleo de pacotes.
Padrão Regex: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos. O nome diferencia maiúsculas de minúsculas.
|
subscriptionId
|
path |
True
|
string
uuid
|
A ID da assinatura de destino. O valor deve ser um UUID.
|
api-version
|
query |
True
|
string
|
A versão da API a ser usada para esta operação.
|
Respostas
Nome |
Tipo |
Description |
200 OK
|
AsyncOperationStatus
|
Operação assíncrona concluída.
|
202 Accepted
|
|
Aceita. Retorna um URI de operação que pode ser consultado para localizar o estado atual da operação.
|
Other Status Codes
|
ErrorResponse
|
Resposta de erro que descreve por que a operação falhou.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Tipo:
oauth2
Flow:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Escopos
Nome |
Description |
user_impersonation
|
representar sua conta de usuário
|
Exemplos
Rollback packet core control plane
Solicitação de exemplo
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 de exemplo
{
"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 status atual de uma operação assíncrona.
Nome |
Tipo |
Description |
endTime
|
string
|
A hora de término da operação.
|
error
|
ErrorDetail
|
Se estiver presente, detalhes do erro de operação.
|
id
|
string
|
ID totalmente qualificada para a operação assíncrona.
|
name
|
string
|
Nome da operação assíncrona.
|
percentComplete
|
number
|
Porcentagem da operação concluída.
|
properties
|
object
|
Propriedades retornadas pelo provedor de recursos em uma operação bem-sucedida
|
resourceId
|
string
|
ID totalmente qualificada para o recurso ao qual essa operação assíncrona status está relacionada.
|
startTime
|
string
|
A hora de início da operação.
|
status
|
string
|
O status da operação.
|
ErrorAdditionalInfo
As informações adicionais do erro de gerenciamento de recursos.
Nome |
Tipo |
Description |
info
|
object
|
As informações adicionais.
|
type
|
string
|
O tipo de informação adicional.
|
ErrorDetail
O detalhe do erro.
Nome |
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 de erro
Nome |
Tipo |
Description |
error
|
ErrorDetail
|
O objeto de erro.
|