Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Alerts - Update Subscription Level State To Resolve
Referenz
Dienst:
Defender for Cloud
API-Version:
2022-01-01
Aktualisieren des Status der Warnung
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/resolve?api-version=2022-01-01
URI-Parameter
Name
In
Erforderlich
Typ
Beschreibung
alertName
path
True
string
Name des Warnungsobjekts
ascLocation
path
True
string
Der Ort, an dem ASC die Daten des Abonnements speichert. kann von Get-Speicherorten abgerufen werden
POST https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/alerts/2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a/resolve?api-version=2022-01-01
/**
* Samples for Alerts UpdateSubscriptionLevelStateToResolve.
*/
public final class Main {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/
* UpdateAlertSubscriptionLocation_resolve_example.json
*/
/**
* Sample code: Update security alert state on a subscription from a security data location.
*
* @param manager Entry point to SecurityManager.
*/
public static void updateSecurityAlertStateOnASubscriptionFromASecurityDataLocation(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.alerts().updateSubscriptionLevelStateToResolveWithResponse("westeurope",
"2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a", com.azure.core.util.Context.NONE);
}
}
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.SecurityCenter;
// Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2022-01-01/examples/Alerts/UpdateAlertSubscriptionLocation_resolve_example.json
// this example is just showing the usage of "Alerts_UpdateSubscriptionLevelStateToResolve" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionSecurityAlertResource created on azure
// for more information of creating SubscriptionSecurityAlertResource, please refer to the document of SubscriptionSecurityAlertResource
string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23";
AzureLocation ascLocation = new AzureLocation("westeurope");
string alertName = "2518298467986649999_4d25bfef-2d77-4a08-adc0-3e35715cc92a";
ResourceIdentifier subscriptionSecurityAlertResourceId = SubscriptionSecurityAlertResource.CreateResourceIdentifier(subscriptionId, ascLocation, alertName);
SubscriptionSecurityAlertResource subscriptionSecurityAlert = client.GetSubscriptionSecurityAlertResource(subscriptionSecurityAlertResourceId);
// invoke the operation
await subscriptionSecurityAlert.ResolveAsync();
Console.WriteLine("Succeeded");
Häufige Fehlerantwort für alle Azure Resource Manager-APIs, um Fehlerdetails für fehlgeschlagene Vorgänge zurückzugeben. (Dies folgt auch dem OData-Fehlerantwortformat.)
Der Ressourcenverwaltungsfehler zusätzliche Informationen.
CloudError
Objekt
Häufige Fehlerantwort für alle Azure Resource Manager-APIs, um Fehlerdetails für fehlgeschlagene Vorgänge zurückzugeben. (Dies folgt auch dem OData-Fehlerantwortformat.)