Menghapus asosiasi.
DELETE https://management.azure.com/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}?api-version=2022-06-01
Parameter URI
Nama |
Dalam |
Diperlukan |
Jenis |
Deskripsi |
associationName
|
path |
True
|
string
|
Nama asosiasi. Nama tidak peka huruf besar/kecil.
|
resourceUri
|
path |
True
|
string
|
Pengidentifikasi sumber daya.
|
api-version
|
query |
True
|
string
|
Versi API yang digunakan untuk operasi ini.
|
Respons
Nama |
Jenis |
Deskripsi |
200 OK
|
|
Asosiasi berhasil dihapus
|
204 No Content
|
|
Asosiasi tidak ada
|
Other Status Codes
|
ErrorResponseCommonV2
|
Kesalahan
|
Keamanan
azure_auth
Alur OAuth2 Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nama |
Deskripsi |
user_impersonation
|
meniru akun pengguna Anda
|
Contoh
Delete association
Sample Request
DELETE https://management.azure.com/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm/providers/Microsoft.Insights/dataCollectionRuleAssociations/myAssociation?api-version=2022-06-01
package armmonitor_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/969fd0c2634fbcc1975d7abe3749330a5145a97c/specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/DataCollectionRuleAssociationsDelete.json
func ExampleDataCollectionRuleAssociationsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmonitor.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewDataCollectionRuleAssociationsClient().Delete(ctx, "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm", "myAssociation", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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 { MonitorClient } = require("@azure/arm-monitor");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes an association.
*
* @summary Deletes an association.
* x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/DataCollectionRuleAssociationsDelete.json
*/
async function deleteAssociation() {
const resourceUri =
"subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm";
const associationName = "myAssociation";
const credential = new DefaultAzureCredential();
const client = new MonitorClient(credential);
const result = await client.dataCollectionRuleAssociations.delete(resourceUri, associationName);
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
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Monitor;
// Generated from example definition: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/DataCollectionRuleAssociationsDelete.json
// this example is just showing the usage of "DataCollectionRuleAssociations_Delete" 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 DataCollectionRuleAssociationResource created on azure
// for more information of creating DataCollectionRuleAssociationResource, please refer to the document of DataCollectionRuleAssociationResource
string resourceUri = "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm";
string associationName = "myAssociation";
ResourceIdentifier dataCollectionRuleAssociationResourceId = DataCollectionRuleAssociationResource.CreateResourceIdentifier(resourceUri, associationName);
DataCollectionRuleAssociationResource dataCollectionRuleAssociation = client.GetDataCollectionRuleAssociationResource(dataCollectionRuleAssociationResourceId);
// invoke the operation
await dataCollectionRuleAssociation.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Definisi
ErrorAdditionalInfo
Info tambahan kesalahan manajemen sumber daya.
Nama |
Jenis |
Deskripsi |
info
|
object
|
Info tambahan.
|
type
|
string
|
Jenis info tambahan.
|
ErrorDetail
Detail kesalahan.
Nama |
Jenis |
Deskripsi |
additionalInfo
|
ErrorAdditionalInfo[]
|
Info tambahan kesalahan.
|
code
|
string
|
Kode kesalahan.
|
details
|
ErrorDetail[]
|
Detail kesalahan.
|
message
|
string
|
Pesan kesalahan.
|
target
|
string
|
Target kesalahan.
|
ErrorResponseCommonV2
Respons kesalahan
Nama |
Jenis |
Deskripsi |
error
|
ErrorDetail
|
Objek kesalahan.
|