Mendapatkan status operasi pembersihan yang sedang berlangsung.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}?api-version=2020-08-01
Parameter URI
Name
In
Required
Type
Description
purgeId
path
True
string
Dalam permintaan status penghapusan menyeluruh, ini adalah Id operasi yang statusnya dikembalikan.
resourceGroupName
path
True
string
Nama grup sumber daya. Nama tidak peka huruf besar/kecil.
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/OIAutoRest5123/providers/Microsoft.OperationalInsights/workspaces/aztest5048/operations/purge-970318e7-b859-4edb-8903-83b1b54d0b74?api-version=2020-08-01
import com.azure.core.util.Context;
/** Samples for WorkspacePurge GetPurgeStatus. */
public final class Main {
/*
* x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurgeOperation.json
*/
/**
* Sample code: WorkspacePurgeOperation.
*
* @param manager Entry point to LogAnalyticsManager.
*/
public static void workspacePurgeOperation(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
manager
.workspacePurges()
.getPurgeStatusWithResponse(
"OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE);
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
package armoperationalinsights_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurgeOperation.json
func ExampleWorkspacePurgeClient_GetPurgeStatus() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armoperationalinsights.NewWorkspacePurgeClient("00000000-0000-0000-0000-00000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := client.GetPurgeStatus(ctx,
"OIAutoRest5123",
"aztest5048",
"purge-970318e7-b859-4edb-8903-83b1b54d0b74",
nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets status of an ongoing purge operation.
*
* @summary Gets status of an ongoing purge operation.
* x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurgeOperation.json
*/
async function workspacePurgeOperation() {
const subscriptionId = "00000000-0000-0000-0000-00000000000";
const resourceGroupName = "OIAutoRest5123";
const workspaceName = "aztest5048";
const purgeId = "purge-970318e7-b859-4edb-8903-83b1b54d0b74";
const credential = new DefaultAzureCredential();
const client = new OperationalInsightsManagementClient(credential, subscriptionId);
const result = await client.workspacePurge.getPurgeStatus(
resourceGroupName,
workspaceName,
purgeId
);
console.log(result);
}
workspacePurgeOperation().catch(console.error);
Read this SDK documentation on how to add the SDK to your project and authenticate.