Tar bort en säkerhetsanslutning.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}?api-version=2023-10-01-preview
URI-parametrar
Name |
I |
Obligatorisk |
Typ |
Description |
resourceGroupName
|
path |
True
|
string
|
Namnet på resursgruppen i användarens prenumeration. Namnet är skiftlägesokänsligt.
Regex pattern: ^[-\w\._\(\)]+$
|
securityConnectorName
|
path |
True
|
string
|
Namnet på säkerhetsanslutningsappen.
|
subscriptionId
|
path |
True
|
string
|
Azure-prenumerations-ID
Regex pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$
|
api-version
|
query |
True
|
string
|
API-version för åtgärden
|
Svar
Name |
Typ |
Description |
200 OK
|
|
Resursen har tagits bort
|
204 No Content
|
|
NoContent
|
Other Status Codes
|
CloudError
|
Felsvar som beskriver varför åtgärden misslyckades.
|
Säkerhet
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
personifiera ditt användarkonto
|
Exempel
Delete a security connector
Sample Request
DELETE https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/securityConnectors/mySecurityConnectorName?api-version=2023-10-01-preview
/**
* Samples for SecurityConnectors Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors
* /DeleteSecurityConnector_example.json
*/
/**
* Sample code: Delete a security connector.
*
* @param manager Entry point to SecurityManager.
*/
public static void deleteASecurityConnector(com.azure.resourcemanager.security.SecurityManager manager) {
manager.securityConnectors().deleteByResourceGroupWithResponse("myRg", "mySecurityConnectorName",
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
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b43974e07d3204c4b6f8396627f5430994a7f7c9/specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
func ExampleConnectorsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewConnectorsClient().Delete(ctx, "myRg", "mySecurityConnectorName", 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
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.SecurityCenter;
using Azure.ResourceManager.SecurityCenter.Models;
// Generated from example definition: specification/security/resource-manager/Microsoft.Security/preview/2023-10-01-preview/examples/SecurityConnectors/DeleteSecurityConnector_example.json
// this example is just showing the usage of "SecurityConnectors_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 SecurityConnectorResource created on azure
// for more information of creating SecurityConnectorResource, please refer to the document of SecurityConnectorResource
string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23";
string resourceGroupName = "myRg";
string securityConnectorName = "mySecurityConnectorName";
ResourceIdentifier securityConnectorResourceId = SecurityConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, securityConnectorName);
SecurityConnectorResource securityConnector = client.GetSecurityConnectorResource(securityConnectorResourceId);
// invoke the operation
await securityConnector.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
Definitioner
Name |
Description |
CloudError
|
Vanliga felsvar för alla Azure Resource Manager API:er för att returnera felinformation för misslyckade åtgärder. (Detta följer även OData-felsvarsformatet.).
|
CloudErrorBody
|
Felinformationen.
|
ErrorAdditionalInfo
|
Ytterligare information om resurshanteringsfelet.
|
CloudError
Vanliga felsvar för alla Azure Resource Manager API:er för att returnera felinformation för misslyckade åtgärder. (Detta följer även OData-felsvarsformatet.).
Name |
Typ |
Description |
error.additionalInfo
|
ErrorAdditionalInfo[]
|
Ytterligare information om felet.
|
error.code
|
string
|
Felkoden.
|
error.details
|
CloudErrorBody[]
|
Felinformationen.
|
error.message
|
string
|
Felmeddelandet.
|
error.target
|
string
|
Felmålet.
|
CloudErrorBody
Felinformationen.
Name |
Typ |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Ytterligare information om felet.
|
code
|
string
|
Felkoden.
|
details
|
CloudErrorBody[]
|
Felinformationen.
|
message
|
string
|
Felmeddelandet.
|
target
|
string
|
Felmålet.
|
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
Name |
Typ |
Description |
info
|
object
|
Ytterligare information.
|
type
|
string
|
Den ytterligare informationstypen.
|