Bricht den letzten Vorgang ab, der auf verwaltetem Cluster ausgeführt wird.
Bricht den derzeit ausgeführten Vorgang auf dem verwalteten Cluster ab. Der verwaltete Cluster wird in den Status "Abbrechen" und schließlich in den Zustand "Abgebrochen" verschoben, wenn der Abbruch abgeschlossen ist. Wenn der Vorgang abgeschlossen ist, bevor der Abbruch erfolgen kann, wird ein 409-Fehlercode zurückgegeben.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort?api-version=2024-09-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe. Bei dem Namen wird die Groß-/Kleinschreibung nicht beachtet.
|
resourceName
|
path |
True
|
string
|
Der Name der verwalteten Clusterressource.
RegEx-Muster: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$
|
subscriptionId
|
path |
True
|
string
uuid
|
Die ID des Zielabonnements. Der Wert muss eine UUID sein.
|
api-version
|
query |
True
|
string
|
Die API-Version, die für diesen Vorgang verwendet werden soll.
|
Antworten
Name |
Typ |
Beschreibung |
202 Accepted
|
|
Angenommen
Header
- location: string
- Azure-AsyncOperation: string
|
204 No Content
|
|
NoContent
|
Other Status Codes
|
CloudError
|
Fehlerantwort, die beschreibt, warum der Vorgang fehlgeschlagen ist.
|
Sicherheit
azure_auth
Azure Active Directory OAuth2-Fluss
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel ihres Benutzerkontos
|
Beispiele
Abort operation on managed cluster
Beispielanforderung
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclusters/clustername1/abort?api-version=2024-09-01
/**
* Samples for ManagedClusters AbortLatestOperation.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/
* ManagedClustersAbortOperation.json
*/
/**
* Sample code: Abort operation on managed cluster.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void abortOperationOnManagedCluster(com.azure.resourcemanager.AzureResourceManager azure) {
azure.kubernetesClusters().manager().serviceClient().getManagedClusters().abortLatestOperation("rg1",
"clustername1", 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.containerservice import ContainerServiceClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-containerservice
# USAGE
python managed_clusters_abort_operation.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 = ContainerServiceClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
client.managed_clusters.begin_abort_latest_operation(
resource_group_name="rg1",
resource_name="clustername1",
).result()
# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.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 armcontainerservice_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v6"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e838027e88cca634c1545e744630de9262a6e72a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.json
func ExampleManagedClustersClient_BeginAbortLatestOperation() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservice.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewManagedClustersClient().BeginAbortLatestOperation(ctx, "rg1", "clustername1", 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 { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
*
* @summary Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-09-01/examples/ManagedClustersAbortOperation.json
*/
async function abortOperationOnManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.beginAbortLatestOperationAndWait(
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
Beispiel für eine Antwort
location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-09-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operationStatus/00000000-0000-0000-0000-000000000000?api-version=2024-09-01
Definitionen
Name |
Beschreibung |
CloudError
|
Eine Fehlerantwort des Containerdiensts.
|
CloudErrorBody
|
Eine Fehlerantwort des Containerdiensts.
|
CloudError
Eine Fehlerantwort des Containerdiensts.
CloudErrorBody
Eine Fehlerantwort des Containerdiensts.
Name |
Typ |
Beschreibung |
code
|
string
|
Ein Bezeichner für den Fehler. Codes sind unveränderlich und sollen programmgesteuert genutzt werden.
|
details
|
CloudErrorBody[]
|
Eine Liste mit zusätzlichen Details zum Fehler.
|
message
|
string
|
Eine Meldung, die den Fehler beschreibt, der für die Anzeige in einer Benutzeroberfläche geeignet ist.
|
target
|
string
|
Das Ziel des bestimmten Fehlers. Beispielsweise der Name der Eigenschaft im Fehler.
|