Flow Logs - Delete
Menghapus sumber daya log alur yang ditentukan.
Dalam artikel ini
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}?api-version=2021-08-01
Parameter URI
Name
In
Required
Type
Description
flowLogName
path
True
Nama sumber daya log alur.
networkWatcherName
path
True
Nama network watcher.
resourceGroupName
path
True
Nama grup sumber daya.
subscriptionId
path
True
Kredensial langganan yang secara unik mengidentifikasi langganan Microsoft Azure. ID langganan membentuk bagian dari URI untuk setiap panggilan layanan.
api-version
query
True
Versi API klien.
Respons
Name
Type
Description
202 Accepted
Diterima dan operasi akan selesai secara asinkron.
204 No Content
Hapus berhasil.
Other Status Codes
Respons kesalahan yang menjelaskan mengapa operasi gagal.
Keamanan
azure_auth
Azure Active Directory Flow OAuth2.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name
Description
user_impersonation
meniru akun pengguna Anda
Contoh
Delete flow log
Sample Request
DELETE https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/flowLogs/fl?api-version=2021-08-01
import com.azure.core.util.Context;
/** Samples for FlowLogs Delete. */
public final class Main {
/*
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/NetworkWatcherFlowLogDelete.json
*/
/**
* Sample code: Delete flow log.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void deleteFlowLog(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getFlowLogs().delete("rg1", "nw1", "fl", Context.NONE);
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
package armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/NetworkWatcherFlowLogDelete.json
func ExampleFlowLogsClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armnetwork.NewFlowLogsClient("subid", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDelete(ctx,
"rg1",
"nw1",
"fl",
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)
}
}
Read this SDK documentation on how to add the SDK to your project and authenticate.
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes the specified flow log resource.
*
* @summary Deletes the specified flow log resource.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/NetworkWatcherFlowLogDelete.json
*/
async function deleteFlowLog() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const networkWatcherName = "nw1";
const flowLogName = "fl";
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const result = await client.flowLogs.beginDeleteAndWait(
resourceGroupName,
networkWatcherName,
flowLogName
);
console.log(result);
}
deleteFlowLog().catch(console.error);
Read this SDK documentation on how to add the SDK to your project and authenticate.
Definisi
ErrorDetails
Representasi detail kesalahan umum.
Name
Type
Description
code
Kode Kesalahan.
message
Pesan kesalahan.
target
Target kesalahan.
ErrorResponse
Objek kesalahan.
Name
Type
Description
error
Kesalahan
Objek detail kesalahan.